Fewest roads
slower22 min
7 roads, straight through the slow market streets.
Module 58 · Finding the way
To the app, a town is junctions joined by roads, each with its minutes. Here you close roads in Larkspur’s toy town, run Dijkstra and A* across it a step at a time, and jam the ring road to watch the van reroute.
The whole idea in one example
22 min
7 roads, straight through the slow market streets.
19 min
9 roads, round the fast ring road.
A hand-made town: the junctions, roads and minutes are Larkspur’s stand-ins, not a map. The searches run for real.
How it works
Junctions joined by roads, each with its minutes
Dijkstra settles the junction nearest the depot, again and again
Dijkstra (1959) adds points one at a time to the set whose shortest path from the start is known, in order of rising distance, until the goal joins it.
Source, checked 30 October 2026
A* adds a guess of the minutes left, and looks at less
Hart, Nilsson and Raphael (1968) prove that A* finds a cheapest path whenever its guess never exceeds the true cost left, and suggest the straight-line distance for cities joined by roads.
Source, checked 30 October 2026
A jam or a closure changes the roads; the search stays the same
Google Maps’ route-planning docs (checked 2026-10-30) ignore current traffic by default, which replies fastest; asked to, the service takes current traffic into account.
Source, checked 30 October 2026
The story
Larkspur Supply Co.’s delivery van crosses town each morning; you close roads, jam the ring road and watch the app find the way. You’re on the team that runs deliveries.
Your path




Chapter 4 · done
How can a search look at fewer junctions and still find the quickest way?



Chapter 7 · done
Which search keeps every drop quick while looking at the fewest junctions?
Anyone whose product plans deliveries, shows a map or prices a trip, and wants to know how the route is found and why it changes. No background needed; the maths stays optional.