Lune

FOCS2024Top-tier venue

Universal Optimality of Dijkstra Via Beyond-Worst-Case Heaps

Bernhard Haeupler, Richard Hladík, Václav Rozhon, Robert E. Tarjan, Jakub Tetek

Abstract

In this paper we prove that Dijkstra's shortest-path algorithm, if implemented with a sufficiently efficient heap, is universally optimal in its running time, and with suitable small additions is also universally optimal in its number of comparisons.

Universal optimality is a powerful beyond-worst-case performance guarantee for graph algorithms that informally states that a single algorithm on a problem involving graphs with arc and/or vertex weights performs as well as possible on every graph, assuming a worst-case choice of weights. We give the first application of this notion to any sequential algorithm.

We design a new heap data structure with a working-set bound, which guarantees that the heap takes advantage of a certain kind of locality in the heap operations. Our heap has the optimal (amortized) bounds of Fibonacci heaps but also has the beyond-worst-case guarantee that the cost of deleting the minimum item is logarithmic in the number of items inserted after it but before it is deleted, instead of logarithmic in the size of the heap when the item is deleted. That is, deletion of recently inserted items is especially efficient.

We prove that our working-set bound guarantees universal optimality for the problem of ordering vertices by their distance from the source vertex, which we call the distance order problem. Our result relies on the observation that the sequence of heap operations generated by any run of Dijkstra's algorithm on a fixed graph possesses enough locality that one can couple the number of comparisons performed by any heap with our working-set bound to the minimum number of comparisons required to solve the distance order problem on this graph for a worst-case choice of arc lengths.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Trust Region Interior Point Methods: Optimal ℓ₂- and Faster Wide-Neighborhood Path Following cites Breaking the Sorting Barrier for Directed Single-Source Shortest Paths
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Breaking the Sorting Barrier for Directed Single-Source Shortest PathsRan Duan, Jiayi Mao, Xiao Mao, Xinkai Shu et al.STOC 2025 · 8 citations
  2. Beyond Trajectory-Level Attribution: Graph-Based Credit Assignment for Agentic Reinforcement LearningCheng Xin, Shuo He, Lang Feng, Haiyang Xu et al.ICML 2026 · 6 citations
  3. Fast and Simple Sorting Using Partial InformationBernhard Haeupler, Richard Hladík, John Iacono, Václav Rozhon et al.SODA 2025 · 3 citations
  4. Trust Region Interior Point Methods: Optimal ℓ₂- and Faster Wide-Neighborhood Path FollowingDaniel Dadush, Haoyuan Ma, Bento Natura, László A. VéghSTOC 2026 · 1 citation

Builds on6

  1. Undirected (1+ε)-shortest paths via minor-aggregates: near-optimal deterministic parallel and distributed algorithmsVáclav Rozhon, Christoph Grunau, Bernhard Haeupler, Goran Zuzic et al.STOC 2022 · 22 citations
  2. Hop-constrained expander decompositions, oblivious routing, and distributed universal optimalityBernhard Haeupler, Harald Räcke, Mohsen GhaffariSTOC 2022 · 19 citations
  3. Breaking the Sorting Barrier for Directed Single-Source Shortest PathsRan Duan, Jiayi Mao, Xiao Mao, Xinkai Shu et al.STOC 2025 · 8 citations
  4. Universally-Optimal Distributed Shortest Paths and Transshipment via Graph-Based ℓ1-Oblivious RoutingGoran Zuzic, Gramoz Goranci, Mingquan Ye, Bernhard Haeupler et al.SODA 2022 · 7 citations
  5. Fast and Simple Sorting Using Partial InformationBernhard Haeupler, Richard Hladík, John Iacono, Václav Rozhon et al.SODA 2025 · 3 citations

Related papers

  1. A Randomized Algorithm for Single-Source Shortest Path on Undirected Real-Weighted GraphsRan Duan, Jiayi Mao, Xinkai Shu, Longhui YinFOCS 2023 · 6 citations
  2. Functional Correctness of C Implementations of Dijkstra's, Kruskal's, and Prim's AlgorithmsAnshuman Mohan, Wei Xiang Leow, Aquinas HoborCAV 2021 · 11 citations
  3. All-Hops Shortest PathsVirginia Vassilevska Williams, Zoe Xi, Yinzhan Xu, Uri ZwickSODA 2025
  4. Distances and shortest paths on graphs of bounded highway dimension: simple, fast, dynamicSébastien Collette, John IaconoSODA 2024 · 1 citation
  5. Universally-optimal distributed algorithms for known topologiesBernhard Haeupler, David Wajc, Goran ZuzicSTOC 2021
Dusk over the sea between two cliffs drawn in fine vertical lines