🤖 AI Summary
This paper studies the all-pairs shortest paths (APSP) problem on directed graphs where each vertex has at most $d$ distinct weights among its outgoing edges. It introduces additive combinatorics—novel in graph algorithm design—combined with fast matrix multiplication, divide-and-conquer techniques, and conditional lower-bound analysis, to significantly improve the time complexity for vertex-weighted APSP. The algorithm achieves $ ilde{O}(n^{2.686})$ time, improving upon the previous best $ ilde{O}(n^{2.843})$. Moreover, it establishes that APSP remains solvable in truly subcubic time whenever $d leq n^{3-omega-varepsilon}$, where $omega < 2.373$ is the matrix multiplication exponent. This work extends the tractability frontier for APSP under sparse weight structures and introduces a new paradigm for designing efficient algorithms on weighted graphs.
📝 Abstract
We study the central All-Pairs Shortest Paths (APSP) problem under the restriction that there are at most $d$ distinct weights on the outgoing edges from every node. For $d=n$ this is the classical (unrestricted) APSP problem that is hypothesized to require cubic time $n^{3-o(1)}$, and at the other extreme, for $d=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 $ ilde{O}(n^{(3+ω)/2}) = ilde{O}(n^{2.686})$, improving on the 15-year-old subcubic bounds $ ilde{O}(n^{(9+ω)/4}) = ilde{O}(n^{2.843})$ [Chan; STOC '07] and $ ilde{O}(n^{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^{2.5+o(1)}$ if $ω=2$, in which case it also matches an $n^{2.5-o(1)}$ conditional lower bound.
2. For up to $d leq n^{3-ω-ε}$ distinct weights per node (where $ε> 0$), the problem can be solved in subcubic time $O(n^{3-f(ε)})$ (where $f(ε) > 0$). In particular, assuming that $ω= 2$, we can tolerate any sublinear number of distinct weights per node $d leq n^{1-ε}$, whereas previous work [Yuster; SODA '09] could only handle $d leq n^{1/2-ε}$ 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.