All-Pairs Shortest Paths for Real-Weighted Undirected Graphs with Small Additive Error

Author Timothy M. Chan

Thumbnail PDF


  • Filesize: 0.65 MB
  • 9 pages

Document Identifiers

Author Details

Timothy M. Chan
  • Department of Computer Science, University of Illinois at Urbana-Champaign, IL, USA

Cite AsGet BibTex

Timothy M. Chan. All-Pairs Shortest Paths for Real-Weighted Undirected Graphs with Small Additive Error. In 29th Annual European Symposium on Algorithms (ESA 2021). Leibniz International Proceedings in Informatics (LIPIcs), Volume 204, pp. 27:1-27:9, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2021)


Given a graph with n vertices and real edge weights in [0,1], we investigate an approximate version of the standard all-pairs shortest paths (APSP) problem where distances are estimated with additive error at most ε. Yuster (2012) introduced this natural variant of approximate APSP, and presented an algorithm for directed graphs running in Õ(n^{(3+ω)/2}) ≤ O(n^{2.687}) time for an arbitrarily small constant ε > 0, where ω denotes the matrix multiplication exponent. We give a faster algorithm for undirected graphs running in Õ(n^{(3+ω²)/(ω+1)}) ≤ O(n^{2.559}) time for any constant ε > 0. If ω = 2, the time bound is Õ(n^{7/3}), matching a previous result for undirected graphs by Dor, Halperin, and Zwick (2000) which only guaranteed additive error at most 2.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • Shortest paths
  • approximation
  • matrix multiplication


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Donald Aingworth, Chandra Chekuri, Piotr Indyk, and Rajeev Motwani. Fast estimation of diameter and shortest paths (without matrix multiplication). SIAM J. Comput., 28(4):1167-1181, 1999. Google Scholar
  2. Josh Alman and Virginia Vassilevska Williams. A refined laser method and faster matrix multiplication. In Proceedings of the 32nd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 522-539, 2021. URL:
  3. Noga Alon, Zvi Galil, and Oded Margalit. On the exponent of the all pairs shortest path problem. J. Comput. Syst. Sci., 54(2):255-262, 1997. Google Scholar
  4. Surender Baswana, Telikepalli Kavitha, Kurt Mehlhorn, and Seth Pettie. Additive spanners and (α, β)-spanners. ACM Trans. Algorithms, 7(1):5:1-5:26, 2010. URL:
  5. Karl Bringmann, Marvin Künnemann, and Karol Wegrzycki. Approximating APSP without scaling: equivalence of approximate min-plus and exact min-max. In Proceedings of the 51st Annual ACM Symposium on Theory of Computing (STOC), pages 943-954, 2019. Google Scholar
  6. Timothy M. Chan. More algorithms for all-pairs shortest paths in weighted graphs. SIAM J. Comput., 39(5):2075-2089, 2010. URL:
  7. Timothy M. Chan. All-pairs shortest paths for unweighted undirected graphs in o(mn) time. ACM Trans. Algorithms, 8(4):34:1-34:17, 2012. URL:
  8. Timothy M. Chan and R. Ryan Williams. Deterministic APSP, orthogonal vectors, and more: Quickly derandomizing Razborov-Smolensky. ACM Trans. Algorithms, 17(1):2:1-2:14, 2021. URL:
  9. Timothy M. Chan, Virginia Vassilevska Williams, and Yinzhan Xu. Algorithms, reductions and equivalences for small weight variants of all-pairs shortest paths. CoRR, abs/2102.06181, 2021. To appear in ICALP'21. URL:
  10. Shiri Chechik. New additive spanners. In Proceedings of the 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 498-512, 2013. URL:
  11. Don Coppersmith and Shmuel Winograd. Matrix multiplication via arithmetic progressions. J. Symb. Comput., 9(3):251-280, 1990. URL:
  12. Dorit Dor, Shay Halperin, and Uri Zwick. All-pairs almost shortest paths. SIAM J. Comput., 29(5):1740-1759, 2000. Google Scholar
  13. Michael L. Fredman. New bounds on the complexity of the shortest path problem. SIAM J. Comput., 5(1):83-89, 1976. URL:
  14. Zvi Galil and Oded Margalit. Witnesses for Boolean matrix multiplication and for transitive closure. J. Complex., 9(2):201-221, 1993. Google Scholar
  15. Zvi Galil and Oded Margalit. All pairs shortest paths for graphs with small integer length edges. J. Comput. Syst. Sci., 54(2):243-254, 1997. URL:
  16. Fabrizio Grandoni, Giuseppe F. Italiano, Aleksander Lukasiewicz, Nikos Parotsidis, and Przemyslaw Uznanski. All-pairs LCA in DAGs: Breaking through the O(n^2.5) barrier. In Proceedings of the 32nd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 273-289, 2021. URL:
  17. Francois Le Gall and Florent Urrutia. Improved rectangular matrix multiplication using powers of the Coppersmith-Winograd tensor. In Proceedings of the 29th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1029-1046, 2018. Google Scholar
  18. Liam Roditty and Asaf Shapira. All-pairs shortest paths with a sublinear additive error. In Proceedings of the 35th International Colloquium on Automata, Languages and Programming (ICALP), Part I, pages 622-633, 2008. Google Scholar
  19. Raimund Seidel. On the all-pairs-shortest-path problem in unweighted undirected graphs. J. Comput. Syst. Sci., 51(3):400-403, 1995. Google Scholar
  20. Virginia Vassilevska Williams. On some fine-grained questions in algorithms and complexity. In Proceedings of the International Congress of Mathematicians (ICM), pages 3447-3487, 2018. Google Scholar
  21. R. Ryan Williams. Faster all-pairs shortest paths via circuit complexity. SIAM J. Comput., 47(5):1965-1985, 2018. URL:
  22. Raphael Yuster. Approximate shortest paths in weighted graphs. J. Comput. Syst. Sci., 78(2):632-637, 2012. Google Scholar
  23. Uri Zwick. All pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM, 49(3):289-317, 2002. Google Scholar