You ask your phone for directions and the fastest route appears almost instantly. Then a crash blocks a highway, and before you reach it your route has already changed — rerouted around the jam in the blink of an eye. How does it keep up?
Finding the shortest path once is a solved, easy problem: Dijkstra's algorithm explores outward from your start, always extending the closest frontier, and lands the optimal route in polynomial time. For a small map, that's the whole story.
But a continent's road network has tens of millions of intersections, and traffic and closures change constantly. Re-running Dijkstra over the whole continent for every car, every few seconds, would melt the servers. The real challenge — dynamic shortest paths — is keeping answers fresh under nonstop change, fast enough to feel instant. That's where easy turns into a genuine frontier.
Comments
Loading comments...