MCP
arXivarXiv
Preprint
Published: June 25, 2026
cs.DS

Almost Optimal Multiple Source Shortest Paths and Reachability

Abstract
Given a graph, computing distances and reachabilities from a small set of vertices to the whole graph is an important primitive both in theory and in practice. In undirected unweighted graphs, while computing single-source shortest path (SSSP) requires O(n2)O(n^2) time in dense graphs, all-pairs shortest paths (APSP) can be computed in O^(nω)=O(n2.372)\hat{O}(n^\omega) = O(n^{2.372}) time [Seidel '95] providing significant savings over running nn SSSP instances separately. However, if one needs to compute multiple-source shortest paths (MSSP) from a set of nσn^\sigma vertices, the previously best known running time was O^(min⁡{nω,n2+σ})\hat{O}(\min\{n^\omega, n^{2 + \sigma}\}): either compute APSP or run SSSP from each source. On the other hand, MSSP is only as hard as computing Boolean matrix product (BMM) between an nσ×nn^\sigma \times n matrix and n×nn \times n matrix, leaving a significant gap. Our first main result is an almost optimal algorithm for MSSP on undirected unweighted graphs running in O^(nω(σ,1,1))\hat{O}(n^{\omega(\sigma, 1, 1)}) time, which gives a smooth interpolation between the SSSP and APSP algorithms. The main technical tool behind our result is a novel graph decomposition, which may be of independent interest. Next, we study the multiple-source reachability problem, where we need to determine whether a given set of nσn^\sigma vertices can reach each of the vertices in a given directed graph. Multiple-source reachability can also be solved in O^(min⁡{nω,n2+σ})\hat{O}(\min\{n^\omega, n^{2 + \sigma}\}) time, with the same lower bound from rectangular BMM. We give an optimal algorithm that runs in O^(nω(σ,1,1))\hat{O}(n^{\omega(\sigma, 1, 1)}) time, again matching the running time for BMM. Our algorithm for multiple-source reachability can be generalized to MSSP on DAGs. As an application, we provide an O(n2.084)O(n^{2.084}) time algorithm for computing an O~(n)\widetilde{O}(n)-size shortcut set that reduces diameter to O(n1/3)O(n^{1/3}).
0
AI overview
Reviews
Citation graph
References · 84
Structured
This preview uses generator v1; v2 is available
This explanation is currently available in Chinese. Read the Chinese explanation
Rating
No ratings yet
Rate
Community rating
—
/ 5
No ratings yet
Rating
—
Soundness
—
Presentation
—
Contribution
—
Confidence
—
Discussion
Top
Newest
Questions
Replication
Author
No comments yet — be the first