Concept Flow - Why Shortest Path Is a Graph Problem Not a Tree Problem
Start: Problem Statement
Is the structure a Tree?
Yes→Unique path between nodes
Shortest path = unique path
Graph with cycles and multiple paths
Multiple paths between nodes
Need to find minimum distance path
Use graph algorithms (BFS, Dijkstra)
Shortest path found considering all paths
End
The flow shows that trees have unique paths between nodes, so shortest path is trivial, but graphs can have multiple paths and cycles, requiring special algorithms to find the shortest path.
