Consider an undirected weighted graph $G = (V,E,w)$. We study the problem of computing $(1+ε)$-approximate shortest paths for $S \times V$, for a subset $S \subseteq V$ of $|S| = n^r$ sources, for some $0 < r \le 1$. We devise a significantly improved algorithm for this problem in the entire range of parameter $r$, in both the classical centralized and the parallel (PRAM) models of computation, and in a wide range of $r$ in the distributed (Congested Clique) model. Specifically, our centralized algorithm for this problem requires time $\tilde{O}(|E| \cdot n^{o(1)} + n^{ω(r)})$, where $n^{ω(r)}$ is the time required to multiply an $n^r \times n$ matrix by an $n \times n$ one. Our PRAM algorithm has polylogarithmic time $(\log n)^{O(1/ρ)}$, and its work complexity is $\tilde{O}(|E| \cdot n^ρ+ n^{ω(r)})$, for any arbitrarily small constant $ρ>0$.
In particular, for $r \le 0.313\ldots$, our centralized algorithm computes $S \times V$ $(1+ε)$-approximate shortest paths in $n^{2 + o(1)}$ time. Our PRAM polylogarithmic-time algorithm has work complexity $O(|E| \cdot n^ρ+ n^{2+o(1)})$, for any arbitrarily small constant $ρ>0$. Previously existing solutions either require centralized time/parallel work of $O(|E| \cdot |S|)$ or provide much weaker approximation guarantees.
In the Congested Clique model, our algorithm solves the problem in polylogarithmic time for $|S| = n^r$ sources, for $r \le 0.655$, while previous state-of-the-art algorithms did so only for $r \le 1/2$. Moreover, it improves previous bounds for all $r > 1/2$. For unweighted graphs, the running time is improved further to $poly(\log\log n)$.
A $(β,ε)$-hopset for a weighted undirected $n$-vertex graph $G=(V,E)$ is a set of edges, whose addition to the graph guarantees that every pair of vertices has a path between them that contains at most $β$ edges, whose length is within $1+ε$ of the shortest path. In her seminal paper, Cohen \cite[JACM 2000]{C00} introduced the notion of hopsets in the context of parallel computation of approximate shortest paths, and since then it has found numerous applications in various other settings, such as dynamic graph algorithms, distributed computing, and the streaming model. Cohen \cite{C00} devised…
Hopsets and spanners are fundamental graph structures, playing a key role in shortest path computation, distributed communication, and more. A (near-exact) hopset for a given graph $G$ is a (small) subset of weighted edges $H$ that when added to the graph $G$ reduces the number of hops (edges) of near-exact shortest paths. Spanners and distance preservers, on the other hand, ask for removing many edges from the graph while approximately preserving shortest path distances. We provide a general reduction scheme from graph hopsets to the known metric compression schemes of spanners, emulators and…
The approximate single-source shortest-path problem is as follows: given a graph with nonnegative edge weights and a designated source vertex $s$, return estimates of the distances from~$s$ to each other vertex such that the estimate falls between the true distance and $(1+ε)$ times the distance. This paper provides the first nearly work-efficient parallel algorithm with sublinear span (also called depth) for the approximate shortest-path problem on \emph{directed} graphs. Specifically, for constant $ε$ and polynomially-bounded edge weights, our algorithm has work $\tilde{O}(m)$ and span $n^{1…
Given a weighted undirected graph $G=(V,E,w)$, a hopset $H$ of hopbound $β$ and stretch $(1+ε)$ is a set of edges such that for any pair of nodes $u, v \in V$, there is a path in $G \cup H$ of at most $β$ hops, whose length is within a $(1+ε)$ factor from the distance between $u$ and $v$ in $G$. We show the first efficient decremental algorithm for maintaining hopsets with a polylogarithmic hopbound. The update time of our algorithm matches the best known static algorithm up to polylogarithmic factors. All the previous decremental hopset constructions had a superpolylogarithmic (but subpolynom…
We use exponential start time clustering to design faster and more work-efficient parallel graph algorithms involving distances. Previous algorithms usually rely on graph decomposition routines with strict restrictions on the diameters of the decomposed pieces. We weaken these bounds in favor of stronger local probabilistic guarantees. This allows more direct analyses of the overall process, giving: * Linear work parallel algorithms that construct spanners with $O(k)$ stretch and size $O(n^{1+1/k})$ in unweighted graphs, and size $O(n^{1+1/k} \log k)$ in weighted graphs. * Hopsets that lead to…
For a positive parameter $β$, the $β$-bounded distance between a pair of vertices $u,v$ in a weighted undirected graph $G = (V,E,ω)$ is the length of the shortest $u-v$ path in $G$ with at most $β$ edges, aka {\em hops}. For $β$ as above and $ε>0$, a {\em $(β,ε)$-hopset} of $G = (V,E,ω)$ is a graph $G' =(V,H,ω_H)$ on the same vertex set, such that all distances in $G$ are $(1+ε)$-approximated by $β$-bounded distances in $G\cup G'$. Hopsets are a fundamental graph-theoretic and graph-algorithmic construct, and they are widely used for distance-related problems in a variety of computational sett…
We give the first Congested Clique algorithm that computes a sparse hopset with polylogarithmic hopbound in polylogarithmic time. Given a graph $G=(V,E)$, a $(β,ε)$-hopset $H$ with "hopbound" $β$, is a set of edges added to $G$ such that for any pair of nodes $u$ and $v$ in $G$ there is a path with at most $β$ hops in $G \cup H$ with length within $(1+ε)$ of the shortest path between $u$ and $v$ in $G$. Our hopsets are significantly sparser than the recent construction of Censor-Hillel et al. [6], that constructs a hopset of size $\tilde{O}(n^{3/2})$, but with a smaller polylogarithmic hopboun…
Given a directed, weighted graph $G=(V,E)$ undergoing edge insertions, the incremental single-source shortest paths (SSSP) problem asks for the maintenance of approximate distances from a dedicated source $s$ while optimizing the total time required to process the insertion sequence of $m$ edges. Recently, Gutenberg, Williams and Wein [STOC'20] introduced a deterministic $\tilde{O}(n^2)$ algorithm for this problem, achieving near linear time for very dense graphs. For sparse graphs, Chechik and Zhang [SODA'21] recently presented a deterministic $\tilde{O}(m^{5/3})$ algorithm, and an adaptive r…
We design fast deterministic algorithms for distance computation in the congested clique model. Our key contributions include: -- A $(2+ε)$-approximation for all-pairs shortest paths in $O(\log^2{n} / ε)$ rounds on unweighted undirected graphs. With a small additional additive factor, this also applies for weighted graphs. This is the first sub-polynomial constant-factor approximation for APSP in this model. -- A $(1+ε)$-approximation for multi-source shortest paths from $O(\sqrt{n})$ sources in $O(\log^2{n} / ε)$ rounds on weighted undirected graphs. This is the first sub-polynomial algorithm…
We study a $(1+ε)$-approximate single-source shortest paths (henceforth, $(1+ε)$-SSSP) in $n$-vertex undirected, weighted graphs in the parallel (PRAM) model of computation. A randomized algorithm with polylogarithmic time and slightly super-linear work $\tilde{O}(|E|\cdot n^ρ)$, for an arbitrarily small $ρ>0$, was given by Cohen [Coh94] more than $25$ years ago. Exciting progress on this problem was achieved in recent years [ElkinN17,ElkinN19,Li19,AndoniSZ19], culminating in randomized polylogarithmic time and $\tilde{O}(|E|)$ work. However, the question of whether there exists a deterministi…
The distributed single-source shortest paths problem is one of the most fundamental and central problems in the message-passing distributed computing. Classical Bellman-Ford algorithm solves it in $O(n)$ time, where $n$ is the number of vertices in the input graph $G$. Peleg and Rubinovich (FOCS'99) showed a lower bound of $\tildeΩ(D + \sqrt{n})$ for this problem, where $D$ is the hop-diameter of $G$. Whether or not this problem can be solved in $o(n)$ time when $D$ is relatively small is a major notorious open question. Despite intensive research \cite{LP13,N14,HKN15,EN16,BKKL16} that yielded…
We present the first $m\,\text{polylog}(n)$ work, $\text{polylog}(n)$ time algorithm in the PRAM model that computes $(1+ε)$-approximate single-source shortest paths on weighted, undirected graphs. This improves upon the breakthrough result of Cohen~[JACM'00] that achieves $O(m^{1+ε_0})$ work and $\text{polylog}(n)$ time. While most previous approaches, including Cohen's, leveraged the power of hopsets, our algorithm builds upon the recent developments in \emph{continuous optimization}, studying the shortest path problem from the lens of the closely-related \emph{minimum transshipment} problem…
We present two new algorithms for solving the {\em All Pairs Shortest Paths} (APSP) problem for weighted directed graphs. Both algorithms use fast matrix multiplication algorithms. The first algorithm solves the APSP problem for weighted directed graphs in which the edge weights are integers of small absolute value in $\Ot(n^{2+μ})$ time, where $μ$ satisfies the equation $ω(1,μ,1)=1+2μ$ and $ω(1,μ,1)$ is the exponent of the multiplication of an $n\times n^μ$ matrix by an $n^μ\times n$ matrix. Currently, the best available bounds on $ω(1,μ,1)$, obtained by Coppersmith, imply that $μ<0.575$. The…
Let $G=(V,E,w)$ be a weighted undirected graph with $n$ vertices and $m$ edges, and fix a set of $s$ sources $S\subseteq V$. We study the problem of computing {\em almost shortest paths} (ASP) for all pairs in $S \times V$ in both classical centralized and parallel (PRAM) models of computation. Consider the regime of multiplicative approximation of $1+ε$, for an arbitrarily small constant $ε> 0$ . In this regime existing centralized algorithms require $Ω(\min\{|E|s,n^ω\})$ time, where $ω< 2.372$ is the matrix multiplication exponent. Existing PRAM algorithms with polylogarithmic depth (aka tim…
Computing approximate shortest paths in the dynamic streaming setting is a fundamental challenge that has been intensively studied during the last decade. Currently existing solutions for this problem either build a sparse multiplicative spanner of the input graph and compute shortest paths in the spanner offline, or compute an exact single source BFS tree. Solutions of the first type are doomed to incur a stretch-space tradeoff of $2κ-1$ versus $n^{1+1/κ}$, for an integer parameter $κ$. (In fact, existing solutions also incur an extra factor of $1+ε$ in the stretch for weighted graphs, and an…
We introduce stronger notions for approximate single-source shortest-path distances, show how to efficiently compute them from weaker standard notions, and demonstrate the algorithmic power of these new notions and transformations. One application is the first work-efficient parallel algorithm for computing exact single-source shortest paths graphs -- resolving a major open problem in parallel computing. Given a source vertex in a directed graph with polynomially-bounded nonnegative integer lengths, the algorithm computes an exact shortest path tree in $m \log^{O(1)} n$ work and $n^{1/2+o(1)}$…
We present a $(1+\varepsilon)$-approximate parallel algorithm for computing shortest paths in undirected graphs, achieving $\mathrm{poly}(\log n)$ depth and $m\mathrm{poly}(\log n)$ work for $n$-nodes $m$-edges graphs. Although sequential algorithms with (nearly) optimal running time have been known for several decades, near-optimal parallel algorithms have turned out to be a much tougher challenge. For $(1+\varepsilon)$-approximation, all prior algorithms with $\mathrm{poly}(\log n)$ depth perform at least $Ω(mn^{c})$ work for some constant $c>0$. Improving this long-standing upper bound obta…
Data structures that allow efficient distance estimation (distance oracles, distance sketches, etc.) have been extensively studied, and are particularly well studied in centralized models and classical distributed models such as CONGEST. We initiate their study in newer (and arguably more realistic) models of distributed computation: the Congested Clique model and the Massively Parallel Computation (MPC) model. We provide efficient constructions in both of these models, but our core results are for MPC. In MPC we give two main results: an algorithm that constructs stretch/space optimal distanc…
We continue the study of distance sensitivity oracles (DSOs). Given a directed graph $G$ with $n$ vertices and edge weights in $\{1, 2, \dots, M\}$, we want to build a data structure such that given any source vertex $u$, any target vertex $v$, and any failure $f$ (which is either a vertex or an edge), it outputs the length of the shortest path from $u$ to $v$ not going through $f$. Our main result is a DSO with preprocessing time $O(n^{2.5794}M)$ and constant query time. Previously, the best preprocessing time of DSOs for directed graphs is $O(n^{2.7233}M)$, and even in the easier case of und…
In the past few years, successive improvements of the asymptotic complexity of square matrix multiplication have been obtained by developing novel methods to analyze the powers of the Coppersmith-Winograd tensor, a basic construction introduced thirty years ago. In this paper we show how to generalize this approach to make progress on the complexity of rectangular matrix multiplication as well, by developing a framework to analyze powers of tensors in an asymmetric way. By applying this methodology to the fourth power of the Coppersmith-Winograd tensor, we succeed in improving the complexity o…
Let α be the maximal value such that the product of an n x n^α matrix by an n^α x n matrix can be computed with n^{2+o(1)} arithmetic operations. In this paper we show that α>0.30298, which improves the previous record α>0.29462 by Coppersmith (Journal of Complexity, 1997). More generally, we construct a new algorithm for multiplying an n x n^k matrix by an n^k x n matrix, for any value k\neq 1. The complexity of this algorithm is better than all known algorithms for rectangular matrix multiplication. In the case of square matrix multiplication (i.e., for k=1), we recover exactly the complexit…
We present a new randomized method for computing the min-plus product (a.k.a., tropical product) of two $n \times n$ matrices, yielding a faster algorithm for solving the all-pairs shortest path problem (APSP) in dense $n$-node directed graphs with arbitrary edge weights. On the real RAM, where additions and comparisons of reals are unit cost (but all other operations have typical logarithmic cost), the algorithm runs in time \[\frac{n^3}{2^{Ω(\log n)^{1/2}}}\] and is correct with high probability. On the word RAM, the algorithm runs in $n^3/2^{Ω(\log n)^{1/2}} + n^{2+o(1)}\log M$ time for edg…
APSP with small integer weights in undirected graphs [Seidel'95, Galil and Margalit'97] has an $\tilde{O}(n^ω)$ time algorithm, where $ω<2.373$ is the matrix multiplication exponent. APSP in directed graphs with small weights however, has a much slower running time that would be $Ω(n^{2.5})$ even if $ω=2$ [Zwick'02]. To understand this $n^{2.5}$ bottleneck, we build a web of reductions around directed unweighted APSP. We show that it is fine-grained equivalent to computing a rectangular Min-Plus product for matrices with integer entries; the dimensions and entry size of the matrices depend on …
This paper considers a natural fault-tolerant shortest paths problem: for some constant integer $f$, given a directed weighted graph with no negative cycles and two fixed vertices $s$ and $t$, compute (either explicitly or implicitly) for every tuple of $f$ edges, the distance from $s$ to $t$ if these edges fail. We call this problem $f$-Fault Replacement Paths ($f$FRP). We first present an $\tilde{O}(n^3)$ time algorithm for $2$FRP in $n$-vertex directed graphs with arbitrary edge weights and no negative cycles. As $2$FRP is a generalization of the well-studied Replacement Paths problem (RP) …
In the $\{-1,0,1\}$-APSP problem the goal is to compute all-pairs shortest paths (APSP) on a directed graph whose edge weights are all from $\{-1,0,1\}$. In the (min,max)-product problem the input is two $n\times n$ matrices $A$ and $B$, and the goal is to output the (min,max)-product of $A$ and $B$. This paper provides a new algorithm for the $\{-1,0,1\}$-APSP problem via a simple reduction to the target-(min,max)-product problem where the input is three $n\times n$ matrices $A,B$, and $T$, and the goal is to output a Boolean $n\times n$ matrix $C$ such that the $(i,j)$ entry of $C$ is 1 if a…
Given a set $S$ of $n$ points in $\mathbb{R}^d$, the Closest Pair problem is to find a pair of distinct points in $S$ at minimum distance. When $d$ is constant, there are efficient algorithms that solve this problem, and fast approximate solutions for general $d$. However, obtaining an exact solution in very high dimensions seems to be much less understood. We consider the high-dimensional $L_\infty$ Closest Pair problem, where $d=n^r$ for some $r > 0$, and the underlying metric is $L_\infty$. We improve and simplify previous results for $L_\infty$ Closest Pair, showing that it can be solved b…