cover

How do GPS apps find the shortest route?

Smart Flood Navigator
How do GPS apps find the shortest route?
You tap "navigate" and instantly your phone tells you: turn left in 400 feet, arrive in 23 minutes. ~~But how does it kn

You tap "navigate" and instantly your phone tells you: turn left in 400 feet, arrive in 23 minutes. But how does it know? You're asking it to solve a puzzle with thousands of possible paths — every street, every turn, every route through the whole city. If your phone tried them all one by one, you'd be waiting until next Tuesday. Instead, it has a trick.

First, your GPS app sees the world as a giant connect-the-dots game. Every intersection is a dot. Every street is a line connecting two dots, with a number written on it — how many seconds it takes to drive that block. Your starting point is one dot. Your destination is another dot. The app's job: find the cheapest path from dot to dot, adding up all those seconds.

How was this book?