Exam-style question
Try this first
In an unweighted graph, breadth-first search finds a path from S to G using three edges. What does this indicate?.
- A.The path contains exactly three vertices
- B.The path is the shortest path from S to G
- C.The path was found by depth-first search
- D.There is no other path from S to G
Model answer
What a good answer should say
- The path is the shortest path from S to G
Explanation
Why this works
Breadth-first search explores an unweighted graph by increasing distance from the starting vertex, so the first path it finds to G uses the fewest edges.
Common mistake
No common mistake is linked to this question yet.
