Step 1: Analysis of BFS and DFS.
- (A) BFS always finds the shortest path: True. BFS explores level by level, ensuring the shortest path in unweighted graphs.
- (B) DFS always finds the shortest path: False. DFS prioritizes depth over breadth, not guaranteeing the shortest path due to its backtracking nature.
- (C) DFS does not guarantee finding the shortest path: True. As explained, DFS may not discover the shortest path first.
- (D) BFS does not guarantee finding the shortest path: False. BFS consistently guarantees the shortest path in unweighted graphs.
Step 2: Conclusion.
Statements (B) and (D) are correct, leading to option (1) as the correct answer.
Consider the following directed graph:
Which of the following is/are correct about the graph?
