Papers
Topics
Authors
Recent
Search
2000 character limit reached

Improved Approximation Algorithms for n-Pairs Shortest Paths

Published 2 Jul 2026 in cs.DS | (2607.02443v1)

Abstract: Let G=(V,E)G = (V, E) be a graph with n=∣V∣n = |V| nodes and m=∣E∣m = |E| edges. The tt-Pairs Shortest Paths problem, introduced by Cohen [FOCS'93; SICOMP'99], asks to approximate the distances between tt prespecified pairs of vertices. Recently, this problem has received renewed attention, particularly in the case where t=Θ(n)t = Θ(n): the nn-Pairs Shortest Paths problem. In this setting, new algorithms and conditional lower bounds have been developed by Dalirrooyfard, Jin, Vassilevska Williams, and Wein [FOCS'22], and Chechik, Hoch, and Lifshitz [SODA'25]. In this paper, we present the first algorithm for the nn-Pairs Shortest Paths problem in \textit{weighted} undirected graphs that achieves a (2−α)k(2 - α)k-approximation, for constant $α&gt; 0$, that runs in O~(mn<sup>1/k</sup>+n<sup>1</sup>+2/k)\tilde{O}(mn<sup>{1/k}</sup> + n<sup>{1</sup> + 2/k}) time. Specifically, we present a $1.622k$-approximation, improving upon the (2k−3)(2k - 3)-approximation of Chechik, Hoch, and Lifshitz [SODA'25] for graphs that are not super sparse, which answers in the affirmative the open question posed by them. We also develop improved approximation algorithms with better tradeoffs for unweighted graphs and dense weighted graphs that improve upon the results of Dalirrooyfard \etal~and Chechik, Hoch, and Lifshitz. Our main technical contribution is the new \textit{heavy-edge} technique. Using this technique, we transform an algorithm with an approximation guarantee that depends on WuvW_{uv}, the weight of the heaviest edge on the shortest path between uu and vv, into an algorithm with purely multiplicative approximation that does not depend on WuvW_{uv}.

Summary

  • The paper introduces the heavy-edge technique, achieving a 1.622k-approximation for weighted n-Pairs Shortest Paths.
  • It leverages structural simplification and symbolic optimization to surpass the traditional 2k-O(1) approximation barrier.
  • The approach extends to unweighted graphs and dense regimes, enabling near-linear time performance for sparse queries.

Improved (2−α)k-Approximation Algorithms for n-Pairs Shortest Paths

Problem Context and Motivation

The nn-Pairs Shortest Paths (nn-PSP) problem asks for efficient approximation of shortest path distances between nn prespecified pairs of nodes in a given graph. Unlike traditional APSP or SSSP, this problem focuses on minimizing computational time for a sparse set of queries, rather than optimizing storage space or query time for arbitrary pairs. While early solutions leveraging approximate distance oracles (ADOs) provide general (2k−1)(2k-1)-approximation in O~(mn1/k)\tilde{O}(mn^{1/k}) time for all-pairs queries, recent research in fine-grained complexity highlights gaps in this approach for nn-PSP (with t=nt=n). Notably, previous work established a (2k−3)(2k-3)-approximation as the best known for weighted graphs in the regime t=nt=n [SODA'25], while the question of surpassing the multiplicative $2k - O(1)$ bound in this regime remained open.

Main Contributions

This work delivers the first nn0-PSP algorithm for weighted undirected graphs that surpasses the nn1 multiplicative barrier, achieving a nn2-approximation in nn3 time. This strictly improves the previous nn4-approximation for all nn5. The core technical result is introduction of the "heavy-edge technique", which allows conversion of an algorithm whose approximation depended on the heaviest edge weight along shortest paths into one with a purely multiplicative stretch--without dependence on local heaviest edges.

Complementary advances are also provided for:

  • Unweighted undirected graphs, removing additive error and tightening approximation to nn6.
  • The dense weighted graph regime, with a new nn7-approximation nn8-PSP algorithm in nn9 time.
  • Weighted graphs with more than nn0 queries, providing flexible performance trade-offs.

These results decisively answer the open problem from [SODA'25] regarding the possibility of breaking the nn1 approximation barrier for nn2-PSP in nn3 time.

Methodological Innovations

Warm-Up and Structural Simplification

A structural simplification of prior unweighted approaches is first established: it suffices to consider a single near-midpoint vertex along the shortest nn4-nn5 path when constructing a nn6-approximation. Tight analysis enables removal of additive error when nn7 is even.

Lifting to Weighted Graphs: From nn8-Dependent Approximations to Pure Stretch

In the weighted setting, simply adapting the warm-up construction only yields an additive error proportional to nn9, the weight of the heaviest edge along the shortest (2k−1)(2k-1)0-(2k−1)(2k-1)1 path. The breakthrough is the heavy-edge technique: for any presumed "heavy" edge (2k−1)(2k-1)2 along (2k−1)(2k-1)3, estimate (2k−1)(2k-1)4 as

(2k−1)(2k-1)5

with the subpaths approximated using existing ADO techniques. Critically, the algorithm considers all edges as potential heavy edges for all queries, populates a hash table of such candidate combinations, and uses a final minimization over all possible bunch-to-bunch traversals. This breaks the (2k−1)(2k-1)6 multiplicative barrier even when the heaviest edge dominates the true distance.

Analytical Techniques for Optimal Stretch

The stretch analysis stratifies by whether there is a near-midpoint cut with small (2k−1)(2k-1)7 or a genuinely heavy edge. In both cases, tight bounds are derived with respect to (2k−1)(2k-1)8 and a calibration parameter (2k−1)(2k-1)9. The parameter is set via symbolic optimization to globally minimize the worst-case stretch, yielding the O~(mn1/k)\tilde{O}(mn^{1/k})0 constant.

Dense Graphs and O~(mn1/k)\tilde{O}(mn^{1/k})1-PSP Trade-offs

For dense graphs and arbitrary O~(mn1/k)\tilde{O}(mn^{1/k})2 queries, the approach uses a O~(mn1/k)\tilde{O}(mn^{1/k})3-emulator construction inspired by Baswana--Sen spanners, but takes advantage of known sparsification properties for edges deleted in earlier or later emulator construction stages. The analysis yields a O~(mn1/k)\tilde{O}(mn^{1/k})4-approximation in time O~(mn1/k)\tilde{O}(mn^{1/k})5, improving prior results for large O~(mn1/k)\tilde{O}(mn^{1/k})6 in dense graphs.

Numerical Advances and Theoretical Claims

The work delivers:

  • O~(mn1/k)\tilde{O}(mn^{1/k})7-approximation for O~(mn1/k)\tilde{O}(mn^{1/k})8-PSP in weighted graphs in O~(mn1/k)\tilde{O}(mn^{1/k})9 time. This beats previous nn0-approximation results and is valid for all nn1.
  • Improved unweighted algorithm with stretch nn2, completely eliminating additive terms for even distances.
  • nn3-approximation for nn4-PSP in weighted graphs (with nn5) in near-linear time for sufficiently dense graphs.

In contradiction to earlier conjectures, the existence of an nn6-approximation in this time range is established for nn7-PSP in weighted graphs.

Implications, Limitations, and Future Directions

The heavy-edge technique is modular and may be incorporated into other algorithms where path quality previously depended explicitly on local edge characteristics, potentially impacting designs of ADOs, spanners, distance preservers, and other distance-sensitive structures across graph classes. The strict separation between nn8-PSP and classical ADO lower bounds is further clarified. For applications, these results lead to faster approximate pathfinding in large-scale networks with sparse queries, particularly in contexts such as transportation, distributed computing, and dynamic network analysis.

Future directions include:

  • Tightening the multiplicative stretch constant and determining lower bounds matching the observed nn9-approximation.
  • Extending techniques to dynamic, directed, and negative-weight edge models.
  • Investigating the potential applicability in labeling schemes and compact routing architectures.
  • Developing data structures that combine the optimal stretch-time tradeoff of the heavy-edge technique with the space efficiency of ADOs.

Conclusion

This work achieves the first algorithm for t=nt=n0-PSP in general weighted graphs with multiplicative approximation strictly smaller than t=nt=n1 in t=nt=n2 time and introduces the heavy-edge technique as a general-purpose tool for eliminating dependence on local path bottlenecks in distance approximation frameworks. These results refine the structural complexity landscape for fine-grained graph distance computation and set new reference points for algorithmic tradeoffs in both theory and practice (2607.02443).

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.