"City" street segments are often only 0.1 miles long and
at 30mph this distance is covered in 12 seconds
In that amount of time we must: determine that the user is
"off route", calculate a new route, and present it to the
user (perhaps on a map, in text, and as "spoken" directions)
Using the "All Pairs" Problem
The Idea:
Find the "shortest" path between every pair of nodes
(which can be done in \(O(n^{3})\) time)
Different Implementations:
Solve this problem up front and use the results when
the user goes "off route"
Order the nodes (based on their proximity to the origin)
and use idle processor time
Using the Suggested Route
The Idea:
When the user goes "off route" calculate the shortest
path back to the suggested route
(i.e., to any node in the route)