Math · Intermediate · Lesson 5 of 7
Shortest Paths
How sat-navs find the best route
An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.
What you’ll learn
- Maps become weighted graphs; routes are paths.
- Dijkstra settles the closest unsettled node and relaxes its neighbours.
- It needs non-negative edge lengths.
Steps
- Roads as a graph
- Dijkstra’s algorithm
- Pick the route
- Negative roads?
- Roads between every town
- Every pair