WorksComputer Science
Simplified and Faster Algorithms for the Directed Single/Dual-Failure Replacement Paths via Modulo-Layer Hitting Sets
Abstract
We study the replacement paths problem in unweighted directed graphs with vertices and edges under one or two edge failures. We give simpler and faster algorithms for both settings. Both algorithms are based on a new technique, which we call modulo-layer hitting sets. For the single-failure setting, we obtain a simple deterministic combinatorial algorithm running in time, which is nearly optimal under the combinatorial Boolean Matrix Multiplication (BMM) conjecture. In addition to removing the logarithmic overhead of the deterministic -time algorithm of Alon, Chechik, and Cohen~[ICALP'19], our algorithm admits a much simpler implementation and analysis. For the dual-failure setting, we obtain a randomized combinatorial algorithm running in time. This improves upon the previous -time combinatorial algorithm of Chechik and Zhang~[ICALP'24].
Introduction
In the replacement paths problem, we study how shortest paths change under edge failure. Specifically, given an unweighted directed graph with vertices and edges and two vertices , the classical replacement paths (RP) problem asks to compute, for every edge , a shortest - path that avoids . Its natural two-failure extension, the dual-failure replacement paths (2-FRP) problem, asks to compute, for every pair of edges , a shortest - path that avoids both and .
The replacement paths problem has been extensively studied in the literature [31, 33, 26, 19, 18, 42, 5, 16, 41, 39, 44, 30, 21, 10 VWX22, 11, 32, 8, 35, 22], motivated in part by its role as a basic model for fault-tolerant routing. In real-world networks, links may become unavailable due to failures, and it is desirable to quickly find alternative routes while preserving shortest-path guarantees. Replacement paths naturally capture this task by computing shortest routes that remain available after such failures. Beyond this networking motivation, replacement paths are also closely connected to several fundamental problems. In particular, replacement paths arise in computing Vickrey pricing for shortest paths in algorithmic mechanism design (see [34, 25]). They are also closely related to the shortest paths problem, which is itself a classical and well-studied problem [29, 17].
For the classical RP problem, the complexity differs significantly between undirected and directed graphs. Note that the output size of RP is only , since it suffices to consider failures of edges on a fixed shortest – path. For undirected graphs, RP can be solved essentially as efficiently as single-source shortest paths [31, 30]. In contrast, RP on directed graphs appears substantially harder. For unweighted directed graphs, Roditty and Zwick [39] gave a randomized combinatorial algorithm running in time. Obtaining a deterministic algorithm with a comparable running time remained open for more than a decade, until Alon, Chechik, and Cohen [1] gave a deterministic -time combinatorial algorithm. This running time is optimal up to factor among combinatorial algorithms, assuming the combinatorial Boolean Matrix Multiplication (BMM) conjecture [43]. For weighted directed graphs, RP is subcubic-equivalent to APSP [43].3 For algebraic algorithms, Vassilevska Williams [41] gave a randomized -time algorithm4 for edge weights in .
Although the notion of a “combinatorial algorithm” is not formally defined, here and throughout we use the term informally to refer to algorithms that do not rely on fast matrix multiplication, such as Strassen-like methods. Such algorithms are often viewed as more efficient in practice, since fast matrix multiplication algorithms typically involve large hidden constants. We refer the reader to [3 Section 1.1] for a more extensive discussion of the motivations for seeking combinatorial algorithms, as well as for possible operational definitions of this notion.
The 2-FRP problem is considerably less understood. Vassilevska Williams, Woldeghebriel, and Xu [VWX22] gave a -time algorithm for weighted directed graphs and an conditional lower bound for combinatorial algorithms on unweighted directed graphs. Chechik and Zhang [11] subsequently gave the first truly subcubic combinatorial algorithm for unweighted directed graphs, with running time . For algebraic algorithms, they also obtained a -time algorithm for edge weights in . Thus, for combinatorial algorithms on unweighted directed graphs, there remains a substantial gap between the known upper and lower bounds. In contrast, for undirected graphs, Nogler and Vassilevska Williams [35] recently reduced 2-FRP to single source replacement paths, yielding a -time algorithm for unweighted graphs. They left open whether a similar reduction, possibly in a weaker form, can be obtained for directed graphs. We note that, although 2-FRP considers all pairs of failed edges, its output size is only ; see § 2.2 for details.
Our Results
Table 1 summarizes the best known upper and lower bounds for RP and 2-FRP, together with our new results. Our first result is a simple deterministic algorithm for the RP problem.
Theorem 1. There is a deterministic combinatorial algorithm for the RP problem on unweighted directed graphs that runs in time.
The running time in Theorem 1 is optimal up to an factor among combinatorial algorithms [43], and removes the logarithmic overhead in the previous randomized and deterministic algorithms [39, 1].
More importantly, our derandomization is considerably simpler. The randomized algorithm of Roditty and Zwick [39] is conceptually simple, whereas its derandomization by Alon, Chechik, and Cohen [1] requires substantially more machinery, including the construction of critical paths using decremental shortest-path techniques and a greedy hitting-set procedure. To obtain a simpler deterministic algorithm, we introduce a new technique, which we call a modulo-layer hitting set. The idea is extremely simple. After performing BFS from , we partition the vertices into classes according to their distances from modulo , and use a smallest class, which has size at most , as the hitting set. We believe that the resulting algorithm is simple enough for textbook presentation and practical implementation.
Combined with the reduction of Roditty and Zwick [39], Theorem 1 also yields an efficient algorithm for computing the shortest simple – paths.
Corollary 2. There is a deterministic combinatorial algorithm for the simple shortest paths problem on unweighted directed graphs that runs in time.
Roditty and Zwick [39] reduced the simple shortest paths problem to instances of the replacement paths problem. Thus, Corollary 2 follows from Theorem 1 without any logarithmic overhead.
Our second result is a faster combinatorial algorithm for the 2-FRP problem. Our algorithm builds on our new modulo-layer hitting-set technique introduced for RP and combines it with additional ideas.
Theorem 3. There is a randomized combinatorial algorithm for the 2-FRP problem on unweighted directed graphs that runs in time.
Our algorithm improves the previous combinatorial bound and is simpler than the previous algorithm of Chechik and Zhang [11]. Our algorithm also reduces directed 2-FRP to a collection of multiple-source replacement paths (MSRP) instances. This reduction can be viewed as a partial answer to the question of Nogler and Vassilevska Williams [35]. We then solve the resulting MSRP instances using the recent algorithm of Harada and Izumi [22] for directed graphs.
Our results demonstrate that our new modulo-layer hitting-set technique is useful for both directed RP and 2-FRP. We believe that this simple technique may also find applications to other related shortest-path problems.
Additional Related Work
Fast algorithms for replacement paths have also been studied on special graph classes, including planar graphs [18, 42] and surface embedded graphs [16]. Another line of work considers fast approximation algorithms [5, 12]. The replacement paths problem has been studied in distributed settings [32, 8].
A closely related line of work studies distance sensitivity oracles (DSOs), which can be viewed as a data-structure version of replacement paths. After preprocessing a graph, a DSO answers shortest-path distance queries efficiently under edge or vertex failures. DSOs have also been extensively studied in the literature [6, 21 CC20, 20, 38, 15, 28, 14, 23].
| Direction | Weights | Det./Rand. | Upper Bound | Lower Bound |
| Replacement Paths (RP) | ||||
| undir. | det. | [31] | ||
| dir. | det. | APSP-time [43] | ||
| dir. | rand. | [41] | ||
| undir. | unweigh. | det. | [30] | |
| dir. | unweigh. | det. | [Theorem 1] | † [43] |
| Dual-Failure Replacement Paths (2-FRP) | ||||
| undir. | det. | APSP-time [35] | APSP-time [24, 9] | |
| dir. | det. | [VWX22] | APSP-time [43] | |
| undir. | rand. | [35] | ||
| dir. | rand. | [11] | ||
| undir. | unweigh. | det. | [35] | † [35] |
| dir. | unweigh. | rand. | [Theorem 3] | † [VWX22] |
Table 1. Best known results and our results for RP and 2-FRP. Lower bounds marked with † apply to combinatorial algorithms and are conditional on the combinatorial BMM conjecture.
Preliminaries
Notation
Let be a directed graph with vertices and edges. For an edge set , we write for the graph obtained from by removing all edges in . For an edge , we simply write instead of . For a directed graph , let denote the graph obtained by reversing every edge of . For a vertex subset , let denote the subgraph of induced by .
For a directed graph , possibly with edge weights, and vertices , we denote by the length of a shortest – path in , or its minimum total weight when is weighted. We set if , , or contains no – path.
For a directed path or walk in , we denote its vertex set and edge set by and , respectively. We let denote the number of edges in . For any where comes before on , we write for the subpath of from to , and for the length of this subpath. For two directed paths or walks and such that the last vertex of is the first vertex of , we denote their concatenation by .
Throughout the paper, let be a fixed shortest path in from to , and let . For a path , let denote the graph obtained from by adding all edges of .
For integers and a positive integer , we write if divides .
Replacement Paths and Variants
(Single-Failure) Replacement Paths (RP). Given a directed graph , two vertices , and a shortest – path , the replacement paths (RP) problem asks to compute for every edge . It suffices to consider edges on , since removing an edge outside does not change the – distance. Since contains at most edges, the output size of RP is .
Dual-Failure Replacement Paths (2-FRP). The dual-failure replacement paths (2-FRP) problem extends RP to two edge failures. The goal is to compute for every pair of edges .
Although there are possible pairs of failed edges, the output size of 2-FRP is only . Indeed, it suffices to consider and, for each such edge , only the edges on a shortest – path in . All other distances are equal to either or . Thus, only nontrivial output values need to be represented.
Multiple Source Replacement Paths
In the multiple source replacement paths (MSRP) problem, we are given a graph and a set of sources. For every source , a shortest-path tree rooted at is fixed, and the output consists of the distances for all and all edges on the tree path . For the tree path survives, so . The case is the single source replacement paths SSRP problem.
Lemma 4 (Theorem 1 of [22]). MSRP on unweighted directed graphs can be solved by a randomized combinatorial algorithm in time, with all output distances correct with high probability. In particular, setting gives an -time algorithm for SSRP.
2-FRP for Weighted Directed Graphs
Our 2-FRP algorithm reduces groups of failure pairs to small weighted instances, on which we run the algorithm of Vassilevska Williams, Woldeghebriel, and Xu [VWX22] as a black box. They proposed algorithms for 2-FRP on an -vertex directed graph with integer edge weights and no negative cycles in time deterministically, or in time with high probability.
Lemma 5 (Lemmas 4.3 and 4.4 of [VWX22]). Let be a directed graph with vertices, polynomially bounded integer edge weights, and no negative cycles, let , and let be a shortest – path in given as part of the input. The distances for all pairs of edges can be computed by a deterministic combinatorial algorithm in time.
Canonical Replacement Paths
We use the notion of a canonical replacement path introduced in [VWX22]; see also [11], Definition 3 in the conference version.
Definition 6 (Canonical path). Let be a shortest – path, and let be a set of failed edges. An – path in is canonical with respect to and if, for any such that appears before in both and , then is the same as .
Throughout the paper, in both the single-failure and dual-failure settings, whenever we consider a shortest replacement path, we choose it to be canonical. Such a canonical shortest replacement path always exists. Indeed, among all shortest – paths in , choose minimizing . If is not canonical, then for some violating pair , replacing by yields another shortest – path with fewer edges outside , which contradicts the choice of .
Basic Fact on Single-Failure Replacement Paths
For two vertices with , we call a shortest – path in a detour. A standard structural fact about single-failure replacement paths is that a shortest replacement path can be decomposed into a prefix of , followed by a single detour, and then a suffix of ; see, e.g., [10 Lemma 5]. See Figure 1 for an illustration. This gives the following identity, which forms the basis of fast algorithms for single-failure replacement paths.

Figure 1. A shortest replacement path avoiding the failed edge .
Lemma 7. Let . For every edge ,
Our New Simple Deterministic Algorithm for RP
We first introduce our new derandomization technique for the RP problem, which we call a modulo-layer hitting set. The same technique will later be applied to the 2-FRP problem.
By Lemma 7, a central task in designing fast RP algorithms is to efficiently compute the detour distances for pairs of vertices . Since there can be such pairs, these distances are usually not computed explicitly. Instead, they are computed implicitly. We first briefly review how previous algorithms handle these detours, and then describe our approach based on the modulo-layer hitting-set technique.
Previous randomized approach [39]. The randomized algorithm of Roditty and Zwick [39] is conceptually simple. It distinguishes replacement paths whose detour has at most edges from those whose detour has more than edges. Short detours are found deterministically. For long detours, a set of pivots is chosen by including every vertex independently with probability for a sufficiently large constant , and the distances in between the vertices of are computed by a BFS in each direction from every pivot. Since a long detour has more than vertices, with high probability every long detour contains a pivot. Consequently, for every long detour from to , we have .
Previous deterministic approach [1]. Derandomizing the pivot-selection step above is substantially more technically challenging. Alon, Chechik, and Cohen [1] obtained the first deterministic -time algorithm. Their proof and algorithm require constructing a carefully chosen family of critical paths, each path containing edges. Computing this family efficiently requires a variant of the decremental single-source shortest-path algorithm of King [27]. They then apply a greedy hitting-set procedure to the family of critical paths, obtaining a set of pivots that hits every critical path. These pivots are subsequently used within the framework of Roditty and Zwick [39]. The logarithmic factors in the size of the hitting set and in its computation account for the in the running time.
Overview of our approach. Our underlying idea is entirely different, and both the algorithm and its analysis are remarkably simple. The key difference is that we do not classify detours by their length, as in [39, 1]; instead, we classify them by whether they pass through the hitting set or stay within a small range of consecutive BFS layers from , which we call a block (defined below).
Instead of constructing a hitting set for a carefully chosen family of critical paths, we obtain one directly from a single BFS from . We group the vertices by their distance from modulo a parameter , and let consist of the vertices in a smallest group, which has size at most . In other words, for some , is the union of the BFS layers at distances from (), where the BFS layer at distance is the set of vertices at distance exactly from ; we call these layers the separator layers. A block consists of two consecutive separator layers and all layers between them, i.e., the vertices at distances from for some ; see Figure 2 for an illustration.

Figure 2. Separator layers and blocks of Algorithm 1.
Since for every edge of , the following holds for every : any path in a subgraph of that starts at a vertex at distance less than from and ends at a vertex at distance at least must contain a vertex at distance exactly , i.e., a vertex of the separator layer at distance , which belongs to . In fact, the same structural property is what lets the technique carry over to the 2-FRP problem, where the graph in which detours are sought changes with the second failure (§ 4).
Using this structural property, we show that every detour either visits a separator layer, i.e., contains a vertex of , or stays inside a single block. Thus, serves as a hitting set for all detours that leave their block. Accordingly, the detour distances can be evaluated using two kinds of BFSs: detours of the former kind are handled by BFSs from and to every vertex of in , which take time in total, and detours of the latter kind by BFSs inside each block from the vertices of in it, which take time in total.
Since neither the size of this hitting set nor its construction involves a logarithmic factor, our algorithm runs in time, improving the bound of [1].
Modulo-Layer Hitting Set and Modulo-Layer Decomposition
Throughout, we fix a shortest – path in . Fix an integer parameter , whose value will be chosen later; we will eventually set . For , the layer is the set of vertices at distance exactly from . For , let
Choose and put . Then . We call the layers (), which are exactly the layers containing the vertices of , the separator layers. The separator layers divide the set of vertices reachable from into blocks: with the convention , for , block is , and we let . Recall that . That is, consists of the vertices of layers and, for , consists of the vertices of the consecutive layers , from one separator layer to the next, inclusive. Two consecutive blocks and share exactly the separator layer (i.e., ), and any two non-consecutive blocks are disjoint. Consequently, every vertex lies in at most two blocks (in exactly two if and only if it belongs to ), and every edge of lies in at most two of the graphs . Finally, for , let be the subpath of induced by ; that is, . Algorithm 1 summarizes this construction and Figure 2 illustrates it.
Since a vertex of on a separator layer belongs to two blocks, we fix the following convention. For $0 \le a \le k$, let denote the unique index with . Explicitly, $q(a) = 0 if , and otherwise. Equivalently, for , is the index of the unique block containing the edge of , that is, . We always have . If , then also lies in , and selects the block in which is on the lower separator layer . Note that implies .
| Algorithm 1: Modulo-Layer Hitting Set and Modulo-Layer Decomposition. |
| 1 |
| 2 |
| 3 and for |
| 4 for every |
| 5 and for every with |
Table 1 (PDF p. 8).
Our algorithm computes the detour distances using the following lemma. Recall that whenever or .
Lemma 8. For every $0 \leq a < b \leq k$, with ,
Proof. Every finite term on the right is the length of a walk from to in . Hence, the right-hand side is at least .
For the converse inequality, we may assume that . Let be a shortest – path in . If contains a vertex (possibly or ), then . Otherwise, no vertex of lies on a separator layer, and we claim that every vertex of satisfies . Indeed, starts at with ; if some vertex of had layer at least , then would contain a vertex of layer exactly , which is a separator layer. Similarly, ends at with ; if some vertex of had layer less than , would contain a vertex of layer exactly , which is a separator layer. Thus, all vertices of belong to , and since is the subgraph of induced by , the path lies in . Therefore . □
By Lemma 8, every detour either visits a separator layer or stays inside one block, so the distance tables of Algorithm 2 suffice to evaluate the minimum in Lemma 7. Note that the detour distances are never computed explicitly: the minimum is evaluated for all failed edges at once by prefix and suffix minima along . The BFSs from and to all pivots cost time since , and the BFSs inside the blocks cost time since each has at most vertices and every vertex and every edge of lies in at most two of the graphs . Choosing yields Theorem 1.
Algorithm 2: Preprocessing distance computation
for each
for each
for each and each
Overall Algorithm and Its Running Time.
Overall algorithm. Consider an edge . Substituting Lemma 7 into Lemma 8 splits the minimum over $0 \le a \le i < b \le k$ into two candidates. The first one, the pivot candidate, collects the detours that pass through a vertex of :
The second one, the block candidate, collects the detours that stay inside the block containing :
Note that, for , the term in Lemma 8 is finite only if , and then because every block consists of consecutive layers. Hence we obtain
and it remains to compute all values and .
Algorithm 3 gives the pseudocode of our algorithm. The pivot candidates are computed from the tables and , which a prefix and a suffix scan along build for each pivot . The block candidates are computed in the same manner. For a block and a vertex , a suffix scan along builds the table
and then , since with means , and with means .
Running time. Algorithms 1 and 2 take time and time, respectively. For the pivot candidates, each of the pivots performs two scans of , each in time, which is in total. For the block candidates, each block contains at most vertices of and is processed in time; since meets at most blocks, this is in total. Therefore, the total running time is . By choosing , we obtain time, which proves Theorem 1.
Algorithm 3: The deterministic algorithm for RP.
Input: An unweighted directed graph $G=(V,E)$$ and vertices $s,t\in V$.
Output: $\operatorname{dist}_{G\setminus e_i}(s,t)$ for every edge $e_i=(v_i,v_{i+1})$ of $\pi$.
1 $L\leftarrow\lceil\sqrt{n}\rceil$, and run Algorithms 1 and 2
// Pivot candidates $C_i$
2 foreach $r\in\mathcal{R}$ do
3 $A\leftarrow\infty$
4 for $i\leftarrow 0$ to $k-1$ do
5 $A\leftarrow\min\{A,\ i+\operatorname{dist}_{H}(v_i,r)\}$
6 $A_i(r)\leftarrow A$
7 $B\leftarrow\infty$
8 for $i\leftarrow k-1$ downto $0$ do
9 $B\leftarrow\min\{B,\ \operatorname{dist}_{H}(r,v_{i+1})+k-(i+1)\}$
10 $B_i(r)\leftarrow B$
11 $C_i\leftarrow\min_{r\in\mathcal{R}}\{A_i(r)+B_i(r)\}$ for all $0\leq i<k$
// Block candidates $S_i$
12 foreach block $V_q$ do
13 foreach $v_a\in V(\gamma_q)$ do
14 $W\leftarrow\infty$
15 for $i\leftarrow\min\{h_q,k\}-1$ downto $a$ do
16 $W\leftarrow\min\{W,\ \operatorname{dist}_{H_q}(v_a,v_{i+1})+k-(i+1)\}$
17 $W_{q,a}(i)\leftarrow W$
18 $S_i\leftarrow\min_{h_q-1\leq a\leq i}\{a+W_{q,a}(i)\}$ for all $i$ with $q(i)=q$
19 return $\min\{C_i,S_i\}$ for all $0\leq i<k$
Our Improved Combinatorial Algorithm for 2-FRP
In this section, we present our improved combinatorial algorithm for the 2-FRP problem.
We divide the cases into two based on the position of the two failed edges as follows:
One failure on :
Both failures on :
The first case is discussed in § 4.1, and the second case in Section 4.2. In both cases, we use the modulo-layer hitting set and the modulo-layer decomposition (§ 3.1), which is the key to making our algorithm faster and simpler than that of Chechik and Zhang [11].
Note that we do not consider the case of because is the shortest in this situation. Also, in the first case, we only consider on the shortest – path in . More precisely, for , let be a fixed shortest – path in , that is, a replacement path for . Then, we consider .
One Failure on
In the previous work by Chechik and Zhang [11], the running time in this case is . In this paper, we give an algorithm in time for this case.
Lemma 9 (One failure on ). All values of with and can be computed with high probability in time.
Throughout this subsection, we set . Our algorithm for this case has two ingredients: the layer structure of § 3 and the recent combinatorial algorithm of Harada and Izumi [22] for multiple source replacement paths (MSRP) problem.
We can use the modulo-layer hitting set and the modulo-layer decomposition (§ 3.1) without any change. Roughly speaking, since , the only difference from the single-failure setting is that we need to search for detours in instead of . This change affects neither the layer structure nor its key property, since the separator layers, , and the blocks depend only on the distances from in , and holds for every edge of . Hence, for every and every , every – path in either contains a vertex of or lies entirely in . In other words, we do not need to construct a hitting set separately for each failure ; the single set serves as a hitting set for all of them simultaneously. This allows us to avoid the extensive case analysis of Chechik and Zhang [11], which makes our algorithm for this case considerably simpler than theirs.
Formally, Lemmas 7 and 8 hold verbatim with and replaced by and , as stated below.
Lemma 10. For every edge and every edge ,
Lemma 11. For each and each edge , with ,
Proof of Lemmas 10 and 11. The two lemmas are the counterparts of Lemmas 7 and 8 with replaced by , and their proofs are almost identical to those given there; we therefore only indicate the differences and omit the details. For Lemma 10, the subpaths of avoid because , and the middle part of a shortest – path in between its last vertex with and its first vertex with lies in , since it has no internal vertex on and avoids . For Lemma 11, a shortest – path in is in particular a path of , so the argument on layers applies verbatim; its subpaths are shortest paths in , and when all of its vertices lie in , it is a path of .
By Lemmas 10 and 11, all values with and are determined by the distances and for and for , over all . To compute these three distances, we solve the instance of the multiple source replacement paths (MSRP) problem of § 2.3, for which Harada and Izumi [22] give a combinatorial -time algorithm with sources (Lemma 4). Each of the three families above is exactly the output of one MSRP instance: for a graph and a set of sources, MSRP returns for every , every vertex , and every edge of (for off the fixed shortest-path tree of , the distance is ). Algorithm 4 is therefore the counterpart of Algorithm 2 in which every BFS is replaced by an MSRP computation. The sources of the first two instances are the vertices of , and the instance for a block has at most sources, so by Lemma 4 the total time is for lines 1 and 2 and for line 3. Choosing gives , which is the bound of Lemma 9.
Algorithm 4: Preprocessing distance computation with one failure off
for each and each
for each and each
for each , , and
Once these distances are available, the overall algorithm is the same as that of § 3: for each failed edge , the value is the minimum of a pivot candidate and a block candidate, both of which are evaluated by prefix and suffix minima along . The only difference is in the treatment of the second failed edge , which lies off : the two candidates are defined with the distances in and in place of those in and , and they are evaluated for every . The overall algorithm and its running time are described in Section A.
Both Failures on
In the previous work by Chechik and Zhang [11], the running time in this case is . In this paper, we propose an algorithm in time for this case.
Lemma 12 (Both failures on ). All values of with can be computed with high probability in time.
In this case, we also use the modulo-layer hitting set and the modulo-layer decomposition (§ 3.1) without any change. As in § 3 and Algorithm 1, we partition into consecutive blocks . These blocks form a partition of , each block has length , and there are blocks in total. Throughout this subsection, we set .
For each pair of failed edges, we consider the blocks that contain the two failures. For and with , we distinguish whether the two failed edges lie in the same block or in different blocks, and handle the two cases separately. The former case () is discussed in § 4.2.1, and the latter case () in § 4.2.2.
Rough overview of the case where both failures lie on . For edge pairs in the same block, we construct for each block an auxiliary weighted directed graph with vertices and solve 2-FRP on this graph using Lemma 5. Since there are blocks and each instance can be solved in time, the total time for this computation is . For edge pairs in different blocks, we reduce the problem to SSRP computations, which take time in total.
Edge Pairs in the Same Block
We consider two failures that lie on the same block, that is, for some . Our approach builds a weighted kernel on the vertex set , where and are two new vertices, so that has at most vertices and for every pair .
Kernel construction. The kernel is obtained by adding the following weighted edges (see Figure 3):

Figure 3. Construction of the kernel for edge pairs in the same block. In (a), the black path is and is its subpath between the separator layers and (shaded). Each colored path of becomes a kernel edge of the same length in (b): the blue path from , the red path to , and the purple – path avoid (Types 2, 3, and 5), and the yellow and green detours are the two terms of Lemma 14 (Type 4), where a yellow detour stays inside and a green detour passes through a pivot on a separator layer, in either direction along . In (b), only the edges of (weight one) can fail, and only a few weighted edges are drawn.
Type 1: every edge of of weight 1
Type 2: an edge of weight for each
Type 3: an edge of weight for each
Type 4: an edge of weight for each
Type 5: an edge of weight
Edges of infinite weight are omitted, and an edge of Type 4 is kept distinct from a parallel edge of . The following lemma shows that the kernel is correct.
Lemma 13. For each and each two failed edges ,
Proof. Every edge of expands to a walk of the same length in . Therefore, is at least .
For the converse inequality, let be a canonical shortest – path of with respect to and (Definition 6). It suffices to find an – walk of of length at most . If uses no edge of , then is a path of , and the edge of Type 5 has weight at most .
Otherwise, let and be the first and the last edge of on , and split into the prefix , the middle part , and the suffix . The prefix and the suffix use no edge of , so they are paths of , and their lengths are at least the weights of the edge of Type 2 and the edge of Type 3, respectively. Since is canonical and both failures lie on , the middle part uses no edge of outside . Hence the middle part decomposes into edges of and maximal subpaths of . Every edge of on is different from and , so it is an edge of Type 1 of . Every maximal subpath of starts at or at the head of an edge of and ends at or at the tail of an edge of ; hence it connects two vertices , and its length is at least , the weight of the edge of Type 4. Replacing the prefix, the suffix, and every piece of the middle part by the corresponding kernel edge yields an – walk of of length at most , which proves the converse inequality.
By the above lemma, the algorithm of Lemma 5 answers all pairs of the block in time, and all blocks in time.
To construct the kernels, their edge weights have to be computed in a preprocessing step. The weights of Types 2, 3, and 5 are obtained by one forward and one reverse BFS in per block, in time in total. The delicate part is the weights of Type 4, that is, the detour distances for . A canonical replacement path for dual failures may also contain a backward detour, from to with . Backward detours are not intercepted by : the argument of Lemma 8 relies on the fact that a path climbing from layer to layer visits every layer in between, whereas a path descending from layer to layer may skip all separator layers in between. This is why we restrict the kernel to pairs inside one block: a detour between two vertices of the same block either stays within the layers of the block or leaves them and must climb back in through a separator layer, so the decomposition of Lemma 8 survives regardless of the order of and .
Lemma 14. For each and each ,
Proof. The proof of Lemma 8 applies verbatim: it uses the order of and only to guarantee , which now holds by assumption. □
The distances and for all pivots are obtained by a forward and a reverse BFS in from each of the pivots, in time, and the distances by a BFS in from each of the at most vertices of ; since every vertex and every edge of lies in at most two of the graphs , these BFSs cost time in total. Evaluating the minimum of Lemma 14 for the at most pairs of a block takes time, hence time over all blocks. Together with the time for running the algorithm of Lemma 5 on every kernel, all edge pairs in the same block are handled deterministically in time, recalling that . The whole procedure is summarized in Algorithm 5.
Algorithm 5: Edge pairs in the same block
for each
for each
foreach block do
for each
foreach do
Construct the weighted kernel by the procedure described in Kernel construction
Run the algorithm of Lemma 5 for and .
Edge Pairs in Different Blocks
Fix two distinct blocks and , where and hence . Let and , so that .
Let be a canonical shortest – path in . Such a path always exists. We distinguish four cases according to how traverses the portions of around the two failed edges. See Figure 4 for an illustration.

Figure 4. The four cases for a canonical shortest – path in . The blue curve represents . The figure is schematic, and may still intersect at other vertices.
Case 1: does not use any edge of .
Case 2: does not use any edge of .
Case 3: Neither Case 1 nor Case 2 occurs. Let be the minimum index such that , and let be the maximum index such that . Note that such vertices and necessarily exist, since neither Case 1 nor Case 2 occurs. Suppose that appears at or before on . Since , we have only if and , which can happen when .
Case 4: Neither Case 1 nor Case 2 occurs, and, with and defined as in Case 3, appears strictly before on .
For every pair of edges in different blocks, let , , , and denote the minimum lengths of – paths in satisfying the conditions of Cases 1, 2, 3, and 4, respectively. Then,
We next describe how to compute these candidates efficiently. Roughly speaking, we show that all of them can be obtained using only SSRP computations.
Case 1: contains no edge of . Let be the last vertex of in . Since contains no failed edge, the canonicality of implies that , and hence . Moreover, contains no edge of . Indeed, by the choice of , it cannot use an edge of , the edge is failed, and by the assumption of this case it uses no edge of . Therefore, we have .
Accordingly, define
Every term in the minimum corresponds to an – walk avoiding both and , while the choice of above attains . Hence, in this case.
Computing . For each block , let and run SSRP from in . This gives, for every failed edge and every vertex , the distance . For each fixed , we then scan the vertices in their order on and maintain the prefix minima . Then, for every , we simply have .
Running time. There are blocks. By Lemma 4, one call to SSRP takes time. Hence, the total time for the SSRP calls over all blocks is . Recall that there are only possible choices for the second failed edge . The prefix-minimum scans require at most additional time per block, and hence time over all blocks. Consequently, all values for edge pairs lying in different blocks can be computed in time.
Case 2: contains no edge of . This case is symmetric to Case 1. Let be the first vertex of in . By canonicality, , and hence . Moreover, contains no edge of . Therefore, we define
Every term in the minimum corresponds to an – walk avoiding both and , while the choice of above attains . Hence, we have in Case 2. To compute these values, for each block , we run SSRP from in . For each fixed failed edge , a suffix-minimum scan along then gives for every . As in Case 1, all values can be computed in time.
Case 3: appears at or before on . Since neither Case 1 nor Case 2 occurs, the vertices and are well defined. Recall that is the minimum index such that , and is the maximum index such that . Thus, . Hence, contains neither nor . Since appears at or before on both and , the canonicality of implies that .
Moreover, uses no edge of , and uses no edge of . Therefore, uses only edges of and avoids . Recall that . Similarly, uses only edges of and avoids .
Accordingly, define
In Case 3, we have . The key observation is that is absent from , while is absent from . Hence, each of the two distance terms in involves only one failed edge.
Computing and its running time. For every block , run SSRP from in . This gives for every . Symmetrically, for every block , run SSRP from in . This gives for every . Once these values are available, can be obtained in constant time for every pair .
There are blocks, and each SSRP call takes time by Lemma 4. Hence, all values can be computed in time, together with additional time to compute for all edge pairs .
Case 4: appears strictly before on . Let and . Let be the first vertex of in , and let be the last vertex of in . See Figure 5 for an illustration.

Figure 5. A canonical shortest – path in in Case 4. The blue curve represents .
By the choice of , the prefix contains no edge of . This is because every vertex of has distance from strictly less than . Similarly, by the choice of , the suffix contains no edge of . Define
We next consider the middle portion . Let be the first vertex of in , and let be the last vertex of in . Such vertices exist since contains both and .
To analyze the two subpaths and , we first establish the following claim.
Claim 15. Every vertex satisfies .
Proof. Suppose first that visits some with . Since contains no failed edge, canonicity implies . However, contains , while , a contradiction.
Similarly, if visits some with , then contains no failed edge, and canonicity implies . Since contains , this would imply . However, every vertex on has distance at least from , whereas , a contradiction.
By Claim 15 and the choice of , the subpath contains no edge of . Indeed, otherwise it would use some edge with , and hence visit a vertex of before , contradicting the choice of . Similarly, by Claim 15 and the choice of , the subpath contains no edge of . Hence, and .
Now, define
There are two cases depending on the order of and on .
Case 4.1: appears at or before on . In this case, lies on , and hence the middle portion can be split at into and . In this case, we decompose as . Accordingly, define
Case 4.2: appears before on . Since the subpath contains neither failed edge. By canonicality, . Thus, the two middle portions and are connected by the subpath . In this case, we decompose as . Accordingly, define
Combining Cases 4.1 and 4.2. Accordingly, define
Every term in the minimum corresponds to an – walk in . Conversely, the canonical path determines suitable vertices , and hence one of the above terms has length . Therefore, in Case 4, we have .
Computing , , , and . All required values , , , and can all be computed using SSRP. For each block , we run SSRP from in to compute all values . Similarly, for each block , we run SSRP from in to compute all values .
For each vertex , we run SSRP from in to compute all values . Similarly, for each vertex , we run SSRP from in to compute all values .
By Lemma 4, one call to SSRP takes time. There are blocks, and by the definition of the modulo-layer hitting set, we have and . Hence, the total number of SSRP calls is . Therefore, all required values , , , and can be computed in time.
Computing . Fix and . There are possible choices for and possible choices for . For each fixed pair , the value can be computed by scanning the possible indices . Similarly, each of and can be computed in time. Hence, can also be computed in time. Therefore, all required values and for the fixed pair can be computed in time.
The total number of pairs over all pairs of blocks is at most
Consequently, the total time for computing all values and is .
Finally, all values can be computed in time.
Total running time. From Cases 1–4, all values , , , can be computed in time. Therefore, all values for pairs lying in different blocks can be computed in total time, recalling that .
Concluding Remarks
In this work, we introduced the modulo-layer hitting set technique and showed that this simple idea is useful for both single-failure and dual-failure replacement paths in unweighted directed graphs. For RP, in particular, it leads to a remarkably simple deterministic algorithm that is suitable for textbook presentation and practical implementation. We believe that this technique may be useful more broadly in other shortest-path problems.
For 2-FRP, the modulo-layer hitting-set technique allows us to solve the problem using MSRP and SSRP as subroutines. Our algorithm can be viewed as a weak form of a reduction from directed 2-FRP to MSRP and SSRP. Roughly speaking, our algorithm reduces directed 2-FRP to a constant number of MSRP instances with sources and SSRP instances.
Finally, the only randomization in our 2-FRP algorithm comes from the MSRP algorithm by Harada and Izumi [22]. Thus, a deterministic MSRP algorithm with the same running time as that of Harada and Izumi would immediately yield a deterministic -time algorithm for 2-FRP.
Acknowledgements. Kaito Harada was supported by JST BOOST, Japan Grant Number JP-MJBS2402.
AI Disclosure. The main ideas behind our RP and 2-FRP algorithms were developed largely with the assistance of GPT-6 Astra (OpenAI). The authors’ contributions include simplifying several of the resulting algorithms, unifying the underlying techniques under the modulo-layer hitting set, developing the idea of using MSRP to improve the running time for 2-FRP when one failed edge lies on , and the entire design and analysis of the algorithm for this case (Lemma 9). We also used GPT-6 Astra (OpenAI) and Claude Fable 5.1 (Anthropic) to assist with language editing and improving the presentation of parts of the manuscript. All proofs and the text of this paper were written and verified by the authors, who take full responsibility for its content.
One Failure on
This appendix completes the proof of Lemma 9. We describe the overall algorithm that computes all values with and from the distances of Algorithm 4, and analyze its running time.
Pairs to be computed. Recall from § 4 that denotes a fixed replacement path for , and that only the second failures need to be considered. Let
where if has no replacement path. Then , and every pair of has .
Overall algorithm. Consider a pair . Lemmas 10 and 11 are Lemmas 7 and 8 with replaced by , and the derivation of § 3 applies verbatim to them. Hence
where and are the candidates and of § 3 with and replaced by and . Accordingly, let , , and denote the tables that the scans of Algorithm 3 build with these distances; then
In particular, running lines 2–19 of Algorithm 3 with the distances of computes for all . Doing so for every takes time per edge, hence time in total, which is too slow. The algorithm below avoids this by reusing the scans of Algorithm 3 across different , and by evaluating the candidates only for the pairs of .
Reusing scans. Every scan of Algorithm 3 reads only the distances from a single source of Algorithm 4: from in for , from in for , and from in for . Let be the shortest-path tree of fixed by the MSRP call (edges of identified with those of ), and write , , and for the three kinds of sources. If , removing does not change the distances from (§ 2.3), so the table of for equals the table , , or that Algorithm 3 builds for , which we call the default table of . Hence, for each , the algorithm rebuilds only the tables of the sources with , and lets every other table refer to the default table without copying it. Since has at most edges, each source rebuilds its table for at most edges . Over all , the pivots thus rebuild tables of entries each, in time, and the at most path vertices of a block rebuild at most tables of at most entries each, in time since . Whether lies in is decided in time by checking whether is the parent of in (or of for ), and can lie in only for the at most two blocks that contain both endpoints of . The decisions thus take time in total, which is dominated by the time of Algorithm 4.
Running time. Line 1 of Algorithm 6 takes time for Algorithm 1 and, as computed in § 4, time for Algorithm 4, whose output we store so that every distance is accessed in time. Line 2 takes time by § 3, and line 3 takes time, since is read off in time from a minimizer of recorded in line 2 and the shortest-path trees of the MSRP calls, as the concatenation of , a shortest – path of through a pivot or inside , and . Over all , lines 5–12 take time by the analysis above, and lines 13–17 take time per pair of , hence time. Since , , and , the total running time is

Figure 6.
For , this is , which proves Lemma 9.
References
- [1]Noga Alon, Shiri Chechik, and Sarel Cohen. Deterministic combinatorial replacement paths and distance sensitivity oracles. In Proc. of the 46th International Colloquium on Automata, Languages, and Programming (ICALP), pages 12:1–12:14, 2019. doi: 10.4230/LIPIcs.ICALP.2019.12.DOI
- [2]Josh Alman, Ran Duan, Virginia Vassilevska Williams, Yinzhan Xu, Zixuan Xu, and Renfei Zhou. More asymmetry yields faster matrix multiplication. In Proc. of the 36th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2005–2039, 2025. doi:10.1137/1.9781611978322.63.DOI
- [3]Amir Abboud, Nick Fischer, Zander Kelley, Shachar Lovett, and Raghu Meka. New graph decompositions and combinatorial Boolean matrix multiplication algorithms. In Proc. of the 56th Annual ACM Symposium on Theory of Computing (STOC), pages 935–943, 2024. doi:10.1145/3618260.3649696.DOI
- [4]Josh Alman and Virginia Vassilevska Williams. Truly subquadratic 3sum and truly subcubic apsp via triangles in sparse lopsided graphs, 2026. URL: https://arxiv.org/abs/2610.06783, arXiv:2610.06783.
- [5]Aaron Bernstein. A nearly optimal algorithm for approximating replacement paths and k shortest simple paths in general graphs. In Proc. of the 21st annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 742–755. SIAM, 2010. doi:10.1137/1.9781611973075.61.DOI
- [6]Aaron Bernstein and David Karger. A nearly optimal oracle for avoiding failed vertices and edges. In Proc. of the 41st Annual ACM Symposium on Theory of Computing (STOC), pages 101–110, 2009. doi:10.1145/1536414.1536431.DOI
- [8]Yi-Jun Chang, Yanyu Chen, Dipan Dey, Gopinath Mishra, Hung Thuan Nguyen, and Bryce Sanchez. Optimal distributed replacement paths. In Proc. of the 44th ACM Symposium on Principles of Distributed Computing (PODC), pages 287–298, 2025. doi:10.1145/3732772.3733513.DOI
- [9]Shucheng Chi, Ran Duan, Benyu Wang, and Tianle Xie. Undirected 3-fault replacement path in nearly cubic time. In Proc. of the 52nd International Colloquium on Automata, Languages, and Programming (ICALP), pages 57:1–57:20, 2025. doi:10.4230/LIPIcs.ICALP.2025.57.DOI
- [10]Shiri Chechik and Moran Nechushtan. Simplifying and unifying replacement paths algorithms in weighted directed graphs. In Proc. of the 47th International Colloquium on Automata, Languages, and Programming (ICALP), pages 29–1. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ICALP.2020.29.DOI
- [11]Shiri Chechik and Tianyi Zhang. Faster algorithms for dual-failure replacement paths. In Proc. of the 51st International Colloquium on Automata, Languages, and Programming (ICALP), volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 41:1–41:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICALP.2024.41.DOI
- [12]Shiri Chechik and Tianyi Zhang. Nearly optimal approximate dual-failure replacement paths. In Proc. of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2568–2596. SIAM, 2024. doi:10.1137/1.9781611977912.91.DOI
- [13]Emilien Dupont, Marvin Eisenberger, Borislav Kozlovskii, Abbas Mehrabian, Francisco J. R. Ruiz, Abigail See, Renfei Zhou, Josh Alman, Virginia Vassilevska Williams, and Matej Balog. Improving the matrix multiplication exponent with modern optimization and AlphaEvolve, 2026. arXiv:2608.16884, doi:10.48550/arXiv.2608.16884.DOI
- [14]Dipan Dey and Manoj Gupta. Near optimal dual fault tolerant distance oracle. In Proc. of the 32nd Annual European Symposium on Algorithms (ESA), volume 308, pages 45:1–45:23, 2024. doi:10.4230/LIPIcs.ESA.2024.45.DOI
- [15]Ran Duan and Hanlin Ren. Maintaining exact distances under multiple edge failures. In Proc. of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 1093–1101, 2022. doi:10.1145/3519935.3520002.DOI
- [16]Jeff Erickson and Amir Nayyeri. Computing replacement paths in surface embedded graphs. In Proceedings of the 22nd annual ACM-SIAM symposium on Discrete Algorithms (SODA), pages 1347–1354. SIAM, 2011. doi:10.1137/1.9781611973082.103.DOI
- [17]David Eppstein. Finding the k shortest paths. SIAM Journal on computing, 28(2):652–673, 1998. doi:10.1137/S0097539795290477.DOI
- [18]Yuval Emek, David Peleg, and Liam Roditty. A near-linear-time algorithm for computing replacement paths in planar directed graphs. ACM Transactions on Algorithms (TALG), 6(4):1–13, 2010. doi:10.1145/1824777.1824784.DOI
- [19]Zvi Gotthilf and Moshe Lewenstein. Improved algorithms for the k simple shortest paths and the replacement paths problems. Information Processing Letters, 109(7):352–355, 2009. doi:10.1016/j.ipl.2008.12.015.DOI
- [20]Yong Gu and Hanlin Ren. Constructing a distance sensitivity oracle in O(n^2.5794M) time. In Proc. of the 48th International Colloquium on Automata, Languages, and Programming (ICALP), volume 198, pages 76:1–76:20, 2021. doi:10.4230/LIPIcs.ICALP.2021.76.DOI
- [21]Fabrizio Grandoni and Virginia Vassilevska Williams. Faster replacement paths and distance sensitivity oracles. ACM Transactions on Algorithms (TALG), 16(1):1–25, 2019. doi:10.1145/3365835.DOI
- [22]Kaito Harada and Taisuke Izumi. A simple algorithm for the directed multiple source replacement paths problem, 2026. To appear in SOSA 2027. arXiv:2608.16615, doi:10.48550/arXiv.2608.16615.DOI
- [23]Kaito Harada, Naoki Kitamura, Taisuke Izumi, and Toshimitsu Masuzawa. A nearly linear time construction of approximate single-source distance sensitivity oracles. In Proc. of the 32nd Annual European Symposium on Algorithms (ESA), volume 308, pages 65:1–65:18, 2024. doi:10.4230/LIPIcs.ESA.2024.65.DOI
- [24]Monika Henzinger, Andrea Lincoln, Stefan Neumann, and Virginia Vassilevska Williams. Conditional Hardness for Sensitivity Problems. In 8th Innovations in Theoretical Computer Science Conference (ITCS 2017), volume 67, pages 26:1–26:31, 2017. doi:10.4230/LIPIcs.ITCS.2017.26.DOI
- [25]John Hershberger and Subhash Suri. Vickrey prices and shortest paths: What is an edge worth? In Proc. of the 42nd IEEE symposium on foundations of computer science, pages 252–259. IEEE, 2001. doi:10.1109/SFCS.2001.959899.DOI
- [26]John Hershberger, Subhash Suri, and Amit Bhosle. On the difficulty of some shortest path problems. ACM Transactions on Algorithms (TALG), 3(1):1–15, 2007. doi:10.1145/1219944.1219951.DOI
- [27]Valerie King. Fully dynamic algorithms for maintaining all-pairs shortest paths and transitive closure in digraphs. In Proc. of the 40th Annual Symposium on Foundations of Computer Science (FOCS), pages 81–89. IEEE, 1999. doi:10.1109/SFFCS.1999.814580.
- [28]Adam Karczmarz and Piotr Sankowski. Sensitivity and dynamic distance oracles via generic matrices and frobenius form. In Proc. of the IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 1745–1756. IEEE, 2023. doi: 10.1109/FOCS57990.2023.00106.DOI
- [29]Eugene L Lawler. A procedure for computing the k best solutions to discrete optimization problems and its application to the shortest path problem. Management science, 18(7):401–405, 1972.DOI
- [30]Cheng-Wei Lee and Hsueh-I Lu. Replacement paths via row minima of concise matrices. SIAM Journal on Discrete Mathematics, 28(1):206–225, 2014. doi: 10.1137/120897146.DOI
- [31]Kavindra Malik, Ashok K Mittal, and Santosh K Gupta. The k most vital arcs in the shortest path problem. Operations Research Letters, 8(4):223–227, 1989.
- [32]Vignesh Manoharan and Vijaya Ramachandran. Computing replacement paths in the CONGEST model. In Proc. of the 31st International Colloquium on Structural Information and Communication Complexity (SIROCCO), pages 420–437. Springer, 2024. doi:10.1007/978-3-031-60603-8_23.DOI
- [33]Enrico Nardelli, Guido Proietti, and Peter Widmayer. A faster computation of the most vital edge of a shortest path. Information Processing Letters, 79(2):81–85, 2001. doi:10.1016/S0020-0190(00)00175-7.DOI
- [34]Noam Nisan and Amir Ronen. Algorithmic mechanism design. In Proc. of the 31st annual ACM Symposium on Theory of Computing (STOC), pages 129–140, 1999. doi:10.1145/301250.301287.DOI
- [35]Jakob Nogler and Virginia Vassilevska Williams. Undirected replacement paths: Dual fault reduces to single source. In Proc. of the 53rd International Colloquium on Automata, Languages, and Programming (ICALP), volume 374 of Leibniz International Proceedings in Informatics (LIPIcs), pages 144:1–144:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026. doi:10.4230/LIPIcs.ICALP.2026.144.DOI
- [36]OpenAI. Staggered extraction for exact matrix multiplication over every field. OpenAI Math Release preprint OAI:Staggered-extraction-for-exact-matrix-multiplication-over-every-field-September-24-2026, 2026.hub.valency.io/works/W_sbpa9e2y
- [37]OpenAI. An upper bound of 9/4 for the matrix multiplication exponent. OpenAI Math Release preprint OAI:Matrix-Multiplication-Nine-Fourths-October-2-2026, 2026.hub.valency.io/works/W_e65zjmxy
- [38]Hanlin Ren. Improved distance sensitivity oracles with subcubic preprocessing time. Journal of Computer and System Sciences, 123:159–170, 2022. doi:10.1016/j.jcss.2021.08.005.DOI
- [39]Liam Roditty and Uri Zwick. Replacement paths and k simple shortest paths in unweighted directed graphs. ACM Transactions on Algorithms, 8(4):33:1–33:11, 2012. Preliminary version in ICALP 2005. doi:10.1145/2344422.2344423.
- [41]Virginia Vassilevska Williams. Faster replacement paths. In Proc. of the twenty-second annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1337–1346. SIAM, 2011. doi:10.1137/1.9781611973082.102.DOI
- [42]Christian Wulff-Nilsen. Solving the replacement paths problem for planar directed graphs in O(n log n) time. In Proceedings of the 21st annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 756–765. SIAM, 2010. doi:10.1137/1.9781611973075.62.
- [43]Virginia Vassilevska Williams and R Ryan Williams. Subcubic equivalences between path, matrix, and triangle problems. Journal of the ACM (JACM), 65(5):1–38, 2018. doi:10.1145/3186893.DOI
- [44]Oren Weimann and Raphael Yuster. Replacement paths and distance sensitivity oracles via fast matrix multiplication. ACM Transactions on Algorithms (TALG), 9(2):1–13, 2013. doi:10.1145/2438645.2438646.DOI