CS Paper Radar

Faster Directed SSSP on Digraphs with Random Sparse Supports or Few DFS Exceptions

Valery, Grishin, Aryeh Lev Zabokritskiy

cs.DS ·submitted 2026-11-22 18:02 UTC · v1

Abstract

We study exact single-source shortest paths (SSSP) in directed graphs with $n$ vertices, $m$ arcs and nonnegative real weights, in the comparison-addition model. This paper continues our earlier work, which gave a deterministic algorithm that takes $O(n\sqrt{\log n}(\log\log n)^{1/4})$ time when $m=O(n)$ and $O(n\sqrt{\log n}(\log\log n)^{5/8})$ time when $m=Θ(n\sqrt{\log\log n})$. Our two deterministic algorithms compute the distances on every input and take $O(n\sqrt{\log n})$ time on two families of inputs, one per density. The support of an input is its underlying simple undirected graph. When $m=O(n)$, the first algorithm takes $O(n\sqrt{\log n})$ time if no two simple cycles of the support with fewer than $P$ vertices share a vertex, where $P=Θ(\sqrt{\log n})$ depends only on the support. For fixed $c>0$, a uniformly random graph with $n$ vertices and $\lfloor cn\rfloor$ edges has this property with probability at least $1-n^{-1+o(1)}$, and the bound then holds for every choice of one or both directions of each edge, all weights and every source. The second family is defined through the depth-first search tree of the support that starts at the source and visits neighbours in identifier order. For fixed $k\ge1$, call a set $Y$ of exceptional vertices $k$-feasible if, for each nonroot vertex, at most $k$ of its proper ancestors are joined to its subtree by arcs whose endpoints avoid $Y$ and whose underlying edges lie outside the DFS tree. Given $k$ but not such a set, the second algorithm takes, for every $k$-feasible set $Y$ of total out-degree $d^+(Y)$, time $O_k(n+m+(1+|Y|)\log n+\sqrt{(n+m)d^+(Y)\log n})$. When $m=Θ(n\sqrt{\log\log n})$, this is $O_k(n\sqrt{\log n})$ if some $k$-feasible set has $O(n/\sqrt{\log n})$ vertices and total out-degree $O(n/\sqrt{\log\log n})$.

Comment
29 pages. Continuation of arXiv:2611.26453

Closest papers

Nearest neighbours by meaning across the whole index.

Improved Bounds for Directed SSSP in Sparse and Intermediate-Density Graphs

cs.DS ·2026-11-19 ·Valery, Grishin, Aryeh Lev Zabokritskiy
similarity 0.83
Abstract · 61 pages. Clarified Lemma 3.1 and the algorithmic notation, streamlined the presentation, and updated comparisons with prior bounds. Main bo…

We give a deterministic algorithm for exact single-source shortest paths (SSSP) in directed graphs with $n$ vertices, $m$ edges, and nonnegative real edge weights. When $m=O(n)$, it runs in $O(n\sqrt{\log n}(\log\log n)^{1/4})$ time. For $m=Θ(n)$, this lowers the exponent of $\log\log n$ in the bound of Duan, Mao, Shu and Yin from $1/2$ to $1/4$. At intermediate densities, writing $d=m/n$, the same algorithm improves on the bound of Duan et al. when $d\geq 3$ and $d\log(2+d)=o(\log\log n)$. For example, when $m=Θ(n\sqrt{\log\log n})$, it runs in $O(n\sqrt{\log n}(\log\log n)^{5/8})$ time, lowering their exponent from $3/4$ to $5/8$.

0.16

A Faster Undirected Single-Source Shortest Path Algorithm

cs.DS ·2026-09-14 ·Avi Kadria, Liam Roditty
similarity 0.80
Abstract

The single-source shortest paths (SSSP) problem in graphs with non-negative edge weights is one of the most classic problems in algorithms. For decades, the best known running time in the comparison-addition model was the $O(m+n\log n)$ bound of Dijkstra's algorithm with Fibonacci heaps. Recently, Duan, Mao, Shu, and Yin (FOCS'23) gave a randomized $O(m\log^{1/2} n \log\log^{1/2} n)$-time algorithm for SSSP in weighted undirected graphs. For weighted directed graphs, Duan, Mao, Mao, Shu, and Yin (STOC'25) gave an $O(m\log^{2/3} n)$-time algorithm for SSSP. Very recently, Duan, Mao, Shu, and Yin (ICALP'26) obtained an algorithm for directed graphs whose running time matches the $O(m\log^{1/2} n \log\log^{1/2} n)$ time of the undirected case. In this paper, we present a faster algorithm for SSSP in weighted undirected graphs, giving the first improvement in running time since the FOCS'23 breakthrough of Duan, Mao, Shu, and Yin. Our algorithm runs in $O(m\log^{1/2} n \log\log^{1/4} n \log\log\log^{1/4} n)$ time, improving the previous running time by a factor of $(\frac{\log\log n}{\log\log\log n})^{1/4}$. Our main contribution is a simple and efficient tool that computes, for every vertex, its distance to the nearest vertex in a random sample; this tool may be of independent interest.

0.12

A Simple Algorithm for the Directed Multiple Source Replacement Paths Problem

cs.DS ·2026-08-17 ·Kaito Harada, Taisuke Izumi
publishedtheory similarity 0.71
Abstract · 15 pages, 1 figure. To appear in SOSA 2027

In the replacement paths (RP) problem, we are given a graph $G = (V, E)$ with $n = |V|$ and $m = |E|$, together with two vertices $s, t \in V$, and are asked to compute the shortest-path distance from $s$ to $t$ in $G \setminus e$ for every failed edge $e \in E$. The multiple source replacement paths (MSRP) problem is its natural generalization: given a set $S \subseteq V$ of $σ$ sources, compute the replacement path distances for all pairs in $S \times V$. In this paper, we present a randomized combinatorial algorithm that solves MSRP on unweighted directed graphs in $\tilde{O}(m\sqrt{σn} + σn^2)$ time, with all the output distances correct with high probability. This improves the best known bound $\tilde{O}(m\min\{σ\sqrt{n}, n\} + σn^2)$ for directed graphs, which is obtained either by running the single source RP algorithm of Chechik and Magen [ICALP'20] from each source separately or by constructing and querying the all-pairs distance sensitivity oracle of Bernstein and Karger [STOC'09]. Our running time is essentially tight among combinatorial algorithms because Gupta, Jain, and Modi [PODC'20] proved a lower bound of $m{(σn)}^{1/2-o(1)}$ for such algorithms, which holds even on undirected graphs, and the additive term $σn^2$ is proportional to the time needed to write down the $Θ(σn^2)$ output distances. The algorithm is also remarkably simple.

0.40

Improved Massively Parallel Shortest Path Computation

cs.DC cs.DS ·2026-10-12 ·Yi-Jun Chang, Shaun Quek
hot direction similarity 0.71
Abstract

We present new algorithms for approximate shortest path computation in weighted undirected graphs within the Massively Parallel Computation (MPC) model. Specifically, we construct an $a$-approximate Single-Source Shortest Path (SSSP) oracle: Given a query consisting of a source vertex $u \in V$, the oracle returns $a$-approximate distances $δ(u,v)$ for all $v \in V$. Fix an $n$-vertex weighted undirected graph. We consider two regimes of the MPC model: the near-linear regime, where each machine has $\tildeΘ(n)$ memory, and the heterogeneous regime, where all machines have $Θ(n^γ)$ memory for some constant $γ\in (0,1]$, except for a single machine with $\tildeΘ(n)$ memory. We develop randomised algorithms that construct $O(1)$-approximate SSSP oracles in $O(\log\log n)$ rounds in the near-linear regime and in $O(\log^2\log n)$ rounds in the heterogeneous regime. These oracles answer distance queries in $O(1)$ rounds. Our results improve upon the recent work of Dory and Matar (SPAA 2024) which, for the same total memory, requires $\left(\log\log n\right)^{2+O(1/γ)}$ rounds and applies only to unweighted graphs in the heterogeneous setting. We say that $\tilde N_k(u)$ is the approximate $k$-nearest neighbourhood of a vertex $u$ if there exists an approximate distance estimate $δ$ such that $\tilde N_k(u)$ consists of the $k$ vertices closest to $u$ according to $δ$, breaking ties by vertex ID. The main technical ingredient is a new method for efficiently computing approximate $n^{O(γ)}$-nearest neighbourhoods in the heterogeneous MPC model in $O(\log^2\log n)$ rounds.

0.31

Partially Dynamic Single-Source Shortest Paths in Almost-Linear Time

cs.DS ·2026-10-05 ·Bin Cui, Hanqing Li, Xupeng Miao, Haoze Wang
similarity 0.69
Abstract · v2: Added a deterministic almost-linear-time incremental SSSP algorithm with efficient approximate path reporting

We study $(1+ε)$-approximate single-source distances in directed graphs with positive integer edge weights in $[1,W]$. For every $0<ε\le1$, we give deterministic data structures for either edge insertions or edge deletions with total update time $m^{1+o(1)}ε^{-1}\log W$, where $m\ge n$ bounds the total number of initially present and inserted edges. Both structures explicitly maintain approximate distance estimates, answer distance queries in constant time, and identify unreachable vertices exactly. The incremental structure additionally reports a simple $(1+ε)$-approximate source path $P$ in $O(|P|)$ time. Our decremental structure gives the first almost-linear-time algorithm. It improves the previous best randomized expected bound of $\widetilde O(\min\{n^2,mn^{2/3}\})$ against an oblivious adversary [BPW20]. Our incremental bound improves the $ε^{-B}$ dependence of the $B$-level recursive algorithm of [Liu26] to an explicit $ε^{-1}$ factor while retaining almost-linear dependence on $m$. Our algorithms use modified interior point methods. For edge deletions, we extend the single-pair distance framework of [vBCKLMPSS24] to all targets simultaneously. A shared potential and one dynamic minimum-ratio cut instance support global updates to the distance labels. Our main insight is that constant relative cut balance certifies approximate distances at every target. For edge insertions, we develop an analogous circulation-based formulation implemented through the dynamic minimum-ratio cycle structure of [CKLMP24]. We also give a black-box reduction from distance estimates to path reporting in incremental graphs, with $m^{1+o(1)}ε^{-1}\log W$ additional maintenance time. This reduction may be of independent interest.

0.21

Reachability Diameter: Beyond the Square-Root Barrier, with Polynomial Hardness

cs.DS ·2026-11-03 ·Hector Tierno, Shuang Yang
theory similarity 0.69
Abstract

The reachability diameter of a directed graph is the maximum finite shortest-path distance across all pairs of vertices. It has received recent attention under this name, although the underlying quantity has long played a central role in shortcut set and parallel reachability. Notably, Bals et al. establish hardness for every polynomial-factor approximation in nearly-linear time for weighted digraphs. Yet they give $n^{1/2+o(1)}$-approximation in the unweighted regime with nearly-linear running time, and their conditional lower bounds rule out certain constants only, leaving open whether polynomial loss is necessary. We give a randomized algorithm that estimates the reachability diameter of an unweighted digraph within a factor $n^{1/3+o(1)}$, with high probability, in $\widetilde{O}(m+n)$ time. We complement our algorithm with a lower bound conditional on the 3-uniform Hyperclique hypothesis, ruling out an $n^{2/15-\varepsilon}$-approximation in $\widetilde{O}(m+n)$ time for every fixed $\varepsilon\in(0,2/15)$, establishing the necessity of polynomial loss for nearly-linear time algorithms.

0.25

A Simple Optimal Algorithm for Directed Multi-Failure Replacement Paths

cs.DS ·2026-11-21 ·Kaito Harada, Tatsuya Terao
similarity 0.69
Abstract · 17 pages, 2 figures

Given a graph $G = (V, E)$ and two vertices $s, t \in V$, the $f$-fault replacement paths ($f$-FRP) problem asks to compute, for every set $F$ of at most $f$ edges, the distance from $s$ to $t$ in $G \setminus F$. In this paper, we present a $3$-FRP algorithm in deterministic $O(n^3 \log n)$ time for directed weighted graphs. We also present a deterministic $O(n^4)$ time algorithm for $4$-FRP in directed weighted graphs, which implies a deterministic $O(n^f)$ time algorithm for $f$-FRP for every $f \ge 4$. Since the output size of $f$-FRP can be $Θ(n^f)$, our algorithms are optimal for every $f \ge 4$ and nearly optimal for $f = 3$. Our algorithms also extend to the single-source and all-pairs settings with $f-1$ and $f-2$ failures, respectively, with the same time complexity as $f$-FRP. Moreover, our algorithms are remarkably simple.

0.16

A Deterministic Near-Linear Time Approximation Algorithm for Restricted Shortest Paths in Directed Graphs

cs.DS ·2026-10-13 ·Vikrant Ashvinkumar
similarity 0.69
Abstract · More detailed AI statement. Polished exposition and fixed typos

In the restricted shortest paths problem, we are given an $n$-vertex $m$-edge directed graph $G$ whose edges are assigned two non-negative weights (or resources) called lengths and costs, a source vertex $s$, and a cost threshold $C$. The goal is to find, for each target vertex $t$, the length of the shortest $(s,t)$-path whose total cost is at most $C$. Ashvinkumar, Bernstein, and Karczmarz (SODA 2025) gave the first randomized bicriteria $(1+\varepsilon,1+\varepsilon)$-approximate algorithm on directed graphs running in sub-$mn$ time, answering a problem posed by Bernstein (SODA 2012). We substantially improve this on two fronts, supplying a deterministic bicriteria $(1+\varepsilon,1+\varepsilon)$-approximate algorithm running in near-linear time. Our approach straightforwardly generalizes to more than two resources. For $k$ resources, a deterministic $(1+\varepsilon_1,\ldots,1+\varepsilon_k)$-approximate algorithm running in near-linear time is possible, with $\varepsilon_1=\ldots=\varepsilon_k=\varepsilon$.

0.20