9Map Routes

image

Because we can instantly get directions using sites like Google Maps, we forget that not long ago people often got lost driving to unfamiliar destinations. Now software plans our route for us and even alters the route mid-trip if an accident or road closure blocks our way.

In computing, this task is called finding the shortest path. Despite the name, the goal isn’t always to find the shortest path, but more generally to minimize the cost, where the definition of cost varies. If the cost is time, the software finds the fastest route. If the cost is distance, the software minimizes the mileage, truly finding the shortest path. By changing ...

Get How Software Works now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.