arXiv:2611.05712cs.DSNov 2026

Manuscript Offprint

arXiv:2611.05712

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

Hector Tierno, Shuang Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 [3, 10], although the underlying quantity has long played a central role in shortcut set and parallel reachability. Notably Bals et al. [3] establish hardness for every polynomial-factor approximation in nearly-linear time for weighted digraphs. Yet they give n1/2+o(1)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 n1/3+o(1)n^{1/3+o(1)}, with high probability, in O~(m+n)\tilde{O}(m+n) time. We complement our algorithm with a lower bound conditional on the 3-uniform Hyperclique hypothesis, ruling out an n2/15−εn^{2/15-\varepsilon}-approximation in O~(m+n)\tilde{O}(m+n) time for every fixed ε∈(0,2/15)\varepsilon \in (0,2/15), establishing the necessity of polynomial loss for nearly-linear time algorithms.

1 Introduction

The reachability diameter of a graph is the maximum uu-to-vv shortest-path distance across all pairs u,vu,v such that vv is reachable from uu. It coincides with the classic notion of diameter whenever every vertex can reach every other vertex. Otherwise, the classical diameter is infinite, potentially obscuring the distances between pairs that remain reachable. For example, adding a single isolated vertex to a connected undirected graph makes its classical diameter infinite without changing any distances between the original vertices. Similarly, deleting one edge of a directed cycle produces a directed path: its classical diameter becomes infinite, but its reachability diameter remains unchanged. Thus, reachability diameter generalizes classical diameter in applications where finite distances are more informative than infinite ones. The reachability diameter is also the relevant quantity in the shortcut set problem, where the goal is to efficiently construct a sparse set of reachability-preserving edges, which are added to the input digraph to reduce its reachability diameter to a prescribed hopbound (each edge a hop). Despite this, it has received much less attention as a computational problem in its own right.

Bals, Blikstad, Dadush, Nazari, and Schmidt [3] pioneered the study of efficiently estimating this quantity in unweighted digraphs. Throughout, nn and mm denote respectively the numbers of vertices and edges, and a ρ\rho-approximation to the reachability diameter DD is an estimate D~\tilde{D} satisfying D/ρ≤D~≤DD/\rho \leq \tilde{D} \leq D. They give an n1/2+o(1)n^{1/2+o(1)}-approximation algorithm running in nearly-linear O~(m+n)\tilde{O}(m+n) time, yet surprisingly their conditional hardness results only rule out approximation factors below

*Both authors are supported by NSF grant CCF-2517033 and NSF CAREER Award CCF-2237288.

certain constants. Specifically, the Boolean matrix multiplication (BMM) hypothesis rules out combinatorial better-than-2 approximations in truly subcubic time, while the orthogonal vectors (OV) hypothesis rules out better-than-3/2 approximations in truly subquadratic time, even on sparse graphs. In matrix-multiplication time they show that exact computation is already possible. By contrast, assuming ω>2\omega > 2, the simplicial vertex hypothesis (SV) rules out any polynomial-factor approximation in near-linear time in the weighted regime (Table 1). We focus on the near-linear time regime, improving both the approximation guarantee and the conditional hardness bound.

The n1/2n^{1/2} barrier. The n1/2+o(1)n^{1/2+o(1)}-approximation algorithm of Bals et al. [3] inherits its approximation factor from the hopbound of the underlying shortcut algorithm, which seeks to efficiently match a well known folklore construction achieving a O~(n1/2)\widetilde{O}(n^{1/2}) hopbound. Improving the approximation factor requires going beyond what this hopbound directly implies. We recall the construction: given an input unweighted digraph, sample ⌈n1/2⌉\lceil n^{1/2} \rceil vertices called pivots uniformly at random without replacement. Run BFS from each pivot ss and include the edge (s,s′)(s,s') for each other pivot s′s' reachable from ss. Fix one shortest path for each ordered pair of vertices with finite distance. Then every sufficiently long such path contains a pivot near each endpoint with high probability, allowing the segment between them to be traversed in a single hop via the associated shortcut edge. With ⌈n1/2⌉\lceil n^{1/2} \rceil pivot samples the construction adds only O(n)O(n) edges, and the reachability diameter of the augmented graph is bounded by O~(n1/2)\widetilde{O}(n^{1/2}).

To see how estimating reachability diameter inherits the folklore n1/2n^{1/2} barrier, consider a simple modification of the folklore algorithm: whenever a BFS is initiated at a pivot, record the largest depth seen during the search. In the trivial case, output 0, otherwise report the maximum of 1 and the recorded depths, and retain the shortcut set constructed along the way for the analysis. This already yields a O~(n1/2)\widetilde{O}(n^{1/2})-approximation to the reachability diameter. To see why, condition on the high-probability event described above, and let PP be a fixed diametral path. The construction partitions PP into at most O~(n1/2)\widetilde{O}(n^{1/2}) segments, each consisting of either a single original edge or a subpath whose endpoints are joined by a shortcut. By an application of the pigeon-hole principle, some segment has length Ω~(D/n1/2)\widetilde{\Omega}(D/n^{1/2}). If this segment corresponds to a shortcut edge (s,s′)(s,s'), BFS initiated at ss reports the distance exactly. The limitation of this approach is the cost of search, yielding an O((m+n)n)O((m+n)\sqrt{n}) running time, which exceeds our near-linear time target. Efficient shortcut constructions would offer a route to a comparable approximation guarantee for estimating reachability diameter in the desired near-linear time.

History of efficient shortcut construction. The challenge of constructing sparse shortcut sets efficiently has long been central to parallel reachability, the problem of finding all vertices reachable from a given source. Parallel BFS explores each layer concurrently, which can require as many sequential rounds as its reachability diameter. Motivated by parallel reachability, Thorup [21] formalized the problem of reducing a digraph's reachability diameter by adding a set of reachability-preserving edges. The construction must be efficient, and the shortcut set sparse, to retain the near-linear total computational cost of BFS. The first shortcut-set algorithm achieving, with high probability, polynomially sublinear O~(n2/3)\widetilde{O}(n^{2/3}) reachability diameter with O~(m)\widetilde{O}(m) running time and O~(n)\widetilde{O}(n) size was discovered by Fineman [9], refining the sample and search approach of Ullman and Yannakakis [22].

Soon after, Jambulapati, Liu, and Sidford [13] obtained the first efficient and sparse construction (JLS algorithm) whose bound O(n1/2+o(1))O(n^{1/2+o(1)}) nearly matches the folklore algorithm's. For a fixed path PP, instead of a pivot near each endpoint being used to shortcut the middle segment, the JLS algorithm partitions the graph, which fragments PP, and constructs a shortcut for each fragment.

At every recursive level its fragments are either resolved by being shortcut through a sampled pivot, or become recursive subproblems, further subdivided and eventually shortcut with later samples. The expected number of fragments of PP over the course of the recursion is at most n1/2+o(1)n^{1/2+o(1)}. It is at this point that shortcut construction meets diameter estimation. Bals et al. [3] show that the JLS algorithm's partitioning preserves original graph distances in each child, and by an application of the triangle inequality, search from pivots reveals a distance at least half the length of fragments of shortest paths which they resolve. Combining these ideas and the prior pigeon-hole argument, they achieve the first n1/2+o(1)n^{1/2+o(1)}-approximation reachability diameter algorithm in unweighted digraphs. By tying the approximation factor to the shortcut hopbound, the approach of Bals et al. carries the folklore n1/2n^{1/2} benchmark into reachability diameter estimation, making it an apparent barrier for this problem as well.

Further developments in shortcut sets emphasize n1/2n^{1/2} as a significant benchmark. Kogan and Parter achieve a substantially smaller hopbound of O~(n1/3)\tilde{O}(n^{1/3}) [15], but their construction takes superlinear O~(mn1/3)\tilde{O}(mn^{1/3}) time [16]. Vikrant Ashvinkumar, Aaron Bernstein, Maximilian Probst Gutenberg, and Thatchaphol Saranurak [2] retain near-linear work and improve the reachability diameter to (nω+o(1)m)1/(2ω−2)\left(\frac{n^{\omega+o(1)}}{m}\right)^{1/(2\omega-2)} on dense graphs allowing O~(m)\tilde{O}(m) shortcut edges, where ω\omega is the matrix multiplication exponent. However, their guarantee remains n1/2+o(1)n^{1/2+o(1)} on sparse graphs. This motivates the following refinement of the question of [3]:

Problem 1. Can reachability diameter estimation overcome n1/2n^{1/2} in better-than-matrix-multiplication time, without a corresponding improvement in shortcut construction?

We answer this question in the affirmative, giving a randomized O~(m+n)\tilde{O}(m+n)-time algorithm that achieves an n1/3+o(1)n^{1/3+o(1)}-approximation with high probability.

Theorem 1. There is a randomized algorithm computing a n1/3+o(1)n^{1/3+o(1)}-approximation to the reachability diameter of an unweighted digraph with high probability, running in O~(m+n)\tilde{O}(m+n) time.

Our algorithm builds on the same recursive partitioning framework of Jambulapati et al. [13] also used by Bals et al. Following a fixed diametral path, at each level of the recursion random samples either further subdivide an existing fragment, or resolve it entirely. Bals et al. show that resolved fragments reveal distances in the base input graph, and thus the final count of resolved fragments controls the approximation ratio of their algorithm. In contrast, with careful analysis we show that our approach obtains a measurement earlier in the recursion, before repeated decompositions have cut the length of the diametral path into too many pieces. The difficulty lies in detecting a sufficiently long piece when it is unresolved. To address this, we adapt a randomized procedure of Cohen [5] for estimating the size of a neighborhood to finding length-witnesses of unresolved pieces. Our analysis balances bounds of Ashvinkumar et al. [2] on the number of large recursive subproblems, with the success rate of the adapted procedure, breaking the n1/2n^{1/2} approximation barrier for reachability diameter. The algorithm and proof are given in Section 4.

Polynomial approximation loss. Beyond breaking the n1/2n^{1/2} barrier, the broader question of Bals et al. [3] leaves open whether a constant-factor approximation is possible in near-linear time. They suggest approaching this problem from the other direction, proving a stronger lower bound, a route which is especially compelling when comparing the approximation landscape for weighted and unweighted digraphs Table 1. Recall that the reachability diameter measures the maximum finite distance between vertices of a digraph, which coincides in the undirected setting with the maximum classic diameter of a connected component. In the undirected setting: applying well-known folklore algorithms to each connected component already gives a 2-approximation in near-linear time to

UndirectedDirected
Unweightedupper22 [7]lower3/2−ε3/2 - \varepsilon [18] (OV)upperprior: n1/2+o(1)n^{1/2+o(1)} [3]ours: n1/3+o(1)n^{1/3+o(1)}lowerprior: 3/2−ε3/2 - \varepsilon [3] (OV)ours: n2/15−εn^{2/15-\varepsilon} (HC)
Weightedupper22 [7]lower3/2−ε3/2 - \varepsilon [18] (OV)upper—lowerncn^{c} (all c>0c>0) [3] (SV)1^{1}

Table 1: Reachability diameter approximation in near-linear time. Upper bounds correspond to O~(m+n)\tilde{O}(m+n)-time algorithms, lower bounds mean an approximation factor is excluded under the listed hypothesis, for fixed ε>0\varepsilon > 0. For randomized HC the bound holds for algorithms with at least 2/32/3 success rate.

1^{1} This near-linear-time consequence additionally assumes ω>2\omega > 2. Bals et al. rule out polynomial-factor approximation in O(nω−δ)O(n^{\omega-\delta}) time for every fixed δ>0\delta > 0 under SV. Since m≤n2m \leq n^2, a O~(m+n)\tilde{O}(m+n)-time algorithm would contradict this bound.

the reachability diameter in both weighted and unweighted graphs. Surprisingly, the picture is dramatically different in the directed setting: in the weighted regime, assuming ω>2\omega > 2 and the simplicial vertex hypothesis (SV), Bals et al. [3] rule out every polynomial approximation factor in near-linear time. Yet switching to the unweighted regime changes the picture again. Bals et al. obtain a polynomial-factor approximation in near-linear time, while their conditional lower bounds exclude only approximation factors below certain constants. This motivates the following question:

Problem 2. Does reachability diameter in unweighted digraphs admit a constant-factor, or more generally a subpolynomial-factor, approximation in near-linear time?

Our result closes this question under the 3-uniform Hyperclique hypothesis (HC). We show that polynomial approximation loss is unavoidable, although the optimal polynomial exponent remains open.

Theorem 2. Assume the deterministic 3-uniform Hyperclique hypothesis. For every fixed ε∈(0,2/15)\varepsilon \in (0, 2/15), there is no deterministic O~(n+m)\tilde{O}(n+m)-time algorithm that, on every unweighted digraph GG with nn vertices, mm edges, and reachability diameter DD, returns an estimate satisfying

Dn2/15−ε≤D^≤D.\frac{D}{n^{2/15-\varepsilon}} \leq \hat{D} \leq D.

Under the randomized version of the hypothesis, there is no randomized O~(n+m)\tilde{O}(n+m)-time algorithm that, on every input graph, returns an estimate satisfying this guarantee with probability at least 2/32/3.

One particular difficulty raised by Bals et al. [3] is the “triangle-inequality barrier” [1, 14, 19]. To establish a large approximation lower bound, a reduction must produce a large gap in diameter: one case must contain a pair of vertices far apart, while the other must keep every reachable pair close. The “triangle-inequality barrier” obstructs the natural approach of creating a long path and selectively shortcutting its endpoints: intermediate vertices may remain far apart even after the shortcut is added, leaving both cases with large diameter. Our reduction encodes a hyperclique candidate by a constant-direction trajectory in a layered DAG, and adds short channels that compress trajectories encoding candidates that violate a hyperclique constraint. When no hyperclique exists, every reachable pair can be connected through a small number of the compressed trajectory segments. An energy coordinate preserves a long distance when a hyperclique does exist, preventing any detours. Finally, a Chinese remainder encoding keeps these channels small enough. Balancing the resulting trade-off between graph size and the diameter gap yields the exponent 2/15 − ε. The construction and proof are given in Section 3.

References (15)