English

Additive, Near-Additive, and Multiplicative Approximations for APSP in Weighted Undirected Graphs: Trade-offs and Algorithms

Data Structures and Algorithms 2026-02-17 v2

Abstract

We present a +2i=1k+1Wi+2\sum_{i=1}^{k+1}{W_i}-APASP algorithm for dense weighted graphs with runtime O~(n2+13k+2)\tilde O\left(n^{2+\frac{1}{3k+2}}\right), where WiW_{i} is the weight of an ithi^{th} heaviest edge on a shortest path. Dor, Halperin and Zwick [FOCS'96, SICOMP'00] had two algorithms for the commensurate unweighted +2(k+1)+2\cdot\left( k+1\right)-APASP: O~(n21k+2m1k+2)\tilde O\left(n^{2-\frac{1}{k+2}}m^{\frac{1}{k+2}}\right) runtime for sparse graphs and O~(n2+13k+2)\tilde O\left(n^{2+\frac{1}{3k+2}}\right) runtime for dense graphs. Cohen and Zwick [SODA'97, JALG'01] adapted the sparse variant to weighted graphs: +2i=1k+1Wi+2\sum_{i=1}^{k+1}{W_i}-APASP algorithm in the same runtime. We show an algorithm for dense weighted graphs. For nearly additive APASP, we present a (1+ε,min{2W1,4W2})\left(1+\varepsilon,\min{\left\{2W_1,4W_{2}\right\}}\right)-APASP algorithm with O~((1ε)O(1)n2.15135313logW)\tilde O\left(\left(\frac{1}{\varepsilon}\right)^{O\left(1\right)}\cdot n^{2.15135313}\cdot\log W\right) runtime. This improves the (1+ε,2W1)\left(1+\varepsilon,2W_1\right)-APASP of Saha and Ye [SODA'24]. For multiplicative APASP, we show a framework of (3+4+2+ε)\left(\frac{3\ell +4}{\ell + 2}+\varepsilon\right)-APASP algorithms, reducing the runtime of Akav and Roditty [ESA'21] for dense graphs and generalizing the (2+ε)\left(2+\varepsilon\right)-APASP algorithm of Dory et al [SODA'24]. Our base case is a (73+ε)\left(\frac{7}{3}+\varepsilon\right)-APASP in O~((1ε)O(1)n2.15135313logW)\tilde O\left(\left(\frac{1}{\varepsilon}\right)^{O\left(1\right)}\cdot n^{2.15135313}\cdot \log W\right) runtime, improving the 73\frac{7}{3}-APASP algorithm of Baswana and Kavitha [FOCS'06, SICOMP'10] for dense graphs. Finally, we "bypass" an Ω~(nω)\tilde \Omega \left(n^\omega\right) conditional lower bound by Dor, Halperin, and Zwick for α\alpha-APASP with α<2\alpha < 2, by allowing an additive term (e.g. (6k+33k+2,i=1k+1Wi)\left(\frac{6k+3}{3k+2},\sum_{i=1}^{k+1}W_{i}\right)-APASP in O~(n2+13k+2)\tilde O\left(n^{2+\frac{1}{3k+2}}\right) runtime).

Keywords

Cite

@article{arxiv.2509.04640,
  title  = {Additive, Near-Additive, and Multiplicative Approximations for APSP in Weighted Undirected Graphs: Trade-offs and Algorithms},
  author = {Liam Roditty and Ariel Sapir},
  journal= {arXiv preprint arXiv:2509.04640},
  year   = {2026}
}