Let G be a weighted (directed) graph with n vertices and m edges. Given a source vertex s, Dijkstra’s algorithm computes the shortest path lengths from s to all other vertices in O(m + n log n) time. This bound is known to be worst-case optimal via a reduction to sorting. Theoretical computer science has developed numerous fine-grained frameworks for analyzing algorithmic performance beyond standard worst-case analysis, such as instance optimality and output sensitivity. Haeupler, Hladík, Rozhoň, Tarjan, and Tětek [FOCS '24] consider the notion of universal optimality, a refined complexity measure that accounts for both the graph topology and the edge weights. For a fixed graph topology, the universal running time of a weighted graph algorithm is defined as its worst-case running time over all possible edge weightings of G. An algorithm is universally optimal if no other algorithm achieves a better asymptotic universal running time on any particular graph topology. Haeupler, Hladík, Rozhoň, Tarjan, and Tětek show that Dijkstra’s algorithm can be made universally optimal by replacing the heap with a custom data structure. Their approach builds on Iacono’s [SWAT '00] working-set bound ϕ(x). This is a technical definition that, intuitively, for a heap element x, counts the maximum number of simultaneously-present elements y that were pushed onto the heap whilst x was in the heap. They design a new heap data structure that can pop an element x in O(1 + log ϕ(x)) time. They show that Dijkstra’s algorithm with their heap data structure is universally optimal. In this work, we revisit their result. We use a simpler heap property that we will call timestamp optimality, where the cost of popping an element x is logarithmic in the number of elements inserted between pushing and popping x. We show that timestamp optimal heaps are not only easier to define but also easier to implement. Using these time stamps, we provide a significantly simpler proof that Dijkstra’s algorithm, with the right kind of heap, is universally optimal.
@InProceedings{vanderhoog_et_al:LIPIcs.ESA.2025.71, author = {van der Hoog, Ivor and Rotenberg, Eva and Rutschmann, Daniel}, title = {{Simpler Universally Optimal Dijkstra}}, booktitle = {33rd Annual European Symposium on Algorithms (ESA 2025)}, pages = {71:1--71:9}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-395-9}, ISSN = {1868-8969}, year = {2025}, volume = {351}, editor = {Benoit, Anne and Kaplan, Haim and Wild, Sebastian and Herman, Grzegorz}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2025.71}, URN = {urn:nbn:de:0030-drops-245390}, doi = {10.4230/LIPIcs.ESA.2025.71}, annote = {Keywords: Graph algorithms, instance optimality, Fibonnacci heaps, simplification} }
Feedback for Dagstuhl Publishing