All-pairs shortest paths

Given a directed graph on nn vertices with polynomially bounded integer weights and no negative cycles, compute reachability and shortest-path distances for every ordered pair. Inputs are edge-presence and weight matrices. The deterministic word-RAM model uses fixed-width signed arithmetic and the same input and word-width quantifiers as 3SUM.

Classic bound: O(n3)O(n^{3}) (Floyd 1962).

The bound has the form O(nα)O(n^{\alpha}). α\alpha is the time exponent; lower is better.

RankBoundEvidence levelLevelPlayerDateLink
1O(n2.995943)O(n^{2.995943})ClaimedSwapnil-jainSourceSwapnil-jain
2O(n2.999420)O(n^{2.999420})First breakthrough · Lean VerifiedJosh Alman and Virginia Vassilevska WilliamsanthropicsSourceJosh Alman and Virginia Vassilevska Williams, anthropics

α\alpha in O(nα)O(n^{\alpha}), lower is betterα\alpha in O(nα)O(n^{\alpha})linear scale, lower is better

ClaimedHuman VerifiedLean Verified
First breakthrough
α\alpha (linear scale)
α=2: O(n2)\alpha=2:\ O(n^{2})

Relevant repos