A Deterministic Approach to Shortest Path Restoration in Edge Faulty Graphs
Abstract
Afek, Bremler-Barr, Kaplan, Cohen, and Merritt (PODC’01) in their seminal work on shortest path restorations demonstrated that after a single edge failure in a graph , a replacement shortest path between any two vertices and , which avoids the failed edge, can be represented as the concatenation of two original shortest paths in . They also showed that we cannot associate a canonical111In Afek et al. (1991), the term “set of base paths” is used to refer to what is termed as “canonical paths” here. shortest path between the vertex pairs in that consistently allows for the replacement path (in the surviving graph) to be represented as a concatenation of these canonical paths. Recently, Bodwin and Parter (PODC’21) proposed a randomized tie-breaking scheme for selecting canonical paths for the “ordered” vertex pairs in graph with the desired property of representing the replacement shortest path as a concatenation of canonical shortest-paths provided for ordered pairs.
An interesting open question is whether it is possible to provide a deterministic construction of canonical paths in an efficient manner. We address this question in our paper by presenting an time deterministic algorithm to compute a canonical path family comprising of two paths per (unordered) vertex pair. Each replacement is either a PQ-path (of type ), a QP-path, a QQ-path, or a PP-path. Our construction is fairly simple and is a straightforward application of independent spanning trees. We also present various applications of family in computing fault-tolerant structures.
Keywords and phrases:
Fault-tolerant Data-structures, Shortest Path Restoration, Replacement pathFunding:
Keerti Choudhary: The author is supported in part by Google India Algorithms Research grant 2021.Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Data structures design and analysis ; Mathematics of computing Graph algorithmsEditors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim ThắngSeries and Publisher:

1 Introduction
In their seminal work on shortest path restorations, Afek, Bremler-Barr, Kaplan, Cohen, and Merritt [1] studied the question of how the structure of shortest paths in a graph changes when edges fail. They showed that, after failure of any single edge in a graph, a replacement shortest path between any two vertices and avoiding a failed edge can be represented as the concatenation of two original shortest paths in the graph.
Theorem 1 (Afek et al. [1]).
For any vertices and any failing edge in , a replacement shortest path between and in is a concatenation of two original shortest paths in , namely, and , where vertex is a function of and .
Various works in the past have employed the restoration path theory to develop efficient solutions for problems such as distance sensitivity oracles [2, 7, 8, 9], replacement paths [6, 5], fault-tolerant distance preservers [4, 5], routing schemes [5], among others.
An -fault-tolerant distance preserver for a graph is a sparse subgraph such that, after failure of at most edges, the distances between a pre-specified set of vertex pairs in the surviving part of still match the corresponding distances in the surviving part of . They are formally defined as follows.
Definition 2 (Fault Tolerant Distance Preservers).
For a graph and demand pairs , a subgraph of is an -fault tolerant distance preserver (-preserver) for if for any subset of of size at most , we have
For a set , we say that is a source-wise distance preserver for if ; and a subset distance preserver for if .
Parter and Peleg [15] showed that for any -vertex unweighted undirected graph, there exists a -fault-tolerant preserver with edges. They also showed that this bound is existentially tight. Specifically, there exist -vertex graphs and a set of sources such that any fault-tolerant preserver must have edges. Later, Parter [14] extended this result by providing an upper bound of for dual fault-tolerant preservers in undirected graphs. Gupta and Khan [11] extended this to directed graphs. For general , Bodwin, Grandoni, Parter, and Williams [4] presented a construction of an -fault-tolerant preserver with edges.
For the problem of computing subset distance preservers, Bodwin, Choudhary, Parter and Shahar [3] presented a construction of 1-fault-tolerant distance preserver with edges. Recently, Bodwin and Parter [5] extended this work to general failures by providing a construction of -fault-tolerant preserver with edges, for any . These constructions for preservers are obtained by employing the work of Afek, Bremler-Barr, Kaplan, Cohen, and Merritt [1] (see Theorem 1) on the structure of shortest paths in fault-prone graphs.
To exploit Theorem 1, Bodwin and Parter [5] introduced a tie-breaking scheme for selecting shortest paths in graph . Specifically, they used the Isolation lemma [13] to show that if each edge in is assigned a random integer weight from the range , then with probability , for any pair of vertices and , and for any set of edges, where , exactly one of the shortest paths from to in will be the unique shortest path in the modified edge weighted graph .
The main drawback of this tie-breaking scheme is that it is randomized and requires an additional time to derandomize. This raises the following natural question:
Question: Is it possible to bypass randomness and have an efficient deterministic construction of the canonical path family?
We address this question by presenting a deterministic algorithm that runs in time to compute a canonical path family comprising of two paths for each (unordered) vertex pair in . We show that each replacement path in can take the form of a PQ-path (of type ), a QP-path, a QQ-path, or a PP-path. Our construction is not only straightforward but also represents a simple yet effective application of independent spanning trees [10].
We present in this paper an efficient construction of the family (see Theorem 10) and also explore various applications of these structures.
Sourcewise Distance Preservers
We introduce a stronger notion of fault-tolerant distance preserving subgraphs, which we call -preservers.
Definition 3 (-Preservers).
For a graph and a set of demand pairs , a subgraph of is an -preserver if, for every pair , every set of edges of size at most , and every edge in that satisfies , we have
Note that for any , an -preserver is also an -preserver. However, an -preserver is not necessarily an -preserver.
Our first contribution is a construction of -preservers in polynomial time that matches the size of the current best construction of -preservers given by Bodwin, Grandoni, Parter, and Williams [4].
Theorem 4.
Let be a positive integer. For any undirected, unweighted -vertex graph with a set of source vertices , we can compute a -source-wise preserver for with edges in time.
Further, for , we can compute a -source-wise preserver for with edges in time.
Subset Distance Preservers
We provide the following relation between -preservers and -fault-tolerant subset distance preservers.
Theorem 5.
In any undirected graph , a source-wise -preserver with respect to a set is an -fault-tolerant subset distance preserver for pairs in .
Combined with the construction of -preservers, this gives us a deterministic algorithm to compute subset distance preservers in polynomial time.
Theorem 6.
For any -vertex graph , a set of source vertices , and a fixed non-negative integer , there is an -fault-tolerant distance preserver of for pairs in with edges which can be computed in time when , and time when .
Prior to our work, Bodwin et al. [5] gave construction for such preservers that takes space and requires computation time in the randomized setting. However, the deterministic variant of their algorithm had a time complexity of , which is polynomial only for constant values of . Our work improves upon this by providing a deterministic algorithm with a time complexity of , almost matching the efficiency of the randomized version of [5].
Fault-tolerant Distance Labeling Scheme
A distance labeling scheme is an assignment of bit-string labels to each node of such that we can recover by looking at only the labels at and . An -fault-tolerant distance labeling scheme allows us to compute the distances even when a set of edges of size at most fail.
While it is possible to store the entire graph within the labels, our objective is to find a labeling of subquadratic size. Bodwin et al. [5] gave an -fault-tolerant distance labeling scheme that requires bits per vertex and can be computed in time in the randomized setting, and in time deterministically. We offer an improvement to this by employing our -preservers, which allows for the computation of the labels deterministically in polynomial time.
Theorem 7.
For any fixed nonnegative integer , and -vertex unweighted undirected graph, there is an -fault-tolerant distance labeling scheme that assigns each vertex a label of bits that can be computed in time each when , and time when .
2 Preliminaries
Given a directed graph on vertices and edges, the following notations and definitions will be used throughout the paper. We omit the term when graph is clear from context.
-
: Distance of node from in the graph .
-
: The graph obtained by removing the edges that lie in from the graph .
-
: The graph obtained by taking a union of the vertices and edges of and .
-
: The edges lying in path .
-
: The path from vertex to vertex in tree .
-
: The subpath of path lying between vertices , assuming precedes on .
-
: The set of all edges incoming to in .
-
-cut-edge: An edge which lies on all -paths and hence whose removal disconnects from .
-
-distance-cut edge: An edge that lies on all the shortest paths and hence whose removal increases the distance from to .
-
: the last edge lying on the path .
All graphs in this paper are undirected and unweighted, unless stated otherwise.
3 Fault Tolerant Preservers
3.1 Preservers for Source-wise setting
Theorem 8.
Any undirected or directed graph with a positive integer and a set of sources has a source-wise -preserver with edges, which can be computed in time.
We also improve the running time for .
Theorem 9.
Any undirected or directed graph and a set of sources has a source-wise -preserver with edges which can be computed in time.
We first establish the following theorem.
Theorem 10.
Any directed/undirected graph with a destination vertex can be processed in time to implicitly compute, for each , a pair of -shortest paths, denoted as and , which intersect solely at the -distance-cut edges.
Furthermore, if is undirected then for any and any , there exists a vertex such that at least one of the four paths obtained by concatenating paths from the family forms a replacement shortest path between and in .
In order to prove Theorem 10, we use the concept of independent trees. Given a directed graph and a designated source , a pair of trees rooted at are said to be independent trees, if for each , the paths from to in and intersect only at the -cut-edges.
Theorem 11 (Georgiadis and Tarjan [10]).
Given a directed graph and a designated source , a pair of independent trees rooted at are computable in time.
We are now ready to prove Theorem 10.
Proof of Theorem 10.
We begin by proving the first claim. Consider a directed acyclic graph (DAG) containing only those edges for which . Let and be a pair of independent trees rooted at in . Then, for any vertex , the paths from to in and intersect only at the -cut edges in . By Theorem 11, the time required to compute and is .
For each , we define and to be the paths and , respectively. Note that there is a one-to-one correspondence between -cut edges in and -distance-cut edges in . Therefore, and are the shortest -paths in , and they intersect only at the edges whose failure increases the -distance in .
Next, we prove the second claim. By Theorem 1, for any pair and any failing edge , there exists a vertex such that:
-
1.
,
-
2.
,
-
3.
.
This implies that is not a distance cut-edge for the pairs and . Therefore, at least one of the paths from must avoid , and similarly, at least one of the paths from must avoid .
Thus, we conclude that at least one of the four paths obtained by concatenating paths from the family forms a replacement shortest path between and in .
Proof of Theorem 9.
For a source , let and be the independent trees constructed in the proof of Theorem 10. Then the graph is a -preserver. The correctness is a corollary of the earlier proof.
In order to compute in Theorem 8 we associate a set of edges incident to each node , so that the graph obtained by taking the union of edges lying in is an -preserver.
Our construction is inspired by FT-BFS algorithm of Bodwin et al. [4], and the running time matches the time taken by their construction of -FT-BFS. Let be the source set. For each , we compute a pair of -shortest-paths, say and , using Theorem 10.
Now we set , and compute a uniformly random subset of of size . Further, for , let
Finally, with respect to as the source, we compute an -preserver for the graph and designate as the set of in-edges of lying in this -preserver. To compute a -preserver, we simply take to be the last edges of and . This completes the description of our algorithm. For pseudocode see Algorithm 1.
Lemma 12 (Correctness).
The graph , where are sets computed using Algorithm 1, is an -preserver of with respect to the source .
Proof.
We prove the correctness using induction on the value of . Consider a source node , a set of failing edges of size t most , and an edge satisfying . For , note that , and on the failure of , at least one of or must remain intact. Therefore, we focus on the case where .
Let and denote an arbitrary pair of -shortest paths in intersecting only at -distance-cut edges. Further, let and be respectively the last vertices in and lying in the structure , where, and are -shortest-paths computed using Theorem 10. Observe that we can assume contains at least one edge from the set , as otherwise, it suffices to keep the last edges of in the set .
Next, we compute a vertex lying in as follows. If lies in , then simply set . If does not lie in , then , implying that with a high probability contains a vertex of path . So, in this case, is set as an arbitrary vertex of lying in . In a similar manner, lying in can be computed. It must be noted that the internal vertices of suffixes and are disjoint from the structure .
Observe that on the failure of in the graph , at least one of the paths or must be intact. Without loss of generality assume that does not contain . Due to sub-structure property of shortest paths, we have . Thus, concatenated with an -shortest-path in that is disjoint from gives us an -shortest-path in . Such an -shortest-path lies in as it contains incoming edges of in an preserver of with respect to .
In order to bound the size of , we establish a recurrence relation on the size of in the following lemma.
Lemma 13.
Let denote an upper bound on the in-degree of a vertex in an -preserver of an -vertex graph with respect to a source set comprising vertices. Then,
Proof.
In Algorithm 1, the size of the set is at most by Theorem 10, and is exactly by definition. Since , we have . By correctness of the algorithm, we get the required recurrence.
Lemma 14 (Size Analysis).
, and therefore, the number of edges in the -preserver is .
Proof.
Let , and be . By using and that is an increasing function in , we can resolve the recurrence in Lemma 13 as follows,
By the algorithm’s description , therefore,
Lemma 15 (Running Time).
Algorithm 1 can be made to run in time.
Proof.
Rather than explicitly computing in the algorithm, we compute the two trees once using Theorem 10 in . We discard all edges from and which don’t lie on an - path, can then be computed as which takes time. In the final iteration, we simply compute a -preserver which takes time. We require iterations of this and run it for each node , hence, the algorithm takes time.
3.2 Subset Distance Preservers
In this subsection, we will provide an efficient construction of subset distance preserver. In particular, we will prove the following result.
Theorem 16.
Given an -vertex graph , a set of source vertices , and a nonnegative integer , there is an -fault-tolerant distance preserver of for all pairs in on edges which can be computed in time.
Further, the computation time can be reduced to when .
We make use of the shortest path restoration theory by Afek et al. [1] to first prove the following.
Lemma 17.
For any undirected graph and any nonnegative integer , a source-wise -preserver of with respect to a source set is an -fault-tolerant subset distance preserver for pairs in .
Proof.
Let be a pair such that , has at most edges and is an edge in . Applying Theorem 1 on , for any and failing edge there exists a vertex such that, , , and .
For any and the corresponding node , and by Definition 3, since is an -preserver with respect to source . Therefore,
However, since is a subgraph of , as well, which implies .
As a corollary of Theorem 8, Theorem 9, and Lemma 17, we get the construction in Theorem 16.
4 Other Applications
4.1 Distance Labeling Schemes
In this section, we make use of our -preserver to provide an alternate construction for distance labels of sub-quadratic size.
Theorem 18.
For any fixed nonnegative integer , and -vertex unweighted undirected graph, there is an -fault-tolerant distance labeling scheme that assigns each vertex a label of bits that can be computed in time each when , and time when .
Proof.
Let be an -preserver with respect to source . At each node , store as the label. Since the number of edges in is and it takes bits to describe an edge, each label takes bits.
To compute for any , we read the labels of and to determine and , then union them together to get . We then simply find the distance in .
is a -preserver with respect to the source . By Lemma 17, is an -fault-tolerant distance-preserver for pairs in . Thus, as desired.
4.2 Subset Replacement Path Algorithm
In the Subset Replacement Path problem (Subset-RP), the input is a graph and a set of source vertices , and for every pair of vertices and failing edge , report .
We modify the algorithm by Bodwin et al. [5] to use our -preserver from Theorem 9 to solve the Subset-RP problem.
Theorem 19.
Given a graph and a set of source vertices , we can solve the Subset-RP problem in time in the word-RAM model.
To this end, we will make use of the following result whose proof we will omit as we only make a black box use of it.
Theorem 20 (Hershberger and Suri [12]).
When , there is an algorithm that solve in time .
We now propose Algorithm 2 to solve the general problem.
Lemma 21 (Correctness).
Algorithm 2 solves the problem.
Proof.
is a -preserver with respect to the source set . By Lemma 17, is a -fault-tolerant distance-preserver for pairs in . Thus for any edge , . Thus, applying Theorem 20 on correctly computes for all edges .
Lemma 22 (Running Time).
Algorithm 2 runs in time.
Proof.
By Theorem 10, we can compute in time. Since has size, can be solved in time by Theorem 20. Therefore, the total time taken is .
References
- [1] Yehuda Afek, Anat Bremler-Barr, Haim Kaplan, Edith Cohen, and Michael Merritt. Restoration by path concatenation: fast recovery of MPLS paths. Distributed Computing, 15(4):273–283, 2002. doi:10.1007/S00446-002-0080-6.
- [2] Davide Bilò, Shiri Chechik, Keerti Choudhary, Sarel Cohen, Tobias Friedrich, Simon Krogmann, and Martin Schirneck. Approximate Distance Sensitivity Oracles in Subquadratic Space. In Proceedings of the 55th Symposium on Theory of Computing (STOC), pages 1396–1409, 2023. doi:10.1145/3564246.3585251.
- [3] Greg Bodwin, Keerti Choudhary, Merav Parter, and Noa Shahar. New fault tolerant subset preservers. In Artur Czumaj, Anuj Dawar, and Emanuela Merelli, editors, 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, July 8-11, 2020, Saarbrücken, Germany (Virtual Conference), volume 168 of LIPIcs, pages 15:1–15:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ICALP.2020.15.
- [4] 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, July 10-14, 2017, Warsaw, Poland, pages 73:1–73:14, 2017. doi:10.4230/LIPICS.ICALP.2017.73.
- [5] Greg Bodwin and Merav Parter. Restorable shortest path tiebreaking for edge-faulty graphs. J. ACM, 70(5), October 2023. doi:10.1145/3603542.
- [6] Shiri Chechik and Sarel Cohen. Near optimal algorithms for the single source replacement paths problem. In Timothy M. Chan, editor, Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2019, San Diego, California, USA, January 6-9, 2019, pages 2090–2109. SIAM, 2019. doi:10.1137/1.9781611975482.126.
- [7] Shiri Chechik, Sarel Cohen, Amos Fiat, and Haim Kaplan. (1 + )-approximate f-sensitive distance oracles. In Philip N. Klein, editor, Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 1479–1496. SIAM, 2017.
- [8] Dipan Dey and Manoj Gupta. Nearly optimal fault tolerant distance oracle. In Bojan Mohar, Igor Shinkar, and Ryan O’Donnell, editors, Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, Vancouver, BC, Canada, June 24-28, 2024, pages 944–955. ACM, 2024. doi:10.1145/3618260.3649697.
- [9] Ran Duan and Hanlin Ren. Maintaining exact distances under multiple edge failures. In Stefano Leonardi and Anupam Gupta, editors, STOC ’22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20–24, 2022, pages 1093–1101. ACM, 2022. doi:10.1145/3519935.3520002.
- [10] Loukas Georgiadis and Robert Endre Tarjan. Dominators, directed bipolar orders, and independent spanning trees. In Automata, Languages, and Programming – 39th International Colloquium, ICALP 2012, Warwick, UK, July 9-13, 2012, Proceedings, Part I, pages 375–386, 2012. doi:10.1007/978-3-642-31594-7_32.
- [11] Manoj Gupta and Shahbaz Khan. Multiple source dual fault tolerant BFS trees. In 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland, pages 127:1–127:15, 2017. doi:10.4230/LIPIcs.ICALP.2017.127.
- [12] J. Hershberger and S. Suri. Vickrey prices and shortest paths: what is an edge worth? In Proceedings 42nd IEEE Symposium on Foundations of Computer Science, pages 252–259, 2001. doi:10.1109/SFCS.2001.959899.
- [13] Ketan Mulmuley, Umesh V. Vazirani, and Vijay V. Vazirani. Matching is as easy as matrix inversion. In Alfred V. Aho, editor, Proceedings of the 19th Annual ACM Symposium on Theory of Computing, 1987, New York, New York, USA, pages 345–354. ACM, 1987. doi:10.1145/28395.383347.
- [14] Merav Parter. Dual failure resilient BFS structure. arXiv, 2015. arXiv:1505.00692.
- [15] Merav Parter and David Peleg. Sparse fault-tolerant BFS trees. In Algorithms – ESA 2013 – 21st Annual European Symposium, Sophia Antipolis, France, September 2-4, 2013. Proceedings, pages 779–790, 2013. doi:10.1007/978-3-642-40450-4_66.