Papers
Topics
Authors
Recent
Search
2000 character limit reached

All-Pairs Shortest Paths with Few Weights per Node

Published 24 Jun 2025 in cs.DS | (2506.20017v1)

Abstract: We study the central All-Pairs Shortest Paths (APSP) problem under the restriction that there are at most dd distinct weights on the outgoing edges from every node. For d=nd=n this is the classical (unrestricted) APSP problem that is hypothesized to require cubic time n<sup>3−o(1)n<sup>{3-o(1)}, and at the other extreme, for d=1d=1, it is equivalent to the Node-Weighted APSP problem. We present new algorithms that achieve the following results: 1. Node-Weighted APSP can be solved in time O~(n<sup>(3+ω)/2)</sup>=O~(n<sup>2.686)\tilde{O}(n<sup>{(3+\omega)/2})</sup> = \tilde{O}(n<sup>{2.686}), improving on the 15-year-old subcubic bounds O~(n<sup>(9+ω)/4)</sup>=O~(n<sup>2.843)\tilde{O}(n<sup>{(9+\omega)/4})</sup> = \tilde{O}(n<sup>{2.843}) [Chan; STOC '07] and O~(n<sup>2.830)\tilde{O}(n<sup>{2.830}) [Yuster; SODA '09]. This positively resolves the question of whether Node-Weighted APSP is an ``intermediate'' problem in the sense of having complexity n<sup>2.5+o(1)n<sup>{2.5+o(1)} if ω=2\omega=2, in which case it also matches an n<sup>2.5−o(1)n<sup>{2.5-o(1)} conditional lower bound. 2. For up to d≤n<sup>3−ω−ϵd \leq n<sup>{3-\omega-\epsilon} distinct weights per node (where $\epsilon &gt; 0$), the problem can be solved in subcubic time O(n<sup>3−f(ϵ))O(n<sup>{3-f(\epsilon)}) (where $f(\epsilon) &gt; 0$). In particular, assuming that ω=2\omega = 2, we can tolerate any sublinear number of distinct weights per node d≤n<sup>1−ϵd \leq n<sup>{1-\epsilon}, whereas previous work [Yuster; SODA '09] could only handle d≤n<sup>1/2−ϵd \leq n<sup>{1/2-\epsilon} in subcubic time. This promotes our understanding of the APSP hypothesis showing that the hardest instances must exhaust a linear number of weights per node. Our result also applies to the All-Pairs Exact Triangle problem, thus generalizing a result of Chan and Lewenstein on "Clustered 3SUM" from arrays to matrices. Notably, our technique constitutes a rare application of additive combinatorics in graph algorithms.

Summary

No one has generated a summary of this paper yet.

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.

Continue Learning

We haven't generated follow-up questions for this paper yet.