← Lab
ASTERXOR / Lab

Why the shortest route can make you late

A tiny road network reveals the question hiding inside every “best route.”

Synthetic six-node network with a gold 6-kilometre route taking 30 minutes and a blue 10-kilometre route taking 10 minutes.
Gold follows the shortest route; blue follows the fastest. This synthetic diagram is not to scale and does not predict a real journey.
LabASTERXOR / LEON LEUNG

The route is four kilometres longer. It arrives twenty minutes earlier.

That sounds like a navigation mistake until the map acquires a second set of numbers. Distance describes how much road you cover. Time also depends on how quickly you can cover it. In this small, deliberately invented network, asking for one rather than the other changes the answer completely.

A route is only best after you decide what “best” costs.
THE PUZZLE

Two perfectly reasonable answers

Start at S and finish at T. The upper road passes A and B: three two-kilometre segments, six kilometres altogether. Each segment has an assumed speed of 12 km/h, so each takes ten minutes. The lower road passes C and D. Its segments total ten kilometres, but the assumed speed is 60 km/h throughout. That journey takes ten minutes altogether.

The distance winner therefore needs thirty minutes, while the time winner needs ten. Neither answer contradicts the other. They solve different questions. The little connecting roads make this a network rather than a choice between two isolated lines, and they will matter when one of our assumptions changes.

Two paired bar charts show shortest and fastest routes at 6 versus 10 kilometres and 30 versus 10 minutes.
FIG 01Gold minimizes distance; blue minimizes time. Both totals are calculated from the same edge data.
THE MODEL

A map becomes a list of costs

To a graph algorithm, a junction is a node and a usable connection is an edge. Each edge gets a weight: the cost of using it. For the first calculation, the weight is kilometres. For the second, it is minutes, computed as distance divided by speed, then multiplied by sixty. The geometry of the drawing never enters the calculation.

That last detail is easy to miss. A neatly drawn line is not evidence of a short journey. Our diagram is not to scale, and its distances are assigned explicitly. Likewise, a real routing system needs usable road connections and restrictions, not just straight-line measurements between places. A bridge that looks nearby may be inaccessible from your side of the river.

Synthetic six-node network with a gold 6-kilometre route taking 30 minutes and a blue 10-kilometre route taking 10 minutes.
FIG 02Every edge carries distance and travel time. The drawing is schematic, not a real map or a promise about a journey.
CHANGE THE INPUT

Eighteen minutes changes the picture

Now add a delay to the C–D connection and recalculate. The original fast route takes ten minutes plus the delay. At an eighteen-minute delay, it ties with a different route at twenty-eight minutes. With a larger delay, the optimum can avoid that connection by using the cross-links: S–C–A–B–D–T. Its distance is thirteen kilometres.

This is why an old winning route need not remain the winner. At a twenty-minute delay, simply keeping the original fast route produces thirty minutes; searching again finds twenty-eight. The result is still only as good as the updated assumptions. Here the delay is a fixed surcharge in both directions, not a traffic forecast that changes while someone travels.

Line chart compares the original fast route, rising from 10 to 40 minutes, with the recalculated best route, which levels off at 28.
FIG 03The recomputed optimum stops rising at 28 minutes because a bypass becomes cheaper. At 18 minutes of added delay, the routes tie.
BEYOND THE WINNER

A single number hides your priorities

A person may prefer fewer transfers, avoid tolls, need a step-free route, or accept a slower road that feels safer. Some requirements should remove unusable edges before searching. Others can become costs or separate choices shown to the traveller. Folding everything into one score is possible, but the conversion is a decision: how many extra minutes is one toll worth?

Even “fastest” needs a definition. The lowest expected travel time can differ from the route most likely to meet a deadline. Our fixed-speed example contains no uncertainty, so it cannot settle that question. It explains one clean distinction without pretending that the whole task of navigation is a handful of additions.

A USEFUL HABIT

Read the objective before trusting the answer

When two route suggestions disagree, compare what each is minimizing and which restrictions it knows about. Check the departure time, travel mode, closures, and whether the estimate includes walking or waiting. These details can matter more than the apparent directness of the line on the screen.

The same habit travels beyond maps. A delivery plan, a network connection, or a sequence of production steps can all be represented as routes through choices. The search may be exact while the chosen objective is incomplete. Before improving the algorithm, it is often worth asking whether its cost measures the thing that actually matters.

THE THOUGHT TO TAKE AWAY

The map can tell you where to go. The meaning of “better” still has to come from somewhere.