5 questions to test your understanding
A weighted graph has two paths from vertex A to vertex B: one with 2 edges (total weight 100) and one with 5 edges (total weight 3). If you run BFS from A, which path does it find, and is this the shortest path?
In an unweighted graph, BFS visits vertex V for the first time after processing 12 other vertices. What can you conclude about V's shortest-path distance from the source?
In an unweighted graph, the first time BFS reaches a vertex is always via a shortest path from the source.
Running BFS from a source vertex and recording parent pointers produces a unique shortest-path tree.
Why does BFS correctly find shortest paths in unweighted graphs, and why does the same approach fail for weighted graphs?