Curiosities · Foundation · 7 min

Paths & networks

The cheapest route can have more edges than the visually direct route.

WHAT HAPPENS IF…When w=5, what is the cheapest route to C?
Interactive exploration
Loading the mathematical model…

Connect the picture to the idead(v)=min⁡u→v{d(u)+w(u,v)}d(v)=\min_{u\to v}\{d(u)+w(u,v)\}

Starting at A, repeatedly settle the unsettled vertex with smallest tentative distance and relax its neighbors. Nonnegative costs make that distance final. The A–C edge costs w, while A–B–C costs 2. Isolated E has no path; A to itself has cost zero.

A detail that matters

A shortest path minimizes the specified costs, not necessarily the number of edges or screen distance.

Keep the connection going

One idea leads to another.

More curiosities ↗