A Faster SSSP Algorithm for Directed Graphs.

Tanayendu BariTanayendu Bari
3 min read

Introduction

Finding the shortest path from one node to all others in a graph is a core building block in computer science. Since 1959, Dijkstra’s algorithm has been the go-to solution for graphs with non-negative weights. It runs in O(m + n log n) time (where n = nodes, m = edges) and is optimal when sorting is involved.

But that “sorting barrier” has finally been broken.

Duan, Mao, Shu, and Yin (2025) introduced a deterministic O(m log²⁄³ n)-time algorithm for SSSP in directed sparse graphs — beating Dijkstra for the first time in this class.


The Key Result

Theorem
There exists a deterministic algorithm that solves Single-Source Shortest Paths on directed graphs with non-negative real weights in
O(m · log^(2/3) n) time.

This result breaks the long-standing O(m + n log n) barrier of Dijkstra in the comparison-addition model (no special tricks like word-RAM or integers!).


Why Dijkstra Stalls

Let’s quickly recap where Dijkstra hits its limit:

  • It repeatedly extracts the closest unvisited vertex from a heap → sorting bottleneck.

  • Heap operations contribute log n per node ⇒ n log n term.

  • Sparse graphs (where m << n²) still pay this full price.

  • Bellman–Ford avoids heaps but is too slow: O(m · k) if paths have up to k edges.


The High-Level Idea: Recursive Frontier Reduction

The new algorithm avoids full sorting by shrinking the frontier intelligently.

Core Concepts:

  1. Frontier S: A set of vertices with estimated distances not yet confirmed.

  2. Find Pivots: A k-step Bellman–Ford relaxation over S finds "hard" pivot vertices whose shortest-path trees contain ≥ k nodes.

  3. Divide and Conquer:

    • Split distance range [b, B) into ~2^t buckets.

    • Recurse on each smaller problem — like Quicksort without full sorting.

  4. Use parameters:

    • k = ⌊log^(1/3) n⌋

    • t = ⌊log^(2/3) n⌋

This ensures each level reduces the problem size effectively.


Algorithm Building Blocks

🔧 Find Pivots

  • Runs k rounds of edge relaxation.

  • Identifies vertices in the frontier S whose shortest-path trees are “deep enough”.

  • These become pivot roots P.

🔧 Pull

  • Efficiently extracts the next M smallest-distance vertices from the heap-like structure.

  • Time complexity: O(M) using a clever block-based layout.

🔧 Recursion

  • Depth of recursion is ≈ log n / t = O(log^(1/3) n).

  • Each level touches each edge only once.


Why It Works

  • Frontier shrinking: Each recursive call only considers 1/k of the previous set.

  • Dis-jointness: Each vertex is finalized once → No redundant work.

  • Total time:

$$\sum O(\text{frontier}) = O\left(m \cdot \log^{\frac{2}{3}} n\right)$$

  • Deterministic: No randomization, no approximation.

Implications & Future Directions

In Practice

  • Better routing algorithms on large sparse road networks.

  • More efficient graph engines in databases and AI systems.

  • Possibly faster incremental algorithms for dynamic graphs.

Research Directions

  • Can this be extended to:

    • Graphs with negative weights?

    • Dynamic edge updates?

    • Multi-source or all-pairs problems?

  • Does this unlock even faster deterministic algorithms under the comparison-addition model?


References

  1. Duan, R., Mao, J., Shu, X., & Yin, L. (2025). Breaking the Sorting Barrier for Directed Single-Source Shortest Paths. arXiv:2504.17033v1

  2. Dijkstra, E. W. (1959). A note on two problems in connexion with graphs. Numerische Mathematik.

  3. Bellman, R. (1958). On a routing problem. Quarterly of Applied Mathematics.

  4. Pettie, S., & Ramachandran, V. (2005). A shortest path algorithm for real-weighted undirected graphs. SIAM Journal on Computing.


Closing Thoughts

This result is a landmark in algorithmic graph theory — not only beating Dijkstra, but showing that we’re not done finding surprises in classic problems.

If you’re excited about cutting-edge algorithm research or want to stay updated on the theory-meets-practice frontier, feel free to follow, share, or comment!


Written by Tanayendu — AI Engineer, passionate about optimizing LLMs, scaling inference systems, and decoding deep learning algorithms and classical Algorithm.

0
Subscribe to my newsletter

Read articles from Tanayendu Bari directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Tanayendu Bari
Tanayendu Bari