Shortest paths as a tropical matrix power
Statement
Let be the weight matrix of a directed graph on vertices with no negative-weight cycles. Let denote the -fold tropical matrix product of with itself. Then the entry equals the length of the shortest path from to in the graph. This is exactly the quantity computed by the Floyd–Warshall algorithm, whose recurrence builds up one intermediate vertex at a time.
Why is it true?
Entry tracks the length of the best walk from to using **at most edges**, because tropical matrix multiplication is exactly "combine a first leg and a rest-of-the-journey via addition, then keep only the cheapest combination" — precisely Bellman's principle of optimality for shortest paths. Iterating this times is enough because a shortest simple path in an -vertex graph never needs more than edges, so no further tropical squaring can improve the answer.
Proof sketch
By induction on . Base case : is trivially the length of the best walk using at most one edge. Inductive step: assume equals the length of the shortest walk from to using at most edges, for every . Then . Any walk from to with at most edges either uses at most edges already (covered by the , term) or splits as a walk of at most edges from to some vertex followed by one final edge ; minimizing over all such recovers exactly , so the claim holds for . Since there are no negative-weight cycles, no shortest walk needs to repeat a vertex, so every shortest path uses at most edges; taking shows is exactly the shortest-path distance, matching the Floyd–Warshall recurrence, which computes the same quantity by fixing intermediate vertices one at a time instead of edge-counts.
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- Diane Maclagan, Bernd Sturmfels (2015). Introduction to Tropical Geometry
- Grigory Mikhalkin (2005). Enumerative tropical algebraic geometry in R^2 · arXiv:math/0312530
- Imre Simon (1978). Limited subsets of a free monoid · DOI:10.1109/SFCS.1978.21