Daymilo

Why navigation apps never reorder your stops

It looks like an obvious missing feature. You typed in twelve addresses, the app clearly knows where they all are, so why does it drive them in the order you happened to type them? Because that is a different problem, and a much harder one.

Two problems that look like one

When someone says a navigation app should find the optimal route, they usually mean one of two things, and the difference decides everything:

The first is solved. It is what every map app does, thousands of times a second, extremely well. The second is a separate question that the apps simply do not ask.

What a navigation app actually solves

Routing between two points is a shortest path problem on a graph of roads. It has been well understood for decades, and modern implementations return an answer in milliseconds even across a continent.

Adding waypoints does not change the nature of that work. A route through six stops is five shortest path problems chained together. The app solves each one properly and hands you the chain.

A navigation app drives your list in orderWaypoints are visited in exactly the order they were added.Navigation apps follow your list exactlyStops are driven in the order you typed them1Start22nd stop33rd stop44th stopWhat it does not doit never swaps two stops around,it never looks for a shorter order,it never checks whether startingfrom the far end would be cheaper.
A navigation app drives waypoints in exactly the order they were added.

The problem it does not touch

Choosing the order is a different question entirely, and it has a name: the traveling salesman problem. Given a set of stops and the distances between them, find the sequence that covers all of them with the least driving.

Nothing about the map app's shortest path machinery helps here. Knowing the fastest way from stop 4 to stop 9 tells you nothing about whether stop 4 should come before stop 9 at all.

Why the second problem is hard

The number of possible orders grows faster than almost anyone's intuition suggests.

The number of possible stop orders grows factoriallyFive stops give 24 orders, ten give 362,880, fifteen more than 87 billion.How many possible stop orders there areThe start is fixed, every other stop can movefive stops(5-1)!24eight stops(8-1)!5 040ten stops(10-1)!362 880fifteen stops(15-1)!87 178 291 200
The number of possible stop orders grows factorially with the number of stops.

With the start fixed, five stops give 24 possible orders, which you could check by hand. Ten stops give 362,880. Fifteen stops give more than 87 billion.

Checking every possibility stops being realistic somewhere around twelve stops, and this is not a problem you outrun with a faster computer: adding one stop multiplies the search space rather than adding to it.

How planners actually solve it

They do not check every order. Real planners use two steps:

  1. Build a distance matrix. How far is it, by road, from every stop to every other stop. For twenty stops that is 380 numbers, and they must come from the road network, not from straight lines between pins.
  2. Improve an order until it stops getting better. Start from a reasonable sequence and repeatedly swap segments that cross over each other. The result is called computed rather than optimal, honestly, because these methods do not guarantee the perfect answer.

In practice a computed order lands close enough to optimal that the remaining gap is smaller than the noise from traffic on the day.

Doing it by hand

You can run a rough version of the same method yourself, and on a short day it gets close. It is worth knowing, if only to see where it stops working.

Step 5 is a manual version of what planners do automatically, and it is the step people run out of patience for somewhere around a dozen stops.

Why the apps leave it out

It is a deliberate product decision, not a technical impossibility. Three reasons:

What this means for your day

Once you see the two problems as separate, the working pattern falls out of it: decide the order somewhere that treats sequencing as the job, then drive the result in whatever navigation app you prefer.

You keep the thing map apps are genuinely best at, live traffic and turn by turn guidance, and you stop paying for the thing they never claimed to do.

When you should not reorder

Worth saying plainly, because optimization is not always the goal. Leave the order alone when:

A good planner lets you fix the start and the finish for exactly this reason.

FAQ

Why does Google Maps not reorder my stops?

Because it solves the road between two points, not the sequence of points. The order is treated as your decision, and for most trips it genuinely is.

Is finding the best order actually difficult?

Yes. It is the traveling salesman problem. With the start fixed, fifteen stops have more than 87 billion possible orders, so no amount of checking possibilities gets you there.

Do route planners find the true optimal order?

Usually not, and the honest ones say so. They find a very good order using improvement methods, and the remaining difference is smaller than the effect of traffic.

Does a better phone or faster internet help?

No. The difficulty is in how fast the possibilities multiply, not in the speed of the device.

Can I keep some stops in a fixed position?

In a proper planner, yes. At minimum you should be able to fix the start and the finish, which covers most real constraints.

Are straight line distances good enough for sequencing?

No. Rivers, highways and one way systems mean two stops a mile apart in a straight line can be fifteen minutes apart by road. Ordering has to use road distances.