Step 1: Applications of Depth-First Search (DFS).
- Topological Sorting: DFS is employed to establish a topological order of vertices within a Directed Acyclic Graph (DAG).
- Identification of Strongly Connected Components (SCCs): DFS facilitates algorithms such as Kosaraju's algorithm for pinpointing strongly connected components in a graph.
- Maze Solving: DFS is frequently utilized to navigate mazes by traversing all potential routes and retracing steps when required.
Step 2: Misapplication.
- Optimal determination of the shortest path to a node in an unweighted graph: This objective is typically achieved through Breadth-First Search (BFS), not DFS. BFS systematically explores the graph layer by layer, guaranteeing the shortest path in unweighted graphs.
Step 3: Final Verdict.
The accurate selection is (3) Finding minimum distance to a node in an unweighted graph optimally.
Consider the following directed graph:
Which of the following is/are correct about the graph?
