Report-and-Run: A Simple Optimal Algorithm for All-Pairs Shortest Paths in Sparse Graphs
Abstract
We present the Report-and-Run algorithm (R&R algorithm), a simple deterministic algorithm in the comparison-addition model that, given an -vertex, -edge directed graph with arbitrary real edge weights, either detects a negative-weight cycle or solves the All-Pairs Shortest Paths (APSP) problem in time. This matches the output-size lower bound and gives the first optimal algorithm for sparse APSP in the comparison-addition model. We also introduce several variants of the R&R algorithm. First, for directed graphs with non-negative real weights and constant maximum in-degree and out-degree, we study computing the nearest vertices from every source. Under constant-time allocation of uninitialized arrays, lazy initialization yields deterministic time and space, whereas randomized hash tables give expected time and worst-case space. Second, we present blocking and edge-caching heuristics that substantially reduce both comparisons and additions compared with Dijkstra's algorithm on sparse random graphs.
Create a lesson
Related papers
New Parameterized Upper Bounds for All-Pairs Shortest Path and Lowest Common Ancestor in DAGs
Shared title terminologycs.DSErsel Hengirmen, Hakan Yıldız
A deterministic O(n\log n) algorithm for fixed-link shortest paths in concave Monge graphs
Shared title terminologycs.DSShucheng Chi, Jiayi Lian
Subexponential parameterized algorithms for graph modification problems
Shared title terminologycs.DSDekel Tsur
Induced and Isometric Path Cover and Partition on Distance-Hereditary and Chain Graphs
Shared title terminologycs.DSGautam K. Das, Kamal Santra
Vertex-Weighted Graph Burning: Bounds and Algorithms
Shared title terminologycs.DSAli Abdoli Masinan, Ayda Ataiy, Hourieh Mehrabiun et al.
The optimality of FirstFit and CBIP online coloring on some graph classes in the random order model
Shared title terminologycs.DSYuechuan Xu, Xin Li, Yaqiao Li