Skip to content

Shortest Paths with Linear Edge Weights

Suryajith Chillara, Kshitij Gajjar, Nithish Raja

cs.DS

Abstract

We study shortest paths in directed graphs whose edge weights are of the form wt(e)=ae,1λ1+ae,2λ2+ae,3λ3+⋯+ae,dλd+ae,d+1.\mathsf{wt}(e) = a_{e,1} λ_1 + a_{e,2} λ_2 + a_{e,3} λ_3 + \cdots + a_{e,d} λ_d + a_{e,d+1}. Here, each ae,i∈Ra_{e,i}\in\mathbb{R} is a fixed constant for each edge ee, whereas each λi∈Rλ_i\in\mathbb{R} is common across the entire graph. So, there could be different shortest paths in the graph for different values of the λiλ_i's. This is called the Parametric Shortest Paths problem, and has been studied since the 1980s. For d=1d=1, Carstensen (1983) showed that the number of shortest paths in nn-vertex graphs is at most nO(log⁡n)n^{O(\log n)}. She also proved a matching lower bound of nΩ(log⁡n)n^{Ω(\log n)}, later refined by Mulmuley & Shah (2001). For d=2d=2, Gajjar & Radhakrishnan (2019) showed an upper bound of nO(log⁡2n)n^{O(\log^2 n)}. Barth, Funke & Proissl (2022) generalized their result to prove an upper bound of nOd(log⁡dn)n^{O_d(\log^d n)} for all positive integers dd. The lower bound did not undergo any improvement over the years. In this paper, we close this long line of research by showing an nO(dlog⁡n)n^{O(d\log n)} upper bound for all positive integers dd, exponentially improving the previous upper bound. We observe that a matching lower bound of nΩ(dlog⁡n)n^{Ω(d\log n)} can be obtained from earlier works. We also show that our proof can be adapted to work for undirected graphs with positive edge weights. Furthermore, for directed graphs whose edge weights are univariate polynomials of degree at most qq, we prove an upper bound of nO(log⁡n+log⁡q)n^{O(\log{n}+\log{q})}. Finally, building upon work on the Point Location problem by Ezra, Har-Peled, Kaplan & Sharir (2020), we construct a Shortest Path Oracle which takes as input a point x‾∈Rd\overline{x}\in \mathbb{R}^d, and outputs a shortest path at λ‾=x‾\overlineλ=\overline{x} in sublinear time (for a wide regime of dd).

Create a lesson

Metadata

Categories
cs.DS, cs.CC, cs.CG, cs.DM
Comments
21 pages, 6 figures; to be presented at FOCS 2026