← Shortest paths (landing page)

Shortest Paths as Relaxation Schedules

Bellman–Ford, Dijkstra, min-plus propagation, and max-plus critical paths

A shortest-path label is a promise about the best path found so far. Relaxation tests whether one more edge improves that promise.

Add along a path. Take the minimum across alternatives. Algorithms differ only in how they schedule those comparisons.

Graph
Mode
Playback
Speed

Distance labels

Current step

Event log

    Legend
    Unreached — distance is ∞
    Tentative — reachable, not final
    Settled / reached earlier
    Newly reached or improved
    Relaxation improved a label
    Relaxation tested, did not win
    −∞ — not yet constrained (critical-path mode)
    Final path at completion (shortest or critical)
    Dashed blue — reached by an earlier power; the exactly-k wave has moved past (raw W only)
    Green ring — zero slack: on the critical path (CPM)
    L= / s= under a node — latest start / slack (CPM backward pass)