Searcharxiv⌕ Search

arXiv · 2611.05311

Roundtrip All-Pairs Shortest Paths in Directed Graphs

Abstract

We study approximation algorithms for All-Pairs Shortest Paths (APSP) in directed graphs under the roundtrip metric. In directed graphs, even finite-factor approximation of ordinary one-way distances must distinguish reachable from unreachable vertex pairs, and therefore computes transitive closure, a problem equivalent to Boolean matrix multiplication (BMM) under standard reductions. The roundtrip distance, defined as $\text{dist}_G(u \leftrightarrows v) = \text{dist}_G(u \to v) + \text{dist}_G(v \to u)$, offers a natural and robust relaxation. It measures the cost of traveling from $u$ to $v$ and back, satisfies the triangle inequality, and is inherently symmetric. While this metric has become central to the study of directed roundtrip spanners and compact routing, the fundamental problem of all-pairs roundtrip distance approximation has remained largely unexplored. In this work, we present a comprehensive study of roundtrip APSP and distance oracles, presenting several new lower and upper bounds. On the algorithmic side, our main result is a combinatorial algorithm that computes a stretch-$3$ approximation to all-pairs roundtrip distances in $\widetilde{O}(n^2 + \min\{m\sqrt{n},\, m^{1/3}n^{5/3}\})$ time. For edge weights in $[1,W]$, we also obtain a $(3+\varepsilon)$-approximation in $\widetilde O((n^{2.037}+nm^{2/3})\log(nW)/\varepsilon)$ time and a $(4+\varepsilon)$-approximation in $\widetilde O(n^{2.032}\log(nW)/\varepsilon)$ time using fast matrix multiplication. On the hardness side, we show that any stretch below $3$ would imply a breakthrough for BMM. We also obtain additional tradeoffs between stretch and running time.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Shiri Chechik, Gur Lifshitz. 2026-11-03. Roundtrip All-Pairs Shortest Paths in Directed Graphs. https://arxiv.org/abs/2611.05311

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Loop unrolling of UCA models: distance labeling

A proper circular-arc (PCA) model is a pair $M = (C, A)$ where $C$ is a circle and $A$ is a family of inclusion-free arcs on $C$ whose extremes are pairwise different. The model $M$ represents a digraph $D$ that has one vertex $v(a)$ for each $a \in A$ and one edge $v(a) \to v(b)$ for each pair of arcs $a,b \in A(M)$ such that the beginning point of $b$ belongs to $a$. For $k \geq 0$, the $k$-th power $D^k$ of $D$ has the same vertices as $D$ and $v(a) \to v(b)$ is an edge of $D^k$ when $a\neq b$ and the distance from $v(a)$ to $v(b)$ in $D$ is at most $k$. A unit circular-arc (UCA) model is a PCA model $U = (C,A)$ in which all the arcs have the same length $\ell+1$. If $\ell$, the length $c$ of $C$, and the extremes of the arcs of $A$ are integer, then $U$ is a $(c,\ell)$-CA model. For $i \geq 0$, the model $i \times U$ of $U$ is obtained by replacing each arc $(s,s+\ell+1)$ with the arc $(s,s+i\ell+1)$. If $U$ represents a digraph $D$, then $U$ is $k$-multiplicative when $i \times U$ represents $D^i$ for every $0 \leq i \leq k$. In this article we design a linear time algorithm to decide if a PCA model $M$ is equivalent to a $k$-multiplicative UCA model when $k$ is given as input. The algorithm either outputs a $k$-multiplicative UCA model $U$ equivalent to $M$ or a negative certificate that can be authenticated in linear time. Our main technical tool is a new characterization of those PCA models that are equivalent to $k$-multiplicative UCA models. For $k=1$, this characterization yields a new algorithm for the classical representation problem that is simpler than the previously known algorithms.

cs.DS↗

Improved Algorithms for Unrelated Crowd Worker Scheduling in Mobile Social Networks

This paper studies task scheduling with unrelated crowd workers in mobile social networks, where the service time of a task depends on the crowd worker that performs it, and the objective is to minimize the total weighted completion time. For identical crowd workers, we tighten the approximation ratio of the Largest-Ratio-First (LRF) algorithm and update the competitive ratio of its online version. For unrelated crowd workers, we show that the time-indexed rounding framework of Im and Li remains valid when worker-dependent contact delays are added, which yields a randomized algorithm with an expected approximation ratio of 1.45; this improves upon the expected ratio of $1.5+ε$ obtained in our previous work for identical crowd workers. We also derandomize this algorithm. To improve computational efficiency, we further propose an algorithm that exploits the optimality of the Smith-ratio order on a single crowd worker, and we prove that it is a deterministic 1.5-approximation algorithm and that its polynomial-time version achieves an approximation ratio arbitrarily close to 1.5. Experiments on synthetic instances and on instances derived from real contact traces show that this algorithm outperforms three variants of LRF in all tested settings, with the largest advantage when the crowd workers are highly heterogeneous, performs on par with a local-search heuristic for unrelated machines, and is within 0.4\% of the optimum on average on small instances that can be solved exactly.

cs.DS↗

Fully Scalable MPC Algorithms for Euclidean Clustering: Constant Approximation in Constant Rounds

We study Euclidean $k$-Means and $k$-Median under the Massively Parallel Computation (MPC) model, focusing on the \emph{fully scalable} setting. Previously, fully scalable algorithms for $k$-Means and/or $k$-Median either required $O(\log\log n\cdot\log\log\log n)$ rounds [Cohen-Addad, Kuhn, and Parsaeian; SODA'26] or guaranteed only an $O(\log n)$-approximation [Goranci, Jiang, Kiss, Kong, Qian, and Szilagyi; SODA'26]. In this paper, we close this gap by giving the first fully scalable algorithms for both problems, which work even when $k$ is polynomially larger than the local memory, and \emph{simultaneously} achieve an $O(1)$-approximation and $O(1)$ round complexity. Technically, we devise a new variant of the MP algorithm [Mettu and Plaxton, SICOMP'03] that computes a \emph{fractional solution satisfying the Lagrangian Multiplier Preserving (LMP) property}. Importantly, this LMP guarantee holds even under arbitrary distance distortions, a feature that is crucial for efficient MPC implementations. We then give a novel MPC rounding algorithm that first rounds to a bicriteria solution with $k+O(n^{1-ε})$ centers and then uses an \emph{iterative kernelization} idea to convert it into one with exactly $k$ centers.

cs.DS↗