Pathfinder Router
Drag any city node above to reshape the travel network routes. Select start/destination to compute the optimal flight path.
Shortest Route Solution
Graph Theory & Pathfinder
GRAPHGraph theory analyzes networks of Vertices (nodes) and Edges (links). In travel networks, edges have weights representing distance or travel time. Dijkstra's algorithm finds the absolute shortest route from a starting node to all others by iteratively visiting the closest unvisited vertex and updating neighbor path costs.
Whiteboard Solver Steps
Initialize Dijkstra Node Table
Visual Guide:
- Set the starting node distance to
Step-by-Step Priority Queue Traversals
Dijkstra Log:
- Relaxing neighbor BOM: updated path distance from Infinity to 1 (via BLR)
- Relaxing neighbor HYD: updated path distance from Infinity to 1 (via BLR)
- Relaxing neighbor MAA: updated path distance from Infinity to 1 (via BLR)
Visiting BOM (Current shortest dist = 1).
- Relaxing neighbor DEL: updated path distance from Infinity to 3 (via BOM)
Visiting MAA (Current shortest dist = 1).
- Relaxing neighbor CCU: updated path distance from Infinity to 3 (via MAA)
Visiting HYD (Current shortest dist = 1).
Visiting DEL (Current shortest dist = 3).
Shortest Path Selection Summary
Why this matters:
- Without Dijkstra's algorithm, finding the shortest path across large graphs (like Google Maps or network routers) would require checking every possible permutation, which is computationally impossible for large graphs.
- Dijkstra resolves this in