Manuscript Offprint
arXiv:2610.12057Faster Directed Hopsets, Distance Preservers, and Deterministic Shortcut Sets
Abstract
While there have been many recent advances in getting better tradeoffs for directed distance structures such as hopsets, shortcut sets and distance preservers, most known algorithms are inefficient. In this work we provide three results:
• Faster algorithms for directed -hopsets, matching the state-of-the-art size/hopbound trade-offs of [BW23]. Our algorithm is first designed for DAGs and then extended to general graphs (up to factors) using the recent DAG projection result of [HJS26].
• Faster deterministic algorithms for constructing shortcut sets, matching the state-of-the-art size/hopbound tradeoffs of [KP22c].
• Using our improved directed hopset construction, we get significantly faster algorithms for computing source-wise distance preservers. This algorithm is based on speeding-up reductions of [KP22b] by using certain structural properties of our hopsets.
Contents
1 Introduction 3
1.1 Summary of Technical Contributions 5
2 Preliminaries 6
3 Greedy Lightest Chain Cover in 7
4 Near Linear-Time Deterministic -Shortcut Sets 8
5 Deterministic -Shortcut Sets using Greedy Set Cover 9
6 Fast Sourcewise Approximate Distance Preservers 15
7 Data Structure for Reporting Hopset Witnesses 20
8 Reductions to DAGs due to [HJS26] 21
9 A Simple Algorithm for -Hopsets on DAGs due to [KP22c] 22
10 Deriving Fast Hopsets For All Parameters 26
Definition 1. Given a directed graph , a shortcut set is a set of additional (unweighted) edges in the transitive closure of . The hopbound of is the maximum hop distance in over all reachable pairs.
For a weighted graph , a -hopset with hopbound is a set of additional weighted edges such that for each pair in the transitive closure, we have , where denotes the length of a shortest path in using at most hops (edges).
Hopsets are very well-understood in undirected graphs where almost matching upper [EN19] and lower [ABP18] bounds and fast constructions are known. However, in directed graphs both existentially and computationally the picture is much less complete. For a long time, the only known approach for directed graphs was the following folklore algorithm: randomly sample a set of vertices, and add a shortcut edge between each pair of sampled nodes that lie in the transitive closure of the input graph. For hopsets we additionally give a weight corresponding to the distance in G between the endpoints of each added edge. This simple approach leads to a shortcut set (or an exact hopset) of size and hopbound . A line of work has focused on optimizing the running time of a similar size/hopbound tradeoff with a focus on applications in parallel reachability and shortest path computation [Fin18; JLS19; CFR20]. These algorithms are also sampling based but they sample a sequence of pivots in a careful recursive approach that leads to running time for shortcut sets and -hopsets with near-linear size and -hopbound.
Remarkably, the hopbound of for linear size shortcut sets achieved by the folklore sampling remained nearly unimproved for 30 years, until a breakthrough of Kogan and Parter [KP22c] that proved: every graph has a shortcut set on edges with hopbound . They also gave a weaker tradeoff (still improving over the folklore algorithm) for hopsets. Later, Bernstein and Wein [BW23] matched the size/hopbound shortcut set tradeoff of [KP22c] also for -hopsets. The hopset algorithm of [BW23] is much more complicated, but this complexity was mainly needed for handling general graphs. For DAGs, we can show a simpler hopset algorithm (see Section 9 for details), which was implicit in [KP22c]; as observed in [HJS26], combining it with DAG projections gives a simpler construction for general graphs up to factors. At the same time a sequence of lower bounds [Hes03; HP21; BH23; HXX25] were shown. The current best lower bound for -size shortcut sets is . Closing the upper and lower bound gap for shortcut sets is a major open problem.
Faster Hopsets. Despite the progress on the existential bounds, these constructions are still computationally inefficient. Initially, the shortcut sets of [KP22c] and hopsets of [BW23] required transitive closure and all-pairs-shortest paths time respectively. While these objects are interesting in their own right, such running times would rule out most conceivable applications in reachability and shortest path computations. Motivated by this bottleneck, [KP23] showed how shortcut sets can be constructed in faster than transitive closure time, using a reduction to min cost flow for computing chain covers. (Chains are paths in the transitive closure and a chain cover aims to cover as many vertices as possible with a fixed number of chains.) They thus show how to return paths on the transitive closure without directly computing the transitive closure. However so far no faster algorithms were known for the -hopset constructions
Recall: The transitive closure of G is the graph over the same vertex set as G, which has an edge iff there is a path in G.
We use to hide polylog and factors.
with improved size/hopbound tradeoffs over the folklore approach. The main challenge is that for hopsets we need these chain covers to also correspond to shortest paths between their endpoints, and we do not know how to enforce such a requirement in the min cost flow reduction of [KP23]. Using a greedy algorithm instead, we get the following running time for constructing the hopsets whose size/hopbound trade-off matches the state-of-the-art hopsets of [BW23]:
Theorem 2. Let be an n-vertex, m-edge directed acyclic graph with nonnegative edge-weights and polynomial aspect ratio. For any and hopbound , there is a randomized -time algorithm computing -size -hopsets with hopbound .
We note that while our theorem statement assumes the input graph is a directed acyclic graph (DAG), this is without loss of generality (up to factors) due to a reduction of [HJS26] (see section 8 for details). For the important case of -size hopsets with hopbound , by setting we get running time. This improves the running time of [BW23]. Compare this to the best (randomized) construction time of for shortcut sets [KP23].
Deterministic Shortcut Sets. A limitation of most known shortcut set algorithms is their reliance on randomness. With the exception of a recent work [Bal+25] that gives a greedy deterministic algorithm for shortcut sets that match tradeoffs of [KP22c], all previous approaches required sampling vertices, or paths, or both. On the other hand, the deterministic greedy approach of [Bal+25] is much slower ( time), as it is based on an iterative algorithm that requires examining a potential function for adding each edge.
Our second result is a faster deterministic algorithm for shortcut sets that match the existential tradeoffs of [KP22c]. For the linear size shortcut sets of hopbound this also leads to running time of . While the running time does not match the best randomized algorithm [KP23], it is still faster than transitive closure time, and is much faster than the best known deterministic algorithm implied by [Bal+25].
Theorem 3 (Deterministic Shortcut Sets). For any , there is a deterministic -time algorithm computing -size -shortcut sets.
We also make a simple observation that gives a deterministic almost-linear time algorithm for computing -shortcut sets.
Faster Distance Preservers. Given an input graph G and collection of demand pairs , a distance preserver is a sparse subgraph of G that preserves (or approximates) distances between all demand pairs in P. Distance preservers were first introduced and studied by [BCE05] and [CE06]. Since then, significant progress has been made in understanding the combinatorial bounds on distance preservers [BW16; Bod17; Bod21; CGK13; KV15; KP22b; BW23; KP25; HXX25; HJS26]. Also, distance preservers (for undirected graphs) have found applications in computing path-reporting distance oracles [Pet09; EP16; ENW16; Bod+17; ES23].
While distance preservers are widely studied from an extremal point of view, to our knowledge there were no known computationally efficient algorithms for directed graphs. The known applications in distance oracles were exclusively applied to undirected graphs, and this lack of efficient constructions could be a reason for the lack of such applications for directed graphs. For other related objects, the closest is the work of [AB18] achieved fast constructions of reachability preservers.
Distance preservers have been studied in many different settings (e.g., directed/undirected graphs, weighted/unweighted graphs, and approximate/exact distances). In particular, we study source-wise approximate distance preservers in directed weighted graphs.
We would like to point out that this part of the work was previously included in another paper (and also appeared in an earlier version of an arXiv preprint [Bal+25]). This result was moved to this paper, which we believe is a better technical and conceptual fit for it.
Definition 4 ((1 + ε)-approximate distance preservers). Let be an n-vertex directed graph, let be a set of source nodes, and let be collection of demand pairs. Then for any , a sourcewise -approximate distance preserver is a sparse subgraph such that for all , .
In directed graphs, -approximate distance preservers were first studied explicitly in [KP22b], which established a blackbox reduction from -approximate hopsets to -approximate distance preservers. This reduction, combined with the subsequent work of [BW23], established that every -vertex directed graph and set of demand pairs of size admits a -approximate distance preserver of size . This is the state-of-the-art bound on when .
We then combine our fast -hopsets with the ideas from hopset-to-preserver reduction of [KP22b], to get a faster -approximate distance preservers. We note that we cannot use this reduction directly for obtaining our desired running time, and need to white-box the reduction and adapt it to the specific properties of the hopset used.
Theorem 5 (Fast distance preservers). Let be an n-vertex DAG with m edges, nonnegative edge-weights, and polynomial aspect ratio. Let and , and write and . Then one can compute -approximate distance preserver of with edges in running time
• when , and
• when .
In particular, the previous theorem implies the following corollary when our demand pairs take the form .
Corollary 6. Let be an n-vertex DAG with m edges, nonnegative edge-weights, and polynomial aspect ratio. Let be a set of source vertices. Then one can compute a -approximate distance preserver for demand pairs , with edges in running time .
Theorem 5 and Corollary 6 recover the state-of-the-art combinatorial bounds for -approximate distance preservers in directed graphs for (due to [KP22b] and [BW23]) but with a faster construction time. Indeed, directly implementing the hopset-to-preserver reduction of [KP22b] incurs an running time, where W is the graph's aspect ratio, stemming from its reliance on a hop-bounded APSP subroutine [CC20; Zwi02]. In contrast, our preserver construction achieves time complexity , where , for suitably small choices of and p.
1.1 Summary of Technical Contributions
Faster Hopsets. To exploit the improved DAG projections to find a faster algorithm for hopsets, we must find a faster algorithm to find the distance analogue of the chain covers used in shortcut sets. In particular, we need to find chains that are shortest chains (meaning their total weight is equal to the distance between their endpoints). This makes the min-cost max-flow reduction used in the shortcut set setting inapplicable. A greedy chain cover algorithm running in time for the case where the chains do not need to be shortest chains is folklore (see for example Section 3 of [Gra+21]). We extend it to the case with shortest chains in the same running time. We then speed this up by adding a simple sampling argument allowing us to compute the necessary cover in time (compared to the algorithm relying on APSP).
When the recent work of [HJS26] obtains improved bounds.
See Definition 8 for a precise definition of these covers.
Deterministic Shortcut Sets. The Kogan-Parter [KP22c] shortcut set algorithm makes random choices in two of its steps: it samples a set of vertices and a set of chains from a chain cover. We can avoid the vertex sampling and only keep the chains: one can use the union of the vertices in the chains of the subsampled chains in place of the sampled vertices and the analysis goes through with minimal adjustment.
Picking the subset of chains deterministically, on the other hand, poses significant technical challenges. We want to choose a set of chains that hit the length- prefix and suffix of any path in our graph G. This can be interpreted as a set cover instance. The known random solution can be turned into a deterministic upper bound on the size of this cover using a probabilistic argument. Of course, while this set cover directly yields a deterministic solution, it is not efficient (not even poly-time). Observe that we can tolerate a -approximation of this set cover instance and thus use the greedy set cover algorithm, but even then the instance is too large to be efficiently solved.
Instead we find this solution implicitly using the specific structure of the shortcut set construction. In particular, we do not need to cover the prefix and suffix of all paths, but can fix a canonical path between any pair of reachable nodes. We choose these paths such that they have certain desirable properties, based on consistent DFS trees corresponding to the chain cover (see lemma 18 for details).
As a final step, we efficiently compute how much each new candidate chain contributes to our set cover solution. Crucially, to obtain an efficient algorithm, we develop a fast way to dynamically update this information as we greedily extend our partial solution. This is only possible by the combinatorial properties of the selected canonical paths mentioned above.
Faster Distance Preservers. Hopset constructions are known to imply distance preserver constructions by a blackbox reduction due to [KP22b]. Thus, our faster hopset algorithm raises the possibility of obtaining a faster algorithm for constructing distance preservers by plugging our hopset algorithm into this hopset-to-preserver reduction. Unfortunately, the reduction itself includes computational steps like all-pairs shortest paths that is too slow. To obtain the faster running time, we “whitebox” the reduction and crucially use the assumption that the hopsets are computed using specifically our faster hopset algorithm. In particular, for two consecutive hopsets in the hierarchy , , we build a data structure that can, for each hopset edge , provide a -approximate -hop path in in time near-linear in the output, that is in time.
Finding these witnessing paths is the core computational bottleneck in the reduction. The speed up relies on finding a small enough set of trees encoding the low-hop paths guaranteed by the Kogan-Parter style construction. To construct them efficiently, we start with a shortest path-tree for a smaller set of relevant vertices. For any shortest path P, we can obtain an approximate shortest path obeying the hopbound by finding the first sampled vertex u and the last sampled chain Q on P and rerouting via the u to Q edge added during the hopset construction. Interestingly, we can do an analogous transformation on an entire shortest path tree, interpreting this rerouting as rehanging parts of the tree to reduce its height.
2 Preliminaries
A directed acyclic graph (DAG) is a directed graph that does not contain a directed cycle.
Lemma 7 (DAG SSSP DP, [Cor+22] Sec. 22.2). There is a time algorithm that given a real-valued DAG and source , finds all out-distances from s. It can also report a shortest path tree from s in the same time.
Definition 8 ( -Chain Cover). Let an -chain cover be a set of at most vertex-disjoint chains in such that for any path , it holds that .
Note that this formalizes the output of the DisjointChains algorithm of [KP22a].
The following lemma is a slightly tighter version of Lemma 1.10 from [KP22a].
Lemma 9 (Lemma 1.3 of [Ras10]). For any path graph , there is a shortcut set of size for , which can be computed in time.
The idea of supershortcuts provides a way to shortcut a path to constant diameter. This is a common subroutine for more general shortcutting algorithms.
Corollary 10. For any DAG and any set of vertex-disjoint chains in , there is a set of edges s.t. and for any and with before , we have . Write SuperShort( ) for such an . It can be computed in time.
Proof. Add the edges between consecutive nodes of every chain, and apply Lemma 9 to every chain. ☐
3 Greedy Lightest Chain Cover in
In Section 9 we present a simple algorithm for constructing -hopsets of DAGs due to Kogan and Parter [KP22c]. This construction has the following main steps, repeated over every distance scale in the graph: (1) sample a subset of vertices, (2) compute a family C of well-behaved chains, (3) super-shortcut along each chain in C, (4) sample a subset of chains, and (5) connect each vertex in to each chain in when possible. The generic routing and implementation lemmas there, especially Lemmas 41 and 42, show that once Step (2) is available, the remainder of the construction goes through exactly as written. Thus, in this section it remains only to compute the chain family described in Step (2) quickly.
Every step of the construction algorithm in Section 9 can be easily implemented in time, except Step (2), where we need to take some care. Constructing the greedy chain family will be the main focus of this section.
Take as in the construction in Section 9, that is a set of vertices of size taken uniformly at random from . Write for the target hopbound and for the distance scale we are working at. Then we aim to compute the following object.
Definition 11 (Lightest Chain Cover for ). Call C a lightest chain cover from (for , , and ) if
(A1) every chain is a lightest chain (i.e., if are its endpoints, then ),
(A2) for every , ,
(A3) , where the hidden constant may depend on ,
(A4) chains in C are pairwise vertex-disjoint, and
(A5) there is no lightest path starting at any with (a) more than vertices not in , and (b) .
By Lemma 35, every long shortest path reaches the sampled set within its first vertices. Hence, once we control the remaining suffix by a cover as above, Lemma 41 from Section 9 gives the desired low-hop route. Let us now see how to compute this chain cover efficiently.
Lemma 12. Given , , , and the sampled set above, there is an algorithm computing a set satisfying Definition 11 in time.
Note that in Algorithm 1 we assume positive integer weights. Then the whole-number part of the found distances encodes the distance by weight, and the decimal part encodes the maximum number of uncovered vertices on any shortest path, allowing us to check the if-condition. For arbitrary nonnegative real weights, the DP of Lemma 7 instead compares pairs (distance, -#uncovered vertices) lexicographically. This yields the same paths without any rounding, so all chains stay exactly lightest.
Proof of Lemma 12. For correctness, fix one execution of the repeat-loop for some . The modified length of a path is its ordinary edge-weight plus the sum of the current vertex weights on that path. Every
Algorithm 1: Computing a lightest chain cover for , , and .
Input: , a directed acyclic graph with positive integer weights, a set , and parameters
1
2 Assign weight to every vertex
3 for do
4 repeat
5 Compute an SSSP from (Lemma 7)
6 if there is a node such that its distance from is at most and it uses at least uncovered vertices then
7 Add all nodes from the lightest -u path with negative weight as a chain to
8 Set the weight of these nodes to 0
9 end
10 until the if-condition fails;
11 end
12 Truncate all chains into pieces of length at most
vertex weight always lies in , so the total perturbation on any path has absolute value less than 1/2. Since the edge weights are positive integers, every modified shortest path from is therefore also a lightest path in the original graph, and among lightest paths it maximizes the number of currently uncovered vertices.
Hence, whenever the if-condition succeeds, the algorithm finds a lightest path from to some node with and at least currently uncovered vertices. The negative-weight vertices on , in their order along , form a lightest chain, and this is exactly the chain added to . Afterwards those vertices are assigned weight 0, so no later chain can contain them. Thus the chains are pairwise vertex-disjoint. After the final truncation, every piece is still a lightest chain, every piece has weight at most , and the covered vertex set is unchanged. Since each successful iteration covers at least new vertices, there are at most such iterations; the truncation increases the number of chains by only an factor. This proves Conditions (A1) to (A3) and the pairwise-disjointness condition.
For Condition (A5), fix . When the repeat-loop for stops, there is no lightest path starting at with weight at most and at least currently uncovered vertices. Afterwards the algorithm only adds more chains, so the set of uncovered vertices can only shrink. Therefore the same statement still holds for the final family .
For the running time, every successful iteration covers at least previously uncovered vertices, so there are at most successful SSSP computations. In addition, each contributes at most one final failed SSSP computation. Thus the running time is , which is for the sampled set used here. The final truncation takes only linear time in the total chain size.
See Section 10 for how to plug this greedy algorithm into the hopset construction for all parameter regimes. This yields the following main theorem.
Theorem 2. Let be an n-vertex, m-edge directed acyclic graph with nonnegative edge-weights and polynomial aspect ratio. For any and hopbound , there is a randomized -time algorithm computing -size -hopsets with hopbound .
4 Near Linear-Time Deterministic -Shortcut Sets
In [Bal+25], the authors observed that combining previous results from [KP22a] and [Các23] yields an almost-linear time algorithm to compute a chain cover.
Lemma 13 (Lemma 6.1 of [Bal+25]). We can deterministically compute an -chain cover in time.
This directly gives a deterministic algorithm to compute -size shortcut sets for in the same time.
The fastest known algorithm for -shortcut sets is FasterShortcutSqrtN from [KP22a], running in time. On the flip side, the best known near-linear time algorithm for shortcut sets is by Cao, Fineman, and Russel [CFR20]. It achieves a diameter of .
This results ties the quality of folklore shortcut sets with a near-linear time deterministic algorithm.
Corollary 14. There is a deterministic time algorithm to compute a -size -shortcut set for any DAG .
Proof. The algorithm uses lemma 13 to compute a -chain cover C for G. It then uses corollary 10 to super-shortcut all chains in C. It directly follows that the algorithm has the desired running time and produces a set of edges of the desired size.
To see that it is indeed yields a -shortcut set, take any pair of reachable nodes . Let be a shortest path from to in the shortcutted graph. By the property of the -chain cover, there are at most nodes not on any chain (i.e., from ) on . Additionally, contains nodes from at most chains (since ) and at most five nodes from each chain. If there were more than five nodes from one chain, take the first of these last nodes and substitute their path of length four (which exists by the definition of the super-shortcuts) for the relevant subpath in . This is a shorter path, showing that the assumption that there are at most five nodes from any chain holds. Combining these facts, we see that contains at most nodes.
5 Deterministic -Shortcut Sets using Greedy Set Cover
In this section we present a deterministic version of the shortcut set algorithm of [KP22c]. In the process we obtain a number of results we feel are insightful in their own right, revealing more about the connection between -chain covers and shortcut sets.
Concretely, to achieve determinism we need to avoid both the sampling of the chains and of the nodes in Kogan and Parter's algorithm in [KP22c]. Our solution to this is based on these two observations:
(1) Instead of sampling from C to pick , we can use an implicit set cover instance to efficiently pick a good enough set of chains.
(2) We do not need to sample vertices at all. It is enough to pick the vertices on the set of chains, that is .
This yields the main theorem of this section.
Theorem 3 (Deterministic Shortcut Sets). For any , there is a deterministic -time algorithm computing -size -shortcut sets.
In particular, for the state-of-the-art setting , this yields the following result.
Corollary 15. There is a deterministic -time algorithm computing -size -shortcut sets.
Before we give our concrete construction, we observe the following general structure helps us gain more intuition about why the -chain cover is useful for calculating shortcut sets.
Definition 16 (Path Complex). Given a DAG , define a path complex as a set of paths in s.t. for any path , any subpath of is also in .
Essentially, this allows us to focus on specific paths in the graph, while still being able to obtain shortcut sets guarantees. This is important to make our set cover efficient as considering all paths or an arbitrarily fixed shortest path between any two nodes would not feasibly lead to a fast algorithm. The following notion allows us to capture which connections a path complex is supposed to represent.
Definition 17. Given a DAG , define a path complex for as a path complex in s.t. for any pair , there is a unique path from to in .
Intuitively, S encodes the part of the reachability structure of G that should be captured by P. This concept is useful because we will effectively show that shortcutting all the paths in an appropriately chosen path complex is enough to shortcut the entire graph. In particular, we will derive this path complex from an -chain cover, and we pick S to be the out-reachability of the chains. Intuitively, this shows us that the outgoing connectivity from this -chain cover is what we need to consider for finding good shortcut sets. Or in other words: -chain covers help computing shortcut sets with smaller diameter because they allow us the focus on a smaller set of connections to shortcut. Additionally, these connections exhibit strong structure.
For the technical part of this section, fix an -vertex DAG , let be the target diameter, and fix an -chain cover for with . Assuming a DAG is w.l.o.g. by the following folklore observation: in a general digraph, add a bidirected star on every strongly connected component and contract the components, which costs edges and time. Chains are paths in , but SuperShort() contains the edges between consecutive chain nodes anyway. So we add these at most edges to ; this preserves and the covering property, and makes every chain a path in . We do not repeat these in the statements of definitions, lemmas, or theorems to improve readability.
Our efficient construction of shortcut sets relies on the fact that the structure outlined in the following lemma compactly represents a path complex for the reachability structure outgoing from (i.e., the union of all paths in the trees form a path complex for ).
Since we later prove that shortcutting all paths in this path complex is good enough to obtain a shortcut set in the original graph, this specific path complex from the next lemma is useful as it gives us computationally quick access to the encoded paths and their reachability information.
Lemma 18. In time, we can compute a set of subtrees of , each rooted at the first node of the respective chain such that for all , , with , we have
(1) there is a path from u to v in ,
(2) if the path from u to v in uses a node w from , then is a path in , and
(3) on the path u to v in , any nodes from appear consecutively.
This structure stores a path complex (which could contain paths of length) as a set of subtrees of , that is within space. Additionally, performing searches on these trees allows us to answer queries about the outgoing reachability of the chains efficiently. Note that property (3) also holds for , that is is always a subpath of .
Proof. We compute a set of trees with the claimed properties by running a modified DFS from the first node in any chain. For this modified DFS, we make two adjustments to the order in which nodes are explored: (A) if there are multiple possible nodes to explore and at least one of them is on the same chain as the current node, explore the one of these nodes that is first in this chain, and (B) otherwise, break ties between possible next choices consistently (e.g., according to a fixed numbering of all nodes).
Rule (A) ensures that properties (1) and (3) hold and both rules together imply property (2). For (1) observe that (A) ensures that during the computation of any node is processed before any node that is reachable from in . By the definition of a DFS this means that all these nodes will be in the subtree of rooted at .
For (3), assume that there are and such that the path from to in uses nodes from some chain non-consecutively. Let be the first node from that appears on this path and let
be the last. When was processed by the DFS, this has made the node available, which by rule (A) must have been processed next. Continue this argument inductively to see that must be a path in . Since paths in trees are unique, this means that must contain as a subpath, contradicting our assumption that there are non-consecutive nodes from in .
For (2), note that rules (A) and (B) fix, for every node, a priority order on its out-neighbors that does not depend on the root of the DFS. On a DAG, such a DFS reaches every node first along the lexicographically smallest path w.r.t. these priorities (a path along which it is reached earlier would be lexicographically smaller). Moreover, prefixes and suffixes of lexicographically smallest paths are again lexicographically smallest (otherwise, exchanging them would yield a smaller path, as G is acyclic). Hence, and the w-v path in , which exists by (1), are both the lexicographically smallest w-v path, so they coincide. Intuitively, all trees use the same canonical path between any two nodes.
For the rest of this section, fix the set described in this lemma. For , let be the subtree of rooted at without the subtree of the successor of on . By (1), these are the nodes for which is the last node of that can reach them. In particular, is the only node of in . If is the -th node of , we also write .
Corollary 19. The union of all paths in the trees form a path complex for .
Path complexes only serve as intuition; the proofs below work directly with the trees .
To achieve the first goal outlined at the beginning of this section (say, for ), we need to pick a subset of the chains such that (1) and (2) for any two reachable nodes which are far enough apart, there is a path where one of the sampled chains appears in the first nodes and one of the sampled chains appears in the last nodes. Regarding (1), note that due to the probability in the random sampling, in the Kogan and Parter algorithm has size . Regarding (2), note that the above holds with high probability when each chain is sampled with probability by applying a simple Chernoff bound. We will instead construe the problem as a set cover instance as follows. We fix a path complex that encodes all out-connections from (using ). The elements to be covered are the prefixes and suffixes of (normalized, see below) length of these paths, and each chain covers all of them that it intersects. It is easy to see that this instance is potentially too large to be constructed explicitly. Luckily, the greedy algorithm for set cover can be executed iteratively and implicitly.
We first prove the following lemma which allows us to ensure that no chain is too long. This will be important in running time calculations later.
Lemma 20. Given an -chain cover , there is a set of at most vertex-disjoint chains with s.t. every chain in has length at most . Also, can be computed from in linear time.
Proof. Simply take and split every chain with length more than into segments (along the topological order of the chain) of length at most to obtain . Since the chains are vertex-disjoint, there can be at most chains of length in . Splitting up the chains can result in at most one chain in with length smaller than for every chain in . Thus, there are at most of those. It is easy to verify that retains the covering property as .
To efficiently compute the set cover instance, we need to make few technical assumptions on which kind of long paths we wish to cover and how we measure their length.
Definition 21. For any pair with , define their normalized distance as the number of different chains on the path from to in , where is the chain of . Define the normalized length of a path analogously.
Intuitively, after super-shortcutting, the normalized length of a path determines its hop length up to a constant factor and the at most nodes outside .
From this we can deduce the definition for the set of paths we want to hit with our set cover.

Figure 1: The short path constructed in the proof of Lemma 23. Every red edge represents a segment of the path that has length at most (or even constant for the parts that follow a chain). and are included in the set cover . The segments between and as well as between and w are the prefix and suffix of covered by .
Definition 22. Let . A path in is a relevant subpath if has normalized length , there is exactly one node from on , namely its first node, the last node from is on a chain from and is the only node from that chain on .
Before we show how to efficiently compute a small set of chains covering all relevant subpaths, let us prove that it in fact yields a shortcut set. The core of this argument is similar to the analysis of the original Kogan and Parter analysis, but requires some care to respect the path complex given by . See Figure 1 for an illustration of the resulting short path.
Lemma 23. If is a set s.t. every relevant subpath contains at least one node from a chain in , then SuperShort( ) for is a -shortcut set of size , where is an edge from v to the first node reachable from v in C.
Proof. The size of the shortcut set is given by the size of the supershortcuts (in total ) and the edges in . Note that by Lemma 20 we can assume that each chain has at most vertices and thus there are edges in .
Let . Note that we do not require . We show that there is a path from to of length using the claimed shortcut set.
Let be any path from to . By definition of the -chain cover , there are at most nodes on that are not in . Let and be the first and last nodes from on respectively (if there are none, has at most nodes). Note that we have and and . Let be the chain of and be the chain of . Let be the last node on that can reach . Then there is a path in . If the has normalized length less than , we are done. Observe that can contain at most nodes not from and contains less than chains. Using the edges from SuperShort(), we can replace any number of consecutive nodes from the same chain with a path of length 4. Thus, there is a path from to with length in the shortcutted graph and thus from to , there is a path with length at most .
Now consider the case where has normalized length at least , so its prefix and suffix of normalized length are disjoint. Since hits all relevant subpaths, it hits the prefix and suffix of with normalized lengths (both are relevant subpaths: the suffix is a path in the tree of its first chain by Lemma 18 (2), and we may assume that is the only node of on , as by (3) we can move to the first such node and then reach the original within 4 hops along ), assume it does so by chains . Then there are and s.t.
(1) is an edge in ,
(2) is on ,
(3) is at most as late on as some node on the suffix of .
From this, we can conclude that
is a path in where every segment has length and so the total length is . See Figure 1 for an illustration of this path.
The following lemma is the key to efficiently computing how many prefixes each chain is able to cover.
Lemma 24. There is a one-to-one correspondence between relevant subpaths starting on a chain and leaves of normalized depth in the trees if they are truncated to normalized depth (i.e., every root path is cut directly after its first node on the -th chain).
Proof. This follows directly from the definition. Let be a relevant subpath and the chains on it. Write for the only node from on and for the only node from on . Then it is easy to see (1) is a leaf in and (2) that it is the only relevant subpath containing this leaf, yielding the bijection.
Before we proceed, we give a formal definition of the potential underlying the set cover instance.
Definition 25. Given a subset of the chains , a chain and a node from a chain , write for the number of relevant subpaths that are (1) not covered by , (2) originate in , and (3) on which is the first node from that appears. Similarly, define as the number of such uncovered relevant subpaths on which a node from appears. Call this the covering potential of nodes and chains, respectively.
Observe that in this counting all the prefixes originating on a specific chain are counted within where is their first node.
While Lemma 24 will help us count how many prefixes can be covered using a specific node, the following lemma allows to deduce how useful an entire chain is from that information.
Lemma 26. For any chain , we have that .
Proof. Take an arbitrary uncovered relevant subpath hit by . Assume it originates on and is the first node on that appears in the relevant subpath. Then this relevant subpath is counted precisely in and in no other element of the right-hand side of the equation.
To execute the greedy algorithm for set cover efficiently, we need two important subroutines: (1) compute for all and , and (2) given a chain to include into the partial set cover , update these values.
The following lemma shows that the first of these tasks can be achieved in time. See Figure 2 for an illustration of the resulting data structure.
Lemma 27. For the empty set of picked chains , we can compute all and values in time.
Proof. Using Lemma 18, we can compute the trees in time. These we can truncate to normalized depth in time linear in their size, so time.
Additionally, for each such tree, say with root node , we compute for each node whether there is a node from the chain of on its paths from the root . Since all nodes from a chain must appear consecutively in the tree, this can be simply done by checking if 's predecessor is on the same chain. In total, this again requires time.

Figure 2: Result of computing for the nodes in . Observe that multiple nodes from the chain appear in and only those occurrences that are not a descendant of another node from in are assigned non-zero values.
Now, given a tree , for each node that does not have a node from its chain as a predecessor in , we can calculate as the number of leafs of normalized depth in the subtree rooted at . Using the standard dynamic program on trees, this can be done in time per tree, so again time in total.
This calculation is correct by Lemma 24. See Figure 2 for an illustration of the result.
As by Lemma 20, we may assume that every chain has at most nodes and thus using Lemma 26 we can compute the values for , that is the covering potential of the chains in time (each node is on exactly one chain and we have to sum up its covering potential wrt. chains).
Lemma 28. We can process a series of k operations of the following type in time: Given a set of picked chains , and corresponding values and , and a chain , update the and values wrt. .
Proof. Preprocessing. By a linear scan through all trees , precompute for each node and each chain the node s.t. (i.e., the last node on that can reach ). This can be stored in a simple lookup table TreeFinder of size . Additionally, for any and , if there are nodes s.t. is the direct parent of in , then contract them into a single node. Note that in this case we had by definition. This changes nothing about the connectivity structure of and only removes some redundant nodes. This compaction can be implemented via a DFS through the trees and thus in total time .
Update operation. Relying on Lemma 24, we will find all nodes whose covering potential for some needs to be updated by finding those whose covering potential depends on leaves in some that are newly covered by . We assume the trees are truncated to normalized depth .
Algorithm 2: Updating the covering potentials via the truncated trees .
1 For every , :
2 1. Find the unique s.t. using TreeFinder (skip if there is none).
3 2. For all ancestors of , we reduce their value by .
4 3. For all descendants of in (including ), set their value to 0.
5 4. Delete and its subtree from , updating TreeFinder in the process.
To perform the updates, use Algorithm 2. Note that through the chain covers all relevant subpaths corresponding to the leafs in the truncated subtree of in (for , these are all relevant subpaths starting at ). These are counted precisely for the non-zero values of in such that is an ancestor or a descendant of u in . Also note that every time we update a covering potential for a node, we can easily update the covering potential for its chain in the process at no asymptotic increase to the running time.
Let us now count the amortized cost of of these operations. The loop at the beginning of the algorithm runs times. Step 1 can be implemented in constant time since TreeFinder is precomputed. For Step 2, observe that since the trees are truncated to have normalized depth at most , the path from to the root contains nodes from at most different chains and by the compaction above, only one node per chain. Additionally, it contains at most nodes in . So has at most ancestors for which need to reduce their covering potential. Therefore, in total the Steps 1 to 2 take at most time per iteration of the loop, i.e., per operation.
For Step 3 and 4, we amortize over all operations. Since any node in any of the trees is deleted at most once, we incur total time at most .
Now we have all pieces in hand to prove our main theorem.
Theorem 3 (Deterministic Shortcut Sets). For any , there is a deterministic -time algorithm computing -size -shortcut sets.
Proof. Compute an -chain cover by Lemma 13 and split it by Lemma 20. Use Lemma 18 to compute the trees , then use Lemma 27 to compute the initial covering potential of all nodes and chains. Adding the running times from these lemmas shows that this setup time is within the claimed bounds.
Now we are ready to solve our set cover instance: Iterate over all chains to find the one with the maximal potential. This takes time. Then use the algorithm from Lemma 28 to update the covering potential of all nodes and chains. Repeat this process until no chain has positive covering potential anymore. Let the resulting set of chains be .
We show that . Consider the following fractional solution to the set cover instance for covering all relevant subpaths with chains from . Simply assign each chain the fractional value . Since each relevant subpath contains exactly different chains, the sum of the chains covering it, is 1. Thus, this fractional assignment solves the set cover instance with total weight . It is well known that the greedy solution to a set cover instance is within a log-factor from the fractional optimum. Since there are at most relevant subpaths, this log-factor is at most . Thus, we have .
Plugging this into Lemma 28, shows that we can process all updates in time.
Plugging this into Lemma 23, give size and quality of the shortcut set. In particular, the size is , giving the desired bound.
Note that the running time is in instead of if and , which is the interesting setting. This is the same asymptotic bound (including the same log factors) as in [KP22c]. We believe that the techniques in this section can also be used to derandomize the algorithm from [KP22c] for the regime where , matching the known bounds again, but we do not prove this here.
6 Fast Sourcewise Approximate Distance Preservers
The goal of this section is to present our fast algorithms for sourcewise approximate distance preservers.
Theorem 5 (Fast distance preservers). Let be an n-vertex DAG with m edges, nonnegative edge-weights, and polynomial aspect ratio. Let and , and write and . Then one can compute -approximate distance preserver of , with edges in running time
• when , and
• when .
We will prove this theorem by combining the fast hopset constructions from Lemmas 43 and 44 with the hopset-to-preserver reduction of Kogan and Parter [KP22b]. The only point in that reduction that is too slow for our setting is the call to hop-bounded all-pairs shortest paths. We replace that APSP call in two different ways.
First, for internal hopset edges, we design a data structure that, when queried with a hopset edge , outputs a low-hop -approximate shortest -path in the underlying graph, which we call a witness path. This data structure is summarized in Lemma 29.
Lemma 29 (Fast witness paths for hopset edges). Let be an n-vertex DAG with m edges, nonnegative edge weights, and polynomial aspect ratio. Let be -approximate hopsets for G produced by Lemma 43 or Lemma 44, with hopbounds at most and , respectively. Then in preprocessing time, we can equip hopset with a data structure guaranteeing that every edge can be expanded in time into a path of at most edges and weighted length at most . Moreover, for any queried subset , the total time to report all witness paths is .
Proof. We defer the proof of this lemma to Section 7.
Second, for each source in our source-restricted distance preservers, we need to compute hop-bounded single-source shortest paths rooted at . We prove this can be computed efficiently in Lemma 30.
Lemma 30 (Fast rooted path retrieval for hopsets). Let be a -approximate hopset of a graph produced by Lemma 43 or Lemma 44 with hopbound at most . Then for every root , one can in time compute, for every vertex reachable from , a path with at most edges and weighted length .
Proof. We defer the proof of this lemma to Section 7.
We are now ready to prove Theorem 5.
Proof of Theorem 5. If , then the empty subgraph is a valid output. Hence assume . For each , let , so . All hopbound parameters below are rounded up to integers. This changes all bounds only by constant factors. Also, denotes the parameter given to Lemmas 43 and 44, so the actual hopbound of and the lengths of the paths in Lemmas 29 and 30 are .
Sourcewise reduction from a collection of hopsets [KP22b]. Let be a positive real parameter that we will choose later. Let be a hopset hierarchy of -approximate hopsets for , where has hopbound at most and for . Set and . Assume that for each , the hopset is equipped with the witness-path data structure of Lemma 29 using as its auxiliary hopset (for , as , the witness paths are shortest paths in ), and that the last level is also equipped with Lemma 30.
We build a subgraph as follows. Intuitively, we route every demand pair through and then repeatedly replace each hopset edge by its witness path one level lower, until only G-edges remain. For every source with , invoke Lemma 30 on rooted at . This yields, in time, paths for all vertices reachable from , with and . For every demand pair with reachable from , traverse
A hopset hierarchy is just a collection of hopsets with different hopbounds that we will specify later.
, insert every edge of that belongs to into the output graph , and insert every edge of that belongs to into a set .
Then, for , process every edge once. Query the witness-path data structure of level for , obtaining a path with at most edges and . Insert every -edge of into the output, and insert every -edge of into a set . Let be the union of all inserted -edges.
We now prove correctness. For every and every , define recursively a path by fully expanding every hopset edge in down to level 0. We claim that
The proof is by induction on i.
For , we have because , and therefore
Assume the claim holds for level , and let . Each edge on is either a -edge or an edge of . If , we keep it as is. If , then by construction, so we may replace it by . Since hopset edges are weighted by exact -distances, ; hence the induction hypothesis gives . Because , every edge of contributes at most a factor to the weight after full expansion. Therefore,
Now fix a pair with reachable from , and let be the path obtained by fully expanding every -edge of using the corresponding paths . By the same argument as above,
All edges of are inserted into by construction. Thus contains an -t path of this weight. If is not reachable from in , then it is also unreachable in the subgraph . Consequently, if
then is a -approximate distance preserver for .
The work done after these hopsets have been built is
where the last term is exactly the reporting bound of Lemma 29. Because every top-level path has at most edges, and because and every witness path has at most edges, this becomes
The output edge count is bounded by the same expression without the first summand:
It remains to choose the hopbounds and corresponding hopsets.
Throughout, a G-edge simply means an edge of the original graph G, as opposed to a hopset edge.
Case 1: .
Since , we have . Construct a nonincreasing sequence as follows: while the current value is larger than , set
(chosen so that every level contributes the same amount below). When the current value first becomes at most , append one final level equal to . If are the values before the final appended level, then satisfies for every , with . Hence .
Every level satisfies , so Lemma 44 gives a -hopset with hopbound at most , size , and construction time . By Lemma 29, augmenting level with witness-path queries costs another time, which is absorbed in the same asymptotic bound.
For every nonfinal level, the recurrence gives , and hence
The same bound also holds for the final level because and . Therefore,
Moreover,
so the rooted retrieval stage costs
Also,
and the total time to build the hierarchy is
because and every .
Then , so the reduction is correct. We obtain
which is subsumed by the stated bound , and the total running time is
Case 2: .
Since , we have ; together with , this implies .
Phase I. Construct a sequence as follows: while the current value is larger than , set
When the current value first becomes at most , append one final level equal to . Exactly as in Case 1, this gives . Every phase-I level lies in , so Lemma 44 and Lemma 29 give hopsets with total construction time
Also, every phase-I level contributes
SO
Phase II. Starting from , construct a nonincreasing sequence as follows: while the current value is larger than , set
When the current value first becomes at most , append one final level equal to . If are the values before the final appended level, then satisfies for every , with . Hence . Rename the phase-II hopsets as
so that the full hierarchy is with and final hopbound .
Every phase-II level lies in , so Lemma 43 and Lemma 29 give hopsets with size and construction time . Since for every nonfinal level,
The same estimate holds for the final level because and . Therefore,
Similarly, the total construction time in phase II is
Because the final hopset satisfies
the rooted retrieval stage again costs
and the total length of all top-level source-to-target paths is
Then , so the reduction is correct. Since , we have , and therefore
Combining this with the size bound yields
which is subsumed by the stated bound . The total running time is
because when .
This proves both running-time bounds and the stated edge bound.
7 Data Structure for Reporting Hopset Witnesses
In this section, we present the proofs of our hopset data structures that we use in the fast approximate distance preserver construction in Section 6. We begin with Lemma 30, which guarantees that we can compute hopbounded single-source (approximate) shortest paths efficiently, given our hopsets constructed in Lemma 44 and Lemma 43.
Lemma 30 (Fast rooted path retrieval for hopsets). Let be a -approximate hopset of a graph produced by Lemma 43 or Lemma 44 with hopbound at most . Then for every root , one can in time compute, for every vertex reachable from , a path with at most edges and weighted length .
We want to find an efficient data structure to store the low-hop approximate shortest paths starting at r guaranteed by the hopset. The lemma shows this is possible by first computing a shortest path tree from r and then rehanging parts of it using the chain shortcuts and the sampled-vertex-to-sampled-chain shortcuts from H. This reduces the height of the tree and thus the hop-length of the stored paths. The properties of the hopset construction will guarantee that will not increase the weights of the paths beyond the desired approximation guarantee.
Proof. We build one structure per distance scale and use it for the pairs with . Let , and be the sampled vertices, the chains, and the sampled chains used to construct at this scale. Let be the fixed shortest path tree from of Lemma 35, so its root paths are the paths and it does not depend on any random choice. Every node stores a link: an ancestor of in together with a path in from that ancestor to . We obtain by following the links from up to . By default, the link of is its tree edge. We change it in two cases, where (2) takes precedence over (1):
(1) If lies on a chain and its highest ancestor on is at least three hops above , we link to via the exact two-hop path in .
(2) If lies on a sampled chain and has depth more than , let be the first node of on its root path. We link to via the edge of Lemma 39 (with ) and the exact two-hop path from to in .
By Lemma 35, w.h.p. such has depth at most . Hence, at most one link of type (2) is used on , all other links are exact, and exactly as in Lemma 41, we get .
For the hop bound, walk from v upwards. By (1), we meet every chain in nodes. We meet at most nodes outside the chains: at most above the first node of on , and at most below it by Condition (A5). Since T and the links of type (1) do not depend on the sampling of the chains, w.h.p. one of the first distinct chains we meet is sampled. At its node, we are either at depth at most or use a link of type (2) to jump to depth at most . Hence, has hops.
We compute by Lemma 7 and all links in one DFS over , maintaining the highest node of every chain on the current root path and the first node of on it, and undoing changes when backtracking. The edge is found by binary search over the bucket edges from to , and the two-hop paths in via its recursive construction. Hence, the total time is .
At a high level, Lemma 29 guarantees that when queried with an edge from a hopset H constructed using Lemma 44 or Lemma 43, we can recover a low-hop path in the underlying graph between the endpoints of that hopset edge.
Lemma 29 (Fast witness paths for hopset edges). Let be an n-vertex DAG with m edges, nonnegative edge weights, and polynomial aspect ratio. Let be -approximate hopsets for G produced by Lemma 43 or Lemma 44, with hopbounds at most and , respectively. Then in preprocessing time, we can equip hopset with a data structure guaranteeing that every edge can be expanded in time into a path of at most edges and weighted length at most . Moreover, for any queried subset , the total time to report all witness paths is .
Proof. We assume our hopset hierarchy was constructed using Lemma 43 and Lemma 44. Moreover, assume that our data structure has access to the sampled vertices and (sampled) chains used in the construction of these hopsets.
We divide the edges in hopset into two categories: edges added while super-shortcutting chains and edges added from sampled vertices (lets say ) to sampled chains. Call these type one edges and type two edges. We treat them differently.
For type one edges, recall how super-shortcutting a chain (for Lemma 44, the chain of portals) works: We find the middle vertex of the chain and add edges from all predecessors on the chain to it and add edges to all its descendants of the chain. Then, recurse on the half of the chain before the middle vertex and the half after separately. We mirror this recursion and apply Lemma 30 with the middle node as with hopset . Afterwards, we split the instance into two halves and . Notice two things: (1) as we operate on DAGs, the only part of the graph that is necessary to find the witnessing path for an edge are the vertices between in the topological partial order, and (2) the sum of the sizes of these two instances is at most (after a one-time preprocessing of , Lemma 30 only scans the G-edges of an instance). Thus, constructing the trees from Lemma 30 required to answer queries for edges of type one, takes time per chain used to construct , thus in total.
For type two, it is directly enough to run Lemma 30 with all vertices from as roots. This takes time.
8 Reductions to DAGs due to [HJS26]
In this section, we state the two lemmas due to [HJS26] that allow us to assume our input graphs are DAGs in our fast hopset and distance preserver algorithms.
This is for Lemma 43. For Lemma 44, only portals get links of types (1) and (2), and (1) points to the highest proper ancestor that is a portal of the same chain. Then following the links from v is exactly the walk in the proof of Lemma 44 for , so its claim gives hops.
Lemma 31 ([HJS26]). Suppose there exists an algorithm that, given an m-edge, n-vertex DAG, computes a -approximate hopset of size and hopbound in time , for . Then there exists a randomized algorithm that, given an m-edge, n-vertex directed graph, computes a -approximate hopset of size and hopbound in time .
Lemma 32 ([HJS26]). Suppose there exists an algorithm that, given an m-edge, n-vertex DAG and a set of p demand pairs with sources, computes -approximate distance preserver of size in time , for . Then there exists a randomized algorithm that, given an m-edge, n-vertex directed graph, computes -approximate distance preserver of size in time .
9 A Simple Algorithm for -Hopsets on DAGs due to [KP22c]
In this section, we present a simple algorithm for -hopsets on DAGs that is implicit in the work of [KP22c]. The reason we present this algorithm is because it is the basis for our faster algorithms for -hopsets.
Theorem 33. Let be an n-vertex DAG with nonnegative edge-weights and polynomial aspect ratio . For every there exists a -hopset of size and hopbound .
Let TC(G) denote the metric closure of G: for every reachable pair , TC(G) contains an arc of weight . A chain is an arbitrary directed path in TC(G). We say that a chain is a lightest chain if it is a shortest path in TC(G).
Definition 34 (Lightest chain). A chain in TC(G) is a lightest chain if
Sampling vertices. Fix a parameter , which in the proof of Theorem 33 we will later set to
Sample each vertex in independently with probability
where is a sufficiently large absolute constant, and let be the sampled set. For every , fix a shortest path tree from independently of the sampling (e.g., by Lemma 7 with consistent tie-breaking), and let be its -t path. Our sampled vertices provide the following guarantee.
Lemma 35 (Vertex sampling guarantee). With high probability, the following two events hold simultaneously:
(1)
(2) For every reachable ordered pair , if has , then one of the first vertices of is contained in .
Proof. The bound on follows from a standard Chernoff bound. For the second part, fix a reachable pair such that has more than vertices. If , then the claim is immediate. Otherwise, the probability that none of the first vertices of is sampled is at most
A union bound over all ordered pairs in TC(G) finishes the proof (this is why we fix one path per pair: there can be exponentially many shortest paths).
We now build the hopset as a union over distance scales. Let and . Let
be a bucketing over all finite distances in , and note that
where is the aspect ratio of graph . For each we will construct a hopset that handles all ordered pairs with
Since , it will be sufficient to prove for one fixed scale.
For the remainder of this section we fix a scale and focus on constructing .
Lemma 36 (Maximal lightest chain cover at scale L). There exists a family of pairwise vertex-disjoint lightest chains in such that every has at least vertices and weight at most , and the family is maximal under inclusion. Consequently,
Moreover, if is a lightest chain with , then at most vertices of lie outside .
Proof. Start with the empty family and keep adding eligible chains until no more can be added. This gives the maximal family . Since the lightest chains are vertex-disjoint and each contains at least vertices, the size bound follows immediately.
Now let be a lightest chain with . Partition into at most consecutive subchains, each of weight at most . If any such subchain contained at least vertices that do not lie in , then those uncovered vertices, in their order on , would form a new lightest chain in with at least vertices and weight at most . It would also be vertex-disjoint from every lightest chain already in , contradicting maximality. So each subchain contains fewer than uncovered vertices, and the total number of uncovered vertices on is at most .
Lemma 37 (Shortcutting a chain). Let be a lightest chain in . There is a set of edges such that for every , contains a path of weight exactly and with at most two hops.
Proof. This lemma can be proven using a recursive shortcutting procedure (see, e.g., [Ras10] for details).
Add the edges of to for every chain . Since the chains in are vertex-disjoint, these exact chain shortcuts contribute only edges to hopset .
Sampling chains. Independently sample each chain in with the same probability
where is a sufficiently large constant, and let be the sampled subfamily.
We assume positive edge weights. Zero weights can be handled by adding to every edge weight, where is the smallest positive weight, and computing the hopset of the resulting graph, with its edges weighted by their distances in G.
Lemma 38 (Sampled chains). With high probability,
In particular, if , then
Proof. This is another standard Chernoff bound.
For every and every , we add a small set of forward edges from to our hopset . Let
For every define
If , let be the earliest vertex of on , and add the edge with weight to hopset . We define our final hopset of to be .
Lemma 39 (Earliest-bucket edges). Fix , , and reachable from . Then contains an edge such that is not later than on and
Proof. Let j be the unique index with
Then , so is defined. By construction it is the earliest vertex of on , hence it is not later than on . Also,
Lemma 40 (Rerouting through chain shortcuts). Let be a shortest path in (viewed as a lightest chain in ), and let be a family of pairwise vertex-disjoint lightest chains. After adding the shortcut sets from Lemma 37 for all , there is a path in with the same endpoints and the same weight as such that every chain contributes at most three vertices to . Moreover, every vertex of outside already belongs to outside that union.
Proof. We process the chains of Q one by one. At every step the current path is still a lightest chain in TC(G), because all the edges we use have weight equal to the original graph distance between their endpoints.
Fix a chain . If the current path meets Q in at most three vertices, do nothing. Otherwise, let a and b be the first and last vertices of the current path that lie on Q. Since G is acyclic, a and b appear in the same order on the current path and on Q. By Lemma 37, contains an path of at most two hops and weight exactly . Replace the whole subpath between a and b by this exact shortcut. This preserves the total weight, and afterwards the current path uses at most three vertices of Q.
Because the chains in Q are vertex-disjoint, later replacements never touch the vertices of Q. Also, every replacement only shortcuts through vertices of the processed chain, so no new vertex outside is introduced. After all chains have been processed, the resulting path is the desired path .
Lemma 41 (Routing from a sampled suffix). Suppose every chain has weight at most , where . Let be a shortest -path in with
Suppose some vertex lies among the first vertices of , and the suffix contains at most vertices outside , where . Then, with high probability, contains an -path such that
Proof. Intuitively, we follow exactly up to , jump from to a sampled chain near the end of , and follow the (rerouted) path from there; only the jump loses a factor . Apply Lemma 40 to the suffix and the family . We obtain a path from to of the same weight such that every chain contributes at most three vertices to , and still contains at most vertices outside .
If , then the concatenation already has hops and exact weight , since .
Otherwise, let be the suffix of consisting of its last vertices, for a sufficiently large absolute constant . Since has at most vertices outside the chains, at least vertices of lie on chains of . Because every chain contributes at most three vertices to , the suffix intersects distinct chains of .
By the chain-sampling probability and the assumption , with high probability at least one of these chains belongs to . Fix such a sampled chain , and let . By Lemma 39, there is an edge such that is not later than on and
Also, by Lemma 37, there is an path inside of at most two hops and weight exactly . Since is a lightest chain of weight at most ,
Consider the path that follows , then the hopset edge , then the at-most-two-hop exact route from to inside , and finally the suffix . Its hop count is
because and lies among the last vertices of .
For the weight, note that every edge of has weight equal to the original distance between its endpoints, so the concatenation is a lightest chain from to . Since appears after on this chain,
Therefore
This proves the claimed stretch bound.
Lemma 42 (Constructing one scale once the chains are known). Once the set and a pairwise vertex-disjoint family are fixed, the corresponding edge set can be generated in time.
Proof. For every chain , the set from Lemma 37 can be generated in time proportional to its size. Since the chains are vertex-disjoint, this costs in total.
For the bucket edges, run one shortest-path computation from each source vertex . For each such source we then scan the sampled chains in their internal order and emit the earliest edge for every nonempty bucket. Because the chains are vertex-disjoint, this scan costs per source vertex, and the total time to emit the bucket edges is additionally proportional to their number. This gives total running time .
Proof of Theorem 33. Set . For every scale , construct the maximal family from Lemma 36, add the exact shortcut sets for all , sample the subfamily , and add the corresponding bucket edges.
Let us first bound the size. By Lemma 35,
By Lemma 36 and Lemma 38,
Thus the bucket edges contribute
edges at scale . The exact chain shortcuts contribute only more edges at that scale. Since , altogether .
Now fix a reachable ordered pair , and let , viewed as a lightest chain in . Let be the unique scale with
If , then there is nothing to prove. Otherwise, Lemma 35 gives a vertex among the first vertices of . Since
Lemma 36 implies that the suffix contains at most vertices outside . Applying Lemma 41 with and yields, with high probability, an -path in with hops and stretch ; rescaling by a constant gives the claim.
10 Deriving Fast Hopsets For All Parameters
The construction for -hopsets in Section 9 (and in particular, Lemma 42) suggests that to compute -hopsets in our desired time complexity, it is sufficient to compute a lightest chain cover quickly. In this section, we formally show that plugging in the light chain cover construction described in Algorithm 1 into the hopset construction described in Section 9 yields the following lemma.
Lemma 43. Let be an n-vertex, m-edge directed acyclic graph with nonnegative edge-weights and polynomial aspect ratio. For any and hopbound , there is an -time algorithm computing -size -hopsets with hopbound.
Later in this section, in Lemma 44, we will give a separate proof of sublinear-size -hopsets for the case where . This needs an additional subsampling trick and randomly chosen portals, which is why we handle it separately. This idea is inspired by a similar trick from [KP23], originally developed for shortcut sets.
Proof of Lemma 43. We follow the construction from Section 9, and only replace the chain-cover step by Lemma 12. Set and , and let
For each , the scale-L hopset handles all pairs with
Fix a scale . Sample every vertex with probability and let be the sampled set, where is a large enough constant again. By Lemma 35, with high probability
Apply Lemma 12 directly to G and this set to obtain a family satisfying Definition 11. Thus
every is a lightest chain of weight at most , and the chains are pairwise vertex-disjoint.
Now build exactly as in Section 9: add the exact shortcut sets , sample a subfamily , and add the bucket edges from to . Using Lemma 38 and the disjointness of the chains,
Since , this gives
By Lemmas 12 and 42, the total running time is
where we assume w.l.o.g. that , as isolated vertices can be ignored.
For stretch and hopbound, fix a reachable pair and let be the fixed shortest -path of Lemma 35, viewed as a lightest chain in . Choose the unique scale with
If , then itself already has at most hops. Otherwise, by Lemma 35, some vertex lies among the first vertices of . Since
the cover property of implies that the suffix contains at most vertices outside . Applying Lemma 41 with , the family , and parameter yields an -path in with hops and weight at most
A union bound over all scales and ordered pairs shows that, with high probability, one random choice of the samples works simultaneously for every pair. Hence the algorithm computes a -hopset with the claimed size, hopbound, and running time.
We also obtain a faster construction of -hopsets with edges and hopbound , by a slight modification of the construction in Section 9.
Lemma 44. Let be an n-vertex DAG with m edges, nonnegative edge-weights, and polynomial aspect ratio. Let , and let be an integer with . Then one can compute -hopset for with hopbound at most and size at most in running time .
Proof. As in Section 9, we work one distance scale at a time and then take the union over all scales.
Set , and . Let
Since the aspect ratio is polynomial, . For each , the hopset will handle all reachable pairs with .
Fix one scale L, and write
Since , we have , and therefore . Sample every vertex in independently with probability , and let be the sampled set. By Lemma 35, with high probability, , and every path with more than vertices contains some vertex of among its first vertices.
Apply Lemma 12 with parameter to obtain a family satisfying Definition 11. Thus , every is a lightest chain of weight at most , and the chains are pairwise vertex-disjoint.
Sparse exact hop edges. Independently of all other random choices, make every vertex a portal with probability , so . For each chain , the portals of form a subsequence , which is again a lightest chain. Apply Lemma 37 to , and let be the resulting edge set. So any two portals of are joined by an exact path with at most two hops. We cannot walk along between other vertices, since consecutive vertices of are in general only joined by edges of . Instead, the analysis below follows the shortest path itself and only jumps between portals that this path visits. Random portals ensure that it visits them often enough.
Since the chains are vertex-disjoint and, by Chernoff, w.h.p. there are portals,
Subsampling the chains. Sample each chain in independently with probability
and let be the sampled subfamily. By Chernoff, or trivially when ,
For every and every , add the earliest-bucket edges from to , i.e., to the earliest portal of in each bucket, exactly as in Section 9. Let be the union of all edges in the sets and all these bucket edges.
Using the same counting as in Section 9,
By Lemma 12 and the same implementation as in Lemma 42, the scale-L construction takes time
because . Summed over all scales, this is .
Correctness. Fix a reachable ordered pair , and let be the fixed shortest path . Choose the unique scale for which
If , there is nothing to prove. Assume therefore that . By Lemma 35, some vertex lies among the first vertices of . Since , property (A5) of Definition 11 implies that the suffix contains at most vertices outside .
Consider the walk from backwards along that, whenever it is at a portal of a chain and contains an earlier portal of , jumps to the first portal of on using the two exact hops of . Read forwards, this is an exact path.
We claim that w.h.p., within hops, the walk reaches or visits portals of distinct chains. In the first case we are done, as the rest of has at most hops. For the claim, suppose that neither happens. After the walk has visited a portal of a chain , it jumps at most once and then only visits vertices of on before its first portal. By the choice of , w.h.p. there are at most of them. Together with the at most vertices outside the chains, this accounts for at most of the first hops. Each of the other hops reaches a vertex of a chain without a visited portal, which is a portal with probability , independently of the walk so far. So by the choice of , w.h.p. at least of these hops reach a portal, a contradiction.
Since the chains are sampled independently of the walk, w.h.p. one of these chains, say , belongs to . Let be the first portal of that the walk visits; it lies on after . By Lemma 39 applied to , contains an edge to a portal such that is not later than on and
By construction of , there is an exact path in using at most two hops, and
Let be the path that follows , then the edge , then the exact route inside , and finally the walk from to . Its hop count satisfies
For the weight, exactly as in Lemma 41,
Thus supplies a -approximate path with at most hops for every pair at scale . A union bound over all scales and all ordered pairs shows that, with high probability, one random choice works simultaneously for every pair. Therefore
and is a -hopset of hopbound at most computed in time .
AI Use Declaration
An initial version of this paper was prepared entirely without the use of AI. Afterwards, AI was used to implement reviewer feedback and minor fixes.
References
[AB18] Amir Abboud and Greg Bodwin. “Reachability preservers: New extremal bounds and approximation algorithms”. In: Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms. SIAM. 2018, pp. 1865–1883. doi: 10.1137/1.9781611975031.122.
[ABP18] Amir Abboud, Greg Bodwin, and Seth Pettie. “A hierarchy of lower bounds for sublinear additive spanners”. In: SIAM Journal on Computing 47.6 (2018), pp. 2203–2236. DOI: 10.1137/16M1105815.
[ASZ20] Alexandr Andoni, Clifford Stein, and Peilin Zhong. “Parallel approximate undirected shortest paths via low hop emulators”. In: Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing. 2020, pp. 322–335. DOI: 10.1145/3357713.3384321.
[Bal+25] Ben Bals, Joakim Blikstad, Greg Bodwin, Daniel Dadush, Sebastian Forster, and Yasamin Nazari. “Greedy Algorithms for Shortcut Sets and Hopsets”. In: arXiv preprint arXiv:2511.20111 (2025). doi: 10.48550/arXiv.2511.20111.
[BCE05] Béla Bollobás, Don Coppersmith, and Michael Elkin. “Sparse distance preservers and additive spanners”. In: SIAM Journal on Discrete Mathematics 19.4 (2005), pp. 1029–1055. DOI: 10.1137/S0895480103431046.
[BGW20] Aaron Bernstein, Maximilian Probst Gutenberg, and Christian Wulff-Nilsen. “Near-optimal incremental SSSP in dense weighted digraphs”. In: 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2020, pp. 1112–1122. doi: 10.1109/FOCS46700.2020.00107.
[BH23] Greg Bodwin and Gary Hoppenworth. “Folklore sampling is optimal for exact hopsets: Confirming the barrier”. In: 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2023, pp. 701–720. doi: 10.1109/FOCS57990.2023.00046.
[Bod+17] Greg Bodwin, Fabrizio Grandoni, Merav Parter, and Virginia Vassilevska Williams. “Preserving Distances in Very Faulty Graphs”. In: 44th International Colloquium on Automata, Languages, and Programming (ICALP 2017). Schloss Dagstuhl–Leibniz-Zentrum für Informatik. 2017, pp. 73–1. doi: 10.4230/LIPIcs.ICALP.2017.73.
[Bod17] Greg Bodwin. “Linear size distance preservers”. In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms. SIAM. 2017, pp. 600–615. doi:10.1137/1.9781611974782.39.
[Bod21] Greg Bodwin. “New results on linear size distance preservers”. In: SIAM Journal on Computing 50.2 (2021), pp. 662–673. doi: 10.1137/19M123662X.
[BW16] Greg Bodwin and Virginia Vassilevska Williams. “Better distance preservers and additive spanners”. In: Proceedings of the twenty-seventh annual ACM-SIAM symposium on Discrete algorithms. SIAM. 2016, pp. 855–872. doi: 10.1137/1.9781611974331.ch61.
[BW23] Aaron Bernstein and Nicole Wein. “Closing the gap between directed hopsets and shortcut sets”. In: Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2023, pp. 163–182. doi: 10.1137/1.9781611977554.ch7.
[Các23] Manuel Cáceres. “Minimum Chain Cover in Almost Linear Time”. In: 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023). Vol. 261. Leibniz International Proceedings in Informatics (LIPIcs). 2023, 31:1–31:12.
[CC20] Shiri Chechik and Sarel Cohen. “Distance sensitivity oracles with subcubic preprocessing time and fast query time”. In: Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing. 2020, pp. 1375–1388. DOI: 10.1145/3357713.3384253.
[CE06] Don Coppersmith and Michael Elkin. “Sparse sourcewise and pairwise distance preservers”. In: SIAM Journal on Discrete Mathematics 20.2 (2006), pp. 463–501. DOI: 10.1137/050630696.
[CFR20] Nairen Cao, Jeremy T Fineman, and Katina Russell. “Efficient construction of directed hopsets and parallel approximate shortest paths”. In: Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing. 2020, pp. 336–349. DOI: 10.1145/3357713.3384270.
[CGK13] Marek Cygan, Fabrizio Grandoni, and Telikepalli Kavitha. “On pairwise spanners”. In: arXiv preprint arXiv:1301.1999 (2013). DOI: 10.4230/LIPIcs.STACS.2013.209.
[Coh00] Edith Cohen. “Polylog-time and near-linear work approximation scheme for undirected shortest paths”. In: Journal of the ACM (JACM) 47.1 (2000), pp. 132–166. DOI: 10.1145/331605.331610.
[Cor+22] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
[EN19] Michael Elkin and Ofer Neiman. “Hopsets with constant hopbound, and applications to approximate shortest paths”. In: SIAM Journal on Computing 48.4 (2019), pp. 1436–1480. DOI: 10.1137/18M1166791.
[ENW16] Michael Elkin, Ofer Neiman, and Christian Wulff-Nilsen. “Space-efficient path-reporting approximate distance oracles”. In: Theoretical Computer Science 651 (2016), pp. 1–10. DOI: 10.1016/j.tcs.2016.07.038.
[EP16] Michael Elkin and Seth Pettie. “A linear-size logarithmic stretch path-reporting distance oracle for general graphs”. In: ACM Transactions on Algorithms (TALG) 12.4 (2016), pp. 1–31. DOI: 10.1145/2888397.
[ES23] Michael Elkin and Idan Shabat. “Path-reporting distance oracles with logarithmic stretch and size o (n log log n)”. In: 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2023, pp. 2278–2311. DOI: 10.1109/FOCS57990.2023.00141.
[Fin18] Jeremy T Fineman. “Nearly work-efficient parallel algorithm for digraph reachability”. In: Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing. 2018, pp. 457–470. DOI: 10.1145/3188745.3188926.
[FN18] Sebastian Forster and Danupon Nanongkai. “A faster distributed single-source shortest paths algorithm”. In: 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2018, pp. 686–697. DOI: 10.1109/FOCS.2018.00071.
[Gra+21] Fabrizio Grandoni, Giuseppe F Italiano, Aleksander Łukasiewicz, Nikos Parotsidis, and Przemysław Uznański. “All-Pairs LCA in DAGs: Breaking through the O (n 2.5) barrier”. In: Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2021, pp. 273–289. DOI: 10.1137/1.9781611976465.18.
[GW20] Maximilian Probst Gutenberg and Christian Wulff-Nilsen. “Decremental SSSP in weighted digraphs: Faster and against an adaptive adversary”. In: Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms. SIAM. 2020, pp. 2542–2561. DOI: 10.1137/1.9781611975994.155.
[Hes03] William Hesse. “Directed graphs requiring large numbers of shortcuts”. In: Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms. 2003, pp. 665–669.
[HJS26] Bernhard Haeupler, Yonggang Jiang, and Thatchaphol Saranurak. “DAG Projections: Reducing Distance and Flow Problems to DAGs”. In: arXiv preprint arXiv:2604.04752 (2026). DOI: 10.1145/3798129.3800928.
[HKN14a] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Decremental Single-Source Shortest Paths on Undirected Graphs in Near-Linear Total Update Time”. In: 2014 IEEE 55th Annual Symposium on Foundations of Computer Science (FOCS). IEEE Computer Society. 2014, pp. 146–155. DOI: 10.1109/FOCS.2014.24.
[HKN14b] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Sublinear-time incremental algorithms for single-source reachability and shortest paths on directed graphs”. In: Proceedings of the forty-sixth annual ACM symposium on Theory of computing. 2014, pp. 674–683. DOI: 10.1145/2591796.2591869.
[HKN15] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Improved algorithms for incremental single-source reachability on directed graphs”. In: International Colloquium on Automata, Languages, and Programming. Springer. 2015, pp. 725–736. DOI: 10.1007/978-3-662-47672-7_59.
[HP21] Shang-En Huang and Seth Pettie. “Lower bounds on sparse spanners, emulators, and diameter-reducing shortcuts”. In: SIAM Journal on Discrete Mathematics 35.3 (2021), pp. 2129–2144. DOI: 10.1137/19M1306154.
[HXX25] Gary Hoppenworth, Yinzhan Xu, and Zixuan Xu. “New separations and reductions for directed hopsets and preservers”. In: Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2025, pp. 4405–4443. DOI: 10.1137/1.9781611978322.150.
[JLS19] Arun Jambulapati, Yang P Liu, and Aaron Sidford. “Parallel reachability in almost linear work and square root depth”. In: 2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2019, pp. 1664–1686. DOI: 10.1109/FOCS.2019.00098.
[KP22a] Shimon Kogan and Merav Parter. “Beating Matrix Multiplication for n^{{1/3}}-Directed Shortcuts”. In: 49th International Colloquium on Automata, Languages, and Programming (ICALP 2022). Schloss Dagstuhl–Leibniz-Zentrum für Informatik. 2022, pp. 82–1. DOI: 10.4230/LIPIcs.ICALP.2022.82.
[KP22b] Shimon Kogan and Merav Parter. “Having hope in hops: New spanners, preservers and lower bounds for hopsets”. In: 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS). IEEE. 2022, pp. 766–777. DOI: 10.1109/FOCS54457.2022.00078.
[KP22c] Shimon Kogan and Merav Parter. “New diameter-reducing shortcuts and directed hopsets: Breaking the barrier”. In: Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2022, pp. 1326–1341. DOI: 10.1137/1.9781611977073.55.
[KP23] Shimon Kogan and Merav Parter. “Faster and unified algorithms for diameter reducing shortcuts and minimum chain covers”. In: Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2023, pp. 212–239. DOI: 10.1137/1.9781611977554.ch9.
[KP25] Shimon Kogan and Merav Parter. “Having Hope in Missing Spanners: New Distance Preservers and Light Hopsets”. In: Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2025, pp. 4352–4374. DOI: 10.1137/1.9781611978322.148.
[KS21] Adam Karczmarz and Piotr Sankowski. “A deterministic parallel APSP algorithm and its applications”. In: Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2021, pp. 255–272. DOI: 10.1137/1.9781611976465.17.
[KS97] Philip N Klein and Sairam Subramanian. “A randomized parallel algorithm for single-source shortest paths”. In: Journal of Algorithms 25.2 (1997), pp. 205–220. DOI: 10.1006/jagm.1997.0888.
[KV15] Telikepalli Kavitha and Nithin M Varma. “Small stretch pairwise spanners and approximate d-preservers”. In: SIAM Journal on Discrete Mathematics 29.4 (2015), pp. 2239–2254. DOI: 10.1137/140953927.
[Pet09] Seth Pettie. "Low distortion spanners". In: ACM Transactions on Algorithms (TALG) 6.1 (2009), pp. 1–22. DOI: 10.1145/1644015.1644022.
[Ras10] Sofya Raskhodnikova. “Transitive-closure spanners: A survey”. In: Property testing: current research and surveys. Springer, 2010, pp. 167–196. DOI: 10.1007/978-3-642-16367-8_10.
[Tho92] Mikkel Thorup. “On shortcutting digraphs”. In: International Workshop on Graph-Theoretic Concepts in Computer Science. Springer. 1992, pp. 205–211. DOI: 10.1007/3-540-56402-0_48.
[UY90] Jeffery Ullman and Mihalis Yannakakis. “High-probability parallel transitive closure algorithms”. In: Proceedings of the second annual ACM symposium on Parallel algorithms and architectures. 1990, pp. 200–209. DOI: 10.1145/97444.97686.
[Zwi02] Uri Zwick. “All pairs shortest paths using bridging sets and rectangular matrix multiplication”. In: Journal of the ACM (JACM) 49.3 (2002), pp. 289–317. DOI: 10.1145/567112.567114.