Concept Flow - Why Shortest Path Is a Graph Problem Not a Tree Problem
Start: Need shortest path
Is structure a Tree?
Yes→Unique path exists
Shortest path = unique path
Is structure a Graph?
Yes→Multiple paths possible
Need algorithms like BFS/Dijkstra
No path or invalid structure
End
This flow shows that trees have unique paths between nodes, so shortest path is trivial, but graphs can have multiple paths, requiring shortest path algorithms.