Consider the graph given below. What is the order in which the nodes mentioned in the options are to be traversed to find the shortest path from A to Z using best first search? A. Node-A B. Node-B C. Node-C D. Node-D E. Node-E F. Node-F Choose the correct answer from the options given below:
A→C→F→D→E
Best first search keeps a frontier of discovered nodes and always expands the most promising one; with only edge costs available, the node with the smallest cost is expanded next. The graph has edges A→C 2, A→F 7, C→B 10, C→F 3, B→D 1, B→Z 15, F→D 1, F→E 6, D→Z 7, D→E 2, E→Z 4.
Step 1 — expand A: frontier C (2), F (7). The cheapest is C.
Step 2 — expand C: B is reached at cost 12 and F improves to 2 + 3 = 5. The cheapest is F.
Step 3 — expand F: D at 5 + 1 = 6, E at 5 + 6 = 11. The cheapest is D (6).
Step 4 — expand D: E improves to 6 + 2 = 8, Z is reached at 13. The cheapest is E (8).
Step 5 — expand E: Z improves to 8 + 4 = 12, giving the path A→C→F→D→E→Z of cost 12. The same order results when the frontier is ranked by the single edge cost (C 2, F 3, D 1, E 2).
Orders that visit B or jump from C straight to E or D skip the cheaper node F, which is always on the frontier with a lower value at that point.
A→C→F→D→E option is correct.
In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as \(x/y\), where \(x\) is discovery time stamp and \(y\) is finishing time stamp.

It shows which of the following depth first forest ?
Which of the following algorithms are based on the Breadth First Search (BFS) ?
A. Prim's algorithms
B. Kruskal algorithms
C. Dijkstra algorithms
D. Greedy algorithms
E. Dynamic Programming
Choose the correct answer from the options given below:
Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph $G(V, E)$ as input, where $d[v]$ and $f[v]$ are the discovery time and finishing time, respectively, of the vertex $v \in V$.
| DFS(G): unmark all v ∈ V t ← 0 for each v ∈ V if v is unmarked t ← Explore(G, v, t) end if end for | Explore(G, v, t): mark v t ← t + 1 d[v] ← t for each (v, w) ∈ E if w is unmarked t ← Explore(G, w, t) end if end for t ← t + 1 f[v] ← t return t |
Suppose that the input directed graph $G(V, E)$ is a directed acyclic graph (DAG).
For an edge $(u, v) \in E$, which of the following options will NEVER be correct?
Consider the following algorithm someAlgo that takes an undirected graph G as input.
someAlgo (G)
1. Let $v$ be any vertex in G. Run BFS on G starting at $v$. Let $u$ be a vertex in G at maximum distance from $v$ as given by the BFS.
2. Run BFS on G again with $u$ as the starting vertex. Let $z$ be the vertex at maximum distance from $u$ as given by the BFS.
3. Output the distance between $u$ and $z$ in G.
The output of someAlgo (T) for the tree shown in the given figure is ____________ (Answer in integer)

In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as \(x/y\), where \(x\) is discovery time stamp and \(y\) is finishing time stamp.

It shows which of the following depth first forest ?
Which of the following algorithms are based on the Breadth First Search (BFS) ?
A. Prim's algorithms
B. Kruskal algorithms
C. Dijkstra algorithms
D. Greedy algorithms
E. Dynamic Programming
Choose the correct answer from the options given below: