Breaking the Sorting Barrier for Directed Single-Source Shortest Paths
A new deterministic algorithm solves single-source shortest paths in O(mlog2/3n) time, beating Dijkstra's complexity on sparse graphs.
2025/04/23 by Ran Duan, Duan, Ran, Jiayi Mao +7 · 54 voices · 14 citations
Computer Science · Biochemistry, Genetics and Molecular Biology · #Algorithms and Data Compression #Machine Learning and Algorithms #DNA and Biological Computing
paper · pdf · doi:10.48550/arxiv.2504.17033
Abstract
A Rust/Python shortest-paths library containing a production Dijkstra and a semantically faithful, bit-exact-verified implementation of the Duan–Mao–Mao–Shu–Yin O(m log^(2/3) n) "sorting barrier" algorithm (arXiv:2504.17033). The research record documents an algorithm-level variant study and two low-level optimization passes that bring the engineered BMSSP variant to ~1.1–1.2x of Dijkstra's wall-clock time at n = 106–107, ahead of published implementations, together with the honest negative result: no practical input size at which BMSSP overtakes Dijkstra was found, and a combinatorial duplicate cascade triggered by the paper's relax-on-equality rule on tie-rich graphs is documented and fixed.
Summary
The authors present a deterministic algorithm for single-source shortest paths (SSSP) on directed graphs with non-negative real edge weights. By combining recursive partitioning and a 'pivot' reduction technique to limit the size of the frontier, they achieve a time complexity of O(mlog2/3n), proving that Dijkstra's algorithm is not optimal for SSSP.
machine-generated · gemma4:31b
In simple words
Finding the shortest way from one spot to all others in a map is usually done by sorting spots by distance. This takes a certain amount of time that experts thought could not be beaten. The authors found a new way to do this without sorting everything perfectly. They use a trick to group spots and only focus on a few important ones, which makes the process faster.
machine-generated · gemma4:31b
Outline
- Introduction — Contextualizes SSSP and explains the 'sorting barrier' associated with Dijkstra's algorithm.
- Preliminaries — Defines the comparison-addition model, constant-degree graph transformations, and path uniqueness assumptions.
- The Main Result — Details the BMSSP algorithm, the pivot-finding mechanism, and the custom data structure for partitioning.
- Observations and Discussions on the Algorithm — Provides intuitive explanations of the recursion tree and correctness logic.
- Correctness Analysis — Formally proves that the algorithm correctly identifies shortest paths using induction.
- Time Complexity Analysis — Provides a formal proof of the O(mlog2/3n) time bound.
machine-generated · gemma4:31b
Argument
- Dijkstra's algorithm is limited by the need to maintain a total order (sorting) of vertices in the frontier, leading to Ω(n log n) complexity.
Citation: Haeupler et al. - The size of the frontier can be reduced if we only care about distances below a certain bound B.
Assumption/Logic: If the number of vertices with distance < B is small, the frontier is naturally small; otherwise, most vertices are reachable via a few 'pivots'. - A recursive partitioning technique (BMSSP) can be used to process vertices in groups rather than one by one.
Proof: The BMSSP lemma and the associated algorithm. - Using a custom block-based linked list data structure allows for efficient insertions and 'pull' operations without full sorting.
Proof: Lemma on the partition data structure. - The combination of pivot reduction, recursive partitioning, and the specialized data structure reduces total time to O(mlog2/3n).
Proof: Time Complexity Analysis section.
machine-generated · gemma4:31b
Assumptions
- All paths in the graph have different lengths. [stated]
- The algorithm operates on graphs with constant in-degrees and out-degrees (or can be transformed into such). [stated]
- Edge weights are non-negative real numbers. [stated]
machine-generated · gemma4:31b
Claims
- There exists a deterministic algorithm for SSSP on directed graphs with real non-negative edge weights that runs in O(mlog2/3n) time. [proof]
- Dijkstra's algorithm is not optimal for the SSSP problem when only distances (and not the ordering of vertices) are required. [proof]
machine-generated · gemma4:31b
Proof sketch
- The authors use a recursive divide-and-conquer approach to partition vertices by distance, avoiding the full sorting required by Dijkstra's algorithm.
- They introduce 'pivots'—a small subset of frontier vertices that root large shortest-path trees—to reduce the size of the priority queue at each level.
- A custom block-based data structure supports efficient batch insertions and pulls to maintain these pivots without incurring a full log n cost per vertex.
- The algorithm alternates between Bellman-Ford-like relaxations for short paths and recursive calls for longer paths, ensuring that only a fraction of vertices are processed at each level.
- By setting parameters k = log1/3n and t = log2/3n, the total complexity is reduced to O(mlog2/3n).
machine-generated · gemma4:31b
Citations
Cited by
Discussions
- Chinese scientists have developed the best shortest-path algorithm in 41 years! A team from Tsinghua University has broken Dijkstra’s “sorting barrier” — the first improvement since 1984. arxiv.org/pd [bsky, 118 points, 4 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 99 points, 3 comments]
- I can’t believe we just learned in 2025 that Dijkstra’s algorithm is not optimal. Why did I even bother learning how to pronounce it? arxiv.org/abs/2504.17033 [bsky, 56 points, 4 comments]
- "This is the first result to break the O(m+nlogn) time bound of Dijkstra's algorithm on sparse graphs, showing that Dijkstra's algorithm is not optimal for SSSP." arxiv.org/abs/2504.17033 [bsky, 19 points, 1 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 17 points, 2 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [lobsters, 10 points, 1 comments]
- Dijkstra’s is not optimal anymore for finding shortest paths!? Breaking the Sorting Barrier for Directed Single-Source Shortest Paths arxiv.org/abs/2504.17033 [bsky, 6 points, 0 comments]
- arxiv.org/abs/2504.17033 dijkstra algo has been dethroned. Exciting. [bsky, 6 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 3 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 3 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 2 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 2 points, 0 comments]
- Que paja, yo está semana leí uno piola que no era de IA por si andas con ganas de leer fuera de lo laboral 😅: arxiv.org/pdf/2504.17033 [bsky, 2 points, 1 comments]
- 이번에 다익스트라보다 빠른 최단 경로 알고리즘이 나왔다고 해서 논문을 읽어봤는데 역시 어려워서 나가떨어졌다 arxiv.org/abs/2504.17033 [bsky, 2 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 2 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [pdf] [hn, 2 points, 1 comments]
- Según dicen, es O(m log^2/3 n), en lugar del O(m + n log n) de Dijkstra. Aquí el paper: arxiv.org/abs/2504.17033 [bsky, 2 points, 0 comments]
- Not sure how I missed this, but Dijkstra's algorithm has been beaten on sparse graphs 😮 arxiv.org/abs/2504.17033 (Unsurprisingly, this got a STOC'25 best paper award.) [bsky, 2 points, 1 comments]
- So, Dijkstra's run was from 1956 to 2025! What a run! arxiv.org/abs/2504.17033 [bsky, 2 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 2 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 2 points, 0 comments]
- נייס New Method Is the Fastest Way To Find the Best Routes arxiv.org/pdf/2504.17033 [bsky, 1 points, 0 comments]
- “A team from Tsinghua University has broken Dijkstra's "sorting barrier" - the first improvement since 1984.” arxiv.org/pdf/2504.17033 [bsky, 1 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths https://lobste.rs/s/hct5qg #compsci [bsky, 1 points, 0 comments]
- @dphrygian.com Did you see this - arxiv.org/abs/2504.17033 ? [bsky, 1 points, 1 comments]
- I am pretty far removed from academic computer science these days, but this popped up in a recommended article, and just as a result, this is very cool. I will try to file this away as weird trivia. a [bsky, 1 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [hn, 1 points, 0 comments]
- A new shortest-path graph algorithm has emerged to take on good old Djikstra, however with the usual academic fine-print where in this case it's only relevant for sparse graphs: Paper: arxiv.org/abs/2 [bsky, 1 points, 0 comments]
- Researchers have broken the “sorting barrier” for directed Single-Source Shortest Paths (SSSP). 📉 New deterministic algorithm: O(m log^(2/3) n) ⚡ Beats Dijkstra’s O(m + n log n) after decades! 📄 Pap [bsky, 1 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [bsky, 1 points, 0 comments]
- arxiv.org/abs/2504.17033 #Sorting [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths https://arxiv.org/abs/2504.17033 (https://news.ycombinator.com/item?id=44844257) [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths https://arxiv.org/abs/2504.17033 (https://news.ycombinator.com/item?id=44844257) [bsky, 0 points, 0 comments]
- New results for the SPF problem, AFAIK the only improvement in 40+ years: Breaking the Sorting Barrier for Directed Single-Source Shortest Paths https://arxiv.org/pdf/2504.17033 [bsky, 0 points, 0 comments]
- Wut.? Ok, this is very cool. arxiv.org/abs/2504.17033 I mean, it's *cool*, it nerdy in the extreme. But it's nerdy cool. Didn't this was possible at all. TL;DR - Someone has found a way to beat Dijkst [bsky, 0 points, 0 comments]
- Read the paper with the catchy title "Breaking the Sorting Barrier for Directed Single-Source Shortest Paths" arxiv.org/abs/2504.17033 [bsky, 0 points, 1 comments]
- Groundbreaking research has broken the 65-year "sorting barrier" for shortest path math. Using a new divide-and-conquer method, it surpasses Dijkstra’s algorithm to find routes in directed networks fa [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths #HackerNews https://arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths https://arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- New algorithm beats Dijkstra's time for shortest paths in directed graphs arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- El mejor algoritmo en 41 años. Mejora el algoritmo clásico de Dijkstra. Funciona más rápido sin complicaciones. Lo consigue un equipo chino. Aquí el Paper: arxiv.org/pdf/2504.17033 #Maps #IA [bsky, 0 points, 0 comments]
- Interesting… First improvement of the shortest path algorithm in 41 years. May be most effective for large and sparse graphs. arxiv.org/pdf/2504.17033 [bsky, 0 points, 0 comments]
- A ceux qui aiment la Comuter Science !! arxiv.org/pdf/2504.17033 [bsky, 0 points, 0 comments]
- I haven't had the time to read through the paper, but this new one that just came out proposes a breakthrough algorithm that beats Dijkstra's. Looking forward to having my time cleared up to read this [bsky, 0 points, 0 comments]
- Breaking the Sorting Barrier for Directed Single-Source Shortest Paths https://arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- ⚡ Hackernews Top story: Breaking the Sorting Barrier for Directed Single-Source Shortest Paths [bsky, 0 points, 0 comments]
- 中国・清華大学の研究チームが 41年ぶりにダイクストラ法を超える最短経路探索アルゴリズムを改善した模様 応用可能性 ・リアルタイム経路探索の高速化 ナビゲーション、渋滞回避、配送経路最適化 ・ネットワーク最適化 通信ルーティングやデータセンターの経路選択 arxiv.org/pdf/2504.17033 [bsky, 0 points, 0 comments]
- 最近、ダイクストラを撃墜するのが流行ってるっぽい。 疎なグラフならなんとかなる感じ? arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- E não é que criaram um algoritmo melhor do que o do meu mano Dijkstra?? arxiv.org/pdf/2504.17033 [bsky, 0 points, 0 comments]
- This is one of the most important papers in quite some time... arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- Every CS student had to learn/implement the Dijkstra shortest path algorithm. An algorithm came out improving this for sparse graphs (O(m log^(2/3) n complexity). Interesting! arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
- “This is the first result to break the O(m+nlogn) time bound of Dijkstra's algorithm on sparse graphs, showing that Dijkstra's algorithm is not optimal for SSSP.” arxiv.org/abs/2504.17033 [bsky, 0 points, 0 comments]
Related