Why it matters
Johnson's beats Floyd-Warshall on sparse graphs. Elegant algorithm design.
Advertisement
The architecture
Reweight edges via Bellman-Ford.
Run Dijkstra from each vertex.
Un-reweight results.
Advertisement
How it works end to end
Johnson 1977.
Reweight to non-negative.
Dijkstra from each vertex.