← All papers
First page of Linear Single-Source Shortest Path, Almost

Linear Single-Source Shortest Path, Almost

Iman Gholami, MohammadTaghi Hajiaghayi

cs.DS Nov 25, 2026 · v1
Accompanying Lean files formalizing the work are released in a public repository (igholami/sssp-lean).
We give a comparison-addition algorithm for single-source shortest paths in undirected graphs with nonnegative real edge lengths. For each input with $n$ vertices and $m$ edges, its expected running time is $O(m+n\log\log\log n)$. It terminates almost surely. Every terminating run returns exact distances and a shortest-path tree on the reachable vertices. The bound is independent of the ratio of edge lengths and is linear whenever $m=Ω(n\log\log\log n)$.

Single-source shortest paths in undirected graphs with nonnegative real edge lengths in the comparison-addition model, where known bounds depend on sorting or on the edge-weight ratio.

A randomized algorithm builds ordered hierarchies of states over an owner decomposition derived from the minimum spanning tree. Random sampling certifies short routes between pivots, and auxiliary distances to owner pivots are computed. An outer hierarchy evaluator then computes exact distances. Lean files accompanying the work are released on GitHub.

The algorithm runs in expected O(m + n log log log n) time, terminates almost surely, and every terminating run returns exact distances and a shortest-path tree. The bound is independent of the edge-weight ratio and is linear when m = Ω(n log log log n).