Abstract 1 Introduction 2 Preliminaries 3 Sourcewise Approximate Distance Oracle for a Single Edge Fault 4 A Sparser Fault-Tolerant Sourcewise Approximate Distance Oracle 5 Concluding Remarks References

Fault-Tolerant Approximate Distance Oracles with a Source Set

Dipan Dey ORCID Tata Institute of Fundamental Research, Mumbai, India Telikepalli Kavitha ORCID Tata Institute of Fundamental Research, Mumbai, India
Abstract

Our input is an undirected weighted graph G=(V,E) on n vertices along with a source set S⊆V. The problem is to preprocess G and build a compact data structure such that upon query Q⁢u⁢(s,v,f) where (s,v)∈S×V and f is any faulty edge, we can quickly find a good estimate (i.e., within a small multiplicative stretch) of the s-v distance in G−f. We use a fault-tolerant S⁢T-distance oracle from the work of Bilò et al. (STACS 2018) to construct an S×V approximate distance oracle or sourcewise approximate distance oracle of size O~⁢(|S|⁢n+n3/2) with multiplicative stretch at most 5. We construct another fault-tolerant sourcewise approximate distance oracle of size O~⁢(|S|⁢n+n4/3) with multiplicative stretch at most 13. Both the oracles have O⁢(1) query answering time.

Keywords and phrases:
Weighted graphs, approximate distances, fault-tolerant data structures
Copyright and License:
[Uncaptioned image] © Dipan Dey and Telikepalli Kavitha; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation → Design and analysis of algorithms
Funding:
Supported by the Department of Atomic Energy, Government of India, under project no. RTI4001.
Editors:
C. Aiswarya, Ruta Mehta, and Subhajit Roy

1 Introduction

The problem of computing distances between all pairs of vertices in a given graph G=(V,E) with positive edge weights is a fundamental problem in graph algorithms. The problem here is to preprocess G and build a compact data structure (called a distance oracle) that can quickly answer distance queries for any pair of vertices. As is often the case with real-world networks like routing networks or road networks, links may fail or roads may be temporarily blocked. Thus we have to allow for the case of faulty edges. Since several links are unlikely to fail simultaneously, we consider the case of a single edge failure.

Instead of recomputing distances from scratch for all pairs of vertices after an edge has failed, the problem is to build a resilient data structure that can answer distance queries between vertices after a single edge failure. Furthermore, we assume there is a specific set S⊆V of sources, e.g., S is a set of starting locations on a road network or S is a set of source nodes in a routing network. Thus we are interested in distances only for pairs (s,v)∈S×V. Suppose |S|≪n, say O⁢(nϵ) for some ϵ∈(0,1). Then it feels wasteful to build a fault-tolerant distance oracle that maintains distances for all pairs of vertices. Another application is Vickrey pricing [21], with the objective of determining, for every (s,v)∈S×V where S is a given subset of V and every edge f, how much the distance from s to v increases if f were to fail.

Thus the distance oracle has to process queries of the form (s,v,f) where s is the source, v is the destination, and f is the failed edge. Upon query Q⁢u⁢(s,v,f), the oracle has to return the s to v distance in G−f, where G−f is the graph obtained by removing edge f from G. So our problem is the following (as described below).

  • ■

    Preprocess G and build a compact data structure that can quickly answer distance queries for any pair in S×V when an edge fails. Hence our distance oracle has to answer queries Q⁢u⁢(s,v,f) where s∈S,v∈V, and f is the failed edge.

This data structure is called a single edge fault-tolerant sourcewise distance oracle. As discussed below, for undirected unweighted graphs, a single edge fault-tolerant sourcewise exact distance oracle of size O~⁢(n3/2⁢|S|) with O~⁢(1) query time is known [20]. Our goal is to design more compact distance oracles (for sublinear sets S) in weighted graphs. Furthermore, for the sake of space efficiency, we are ready to relax exactness. Thus the problem we consider is to design a compact fault-tolerant sourcewise approximate distance oracle.

Recall that “sourcewise” captures the fact that we are interested in distances between pairs (s,v)∈S×V. For any pair (s,v)∈S×V and f∈E, let ‖s⁢v⋄f‖ denote the distance from s to v in G−f. A fault-tolerant approximate distance oracle is said to have multiplicative stretch α if the distance dG−f⁢(s,v) returned by the oracle on query Q⁢u⁢(s,v,f) is sandwiched between the actual distance and α times the actual distance, i.e., ‖s⁢v⋄f‖≤dG−f⁢(s,v)≤α⋅‖s⁢v⋄f‖. We show the following result.

Theorem 1.

Let G=(V,E) be an undirected graph on n vertices with positive edge weights. For any S⊆V, a fault-tolerant sourcewise approximate distance oracle with multiplicative stretch at most 5 and size O~⁢(|S|⁢n+n3/2) can be constructed in polynomial time such that Q⁢u⁢(s,v,f) where (s,v)∈S×V and f∈E can be answered in constant time.

Note that our oracle has size O~⁢(n3/2) when |S|=O⁢(n). For smaller sets S, we show a sparser fault-tolerant sourcewise approximate distance oracle at the expense of a larger stretch. Its query answering time is also O⁢(1).

Theorem 2.

Let G=(V,E) be an undirected graph on n vertices with positive edge weights. For any S⊆V, a fault-tolerant sourcewise approximate distance oracle with multiplicative stretch at most 13 and size O~⁢(|S|⁢n+n4/3) can be constructed in polynomial time such that Q⁢u⁢(s,v,f) where (s,v)∈S×V and f∈E can be answered in constant time.

Thus the above oracle has size O~⁢(n4/3) when |S|=O⁢(n1/3). The work of Bilò, Gualà, Leucci, and Proietti on multiple-edge fault-tolerant approximate shortest path trees [11] in undirected weighted graphs with a single source (so |S|=1) implies a multiple-edge fault-tolerant sourcewise111Unfortunately, we were unaware of this work at the time of paper submission. We thank Manoj Gupta for bringing this paper to our attention. (so S is any subset of V) approximate distance oracle of size O~⁢(|S|⁢n) with a stretch of 3. Thus their oracle is sparser than our oracles when |S| is small and it also achieves a better stretch. However, our query answering time is O⁢(1) while theirs is O⁢(log2⁡n), where n is the number of vertices. Our algorithms are truly simple while their techniques are quite involved.

As mentioned above, the problem of constructing fault-tolerant sourcewise exact distance oracles in undirected unweighted graphs has been studied earlier. Also, in undirected weighted graphs, the problem of constructing fault-tolerant single source (so |S|=1) exact distance oracles has been studied. We discuss these results below.

Background.

The first fault-tolerant exact distance oracle was designed by Demetrescu and Thorup in 2002 [14] and it was for directed weighted graphs. Their oracle handles single edge failures and has size O⁢(n2⁢log⁡n) with O⁢(1) query time. After this result, there has been a long line of research on the problem of efficiently constructing single edge/vertex fault-tolerant exact distance oracles. Ignoring preprocessing time, the most space-efficient oracle is by Duan and Zhang [19] with size O⁢(n2) and query time O⁢(1). Thus it shaves off the log⁡n factor from the size of the original oracle.

Fault-tolerant sourcewise distance oracles. For undirected unweighted graphs, Gupta and Singh [20] designed a single edge fault-tolerant sourcewise exact distance oracle of size O~⁢(n3/2⁢|S|) with O~⁢(1) query time and source set S. In undirected graphs with edge weights in the range {1,2,…,M}, Bilò, Cohen, Friedrich and Schirneck [10] designed a fault-tolerant single source exact distance oracle. This oracle handles single edge failures and has size O~⁢(n3/2⁢M) with query time O~⁢(1). For undirected unweighted graphs, Dey and Gupta [15] designed a different oracle with the same space and query time bounds as in [10], but with a faster preprocessing time.

S⁢T-distance oracles in directed graphs. In directed weighted graphs, Bilò, Choudhary, Gualà, Leucci, Parter and Proietti [9] designed a fault-tolerant S⁢T-distance oracle, i.e., it maintains exact distances for all pairs in S×T, for given vertex subsets S and T. It handles single edge failures and has size O~⁢((|S|+|T|)⁢n) with O⁢(1) query time, where n is the number of vertices. They also designed a fault-tolerant S⁢T-distance oracle in unweighted directed graphs of size O~⁢(n⁢|S|⁢|T|) with query time O⁢(|S|⁢|T|). Furthermore, they showed a fault-tolerant S⁢T-approximate distance oracle in directed unweighted graphs that returns in constant time a distance estimate stretched by an additive term. In particular, when |S|=O⁢(n), their oracle has size O~⁢(n3/2) and additive stretch O~⁢(n).

Fault-tolerant approximate distance oracles.

Approximate distance oracles that provide distances within a small multiplicative stretch for all vertex pairs have been extensively studied. Table 1 summarizes results for fault-tolerant approximate distance oracles in directed/undirected graphs. Note that the stretch here is multiplicative, except for the last row where the stretch has an additive term as well.

Table 1: A table listing the works related to fault-tolerant approximate distance oracles where D is the diameter of the graph.
Graph Faults Stretch Size Query time Ref
Undirected Weighted c≥1 (8⁢k−2)⁢(c+1), k≥1 integer O⁢(c⁢k⁢n1+1/k⁢log⁡(n⁢M)), M is the max edge wt O~⁢(c) [13]
Undirected Unweighted c=1 (2⁢k−1)⁢(1+ϵ), k≥1 integer and ϵ>0 O~⁢(k5ϵ4⁢n1+1/k) O⁢(1) [2]
Undirected Weighted c=o⁢(log⁡nlog⁡log⁡n) (1+ϵ) O⁢(n2⁢(log⁡D/ϵ)c⁢c⁢log⁡D) O⁢(c5⁢log⁡D) [12]
Directed Unweighted c≥2 (3+ϵ) O~(n2−αc+1/ϵ)(logn/ϵ)c) where α∈(0,1/2) and ϵ>0 O⁢(nα/ϵ2) [6]
Undirected Weighted c=o⁢(log⁡nlog⁡log⁡n) (2⁢k−1) where k≥1 integer O⁢(n1+1k+α+o⁢(1)) where α∈(0,1) O⁢(n1+1k−αk⁢(c−1)) [8]
Undirected Unweighted c=o⁢(log⁡nlog⁡log⁡n) (k+1k)⁢(1+ϵ) with additive stretch of 2, k≥1 integer and ϵ≥0 O⁢(n2−γ(k+1)⁢(c+1)+o⁢(1)ϵc+2) where γ∈(0,k+12) O⁢(nγ/ϵ2) [7]

For single edge faults, note that Chechik, Langberg, Peleg, and Roditty [13] showed an approximate distance oracle with stretch 12 and size O~⁢(n3/2) and another with stretch 28 and size O~⁢(n4/3). In comparison to this, Theorem 1 shows a sourcewise approximate distance oracle with stretch 5 and size O~⁢(|S|⁢n+n3/2) and Theorem 2 shows a sourcewise approximate distance oracle with stretch 13 and size O~⁢(|S|⁢n+n4/3). Thus for small sets S, our oracles are as sparse and have smaller stretch. Note that for single faults and every k≥1, approximate distance oracles by Baswana and Khanna [2] are almost as sparse as the oracles in [13] and have significantly smaller stretch. However these oracles work only for unweighted graphs.

It is an open problem if our construction can be generalized to work for all integers k, in other words, to show a sourcewise approximate distance oracle of size O~⁢(|S|⁢n+n1+1/k) and stretch 8⁢k−3 with O⁢(1) query answering time for k≥3. Our results show such a construction for k=1,2. Note that the remaining approximate distance oracles in Table 1 have superconstant query time, so our oracles cannot directly be compared with them.

Our techniques.

Our algorithms are simple to describe and use the S⁢T-distance oracle by Bilò, Choudhary, Gualà, Leucci, Parter and Proietti [9]. Their oracle uses landmark vertices, i.e., vertices picked uniformly at random from the vertex set V (originally used by Bernstein and Karger [4]).222To the best of our knowledge, the name “landmark” vertices was first used by Dey and Gupta [16]. The oracle in Theorem 1 uses this S⁢T-distance oracle for the given source set S and T=S∪ℒ, where ℒ is our landmark vertex set. The oracle in Theorem 2 is based on the same idea, however there are two levels of sampling here: so we have two landmark vertex sets ℒ2⊆ℒ1. Theorem 1 and Theorem 2 are proved in Section 3 and Section 4, respectively. We discuss preliminaries in Section 2 and conclude in Section 5.

2 Preliminaries

This section describes the notation that will be used in the rest of the paper and also gives a sketch of the S⁢T-distance oracle from [9]. Our input is an undirected graph G=(V,E) with positive edge weights as given by 𝗐𝗍:E→ℝ+. For any path ρ in G:

  • ■

    let ‖ρ‖ be the length of ρ, i.e., ‖ρ‖=∑e∈ρ𝗐𝗍⁢(e);

  • ■

    let |ρ| be the hop length of ρ, i.e., the number of edges in ρ.

For any (u,v)∈V×V, a shortest path between u and v is a path of minimum length between u and v. We assume the shortest path between any two vertices in the graph is unique. This property can be achieved by random perturbation of the given edge weights (e.g., see [22]). The property of unique shortest paths was also used in [5, 17, 18, 20, 21]. We denote the shortest path from u to v by u⁢v. Thus ‖u⁢v‖ is the distance between u and v in G and |u⁢v| is the hop length between u and v in G.

  • ■

    Let G−f=(V,E∖{f}) be the graph obtained after deleting edge f from the graph G. As in G, we assume there is a unique shortest path between any pair of vertices in G−f.

  • ■

    For any (u,v)∈V×V and f∈E, let u⁢v⋄f be the shortest path between u and v in G−f. So ‖u⁢v⋄f‖ is the distance between u and v in G−f.

The concept of landmark vertices will be key to our distance oracles.

Definition 3 (Landmark Vertex Set, ℒ).

Sample each vertex in G independently with probability p. The selected set (call it ℒ) of vertices is the landmark vertex set.

The probability p in Definition 3 will be set to different values in Section 3 and Section 4. The following proposition on the landmark vertex set ℒ will be very useful to us.

Proposition 4.

With high probability, for any pair of vertices u and v, if |u⁢v|≥⌊3⁢ln⁡np⌋ then there is at least one landmark vertex on u⁢v.

Proof.

Since each vertex in G is sampled independently with probability p, for any pair of vertices u and v, the probability that there is no landmark vertex on u⁢v is (1−p)k where k=|u⁢v|+1 is the number of vertices on u⁢v. Because |u⁢v|≥⌊3⁢ln⁡np⌋, the probability that there is no landmark vertex on u⁢v is at most:

(1−p)3⁢ln⁡np≤(1e)3⁢ln⁡n≤1n3.

Thus for any pair of vertices u and v with |u⁢v|≥⌊3⁢ln⁡np⌋, the probability that there is no landmark vertex on u⁢v is at most 1/n3. Hence the probability that there is some pair (x,y)∈V×V with |x⁢y|≥⌊3⁢ln⁡np⌋ such that there is no landmark vertex on x⁢y is at most (n2)/n3≤1/n. Thus with probability at least 1−1/n, it is the case that for every pair (u,v)∈V×V with |u⁢v|≥⌊3⁢ln⁡np⌋, there is at least one landmark vertex on u⁢v. ◀

Since each vertex in G is sampled with probability p, the expected size of ℒ is n⁢p. We will set p=n−δ for some δ∈(0,1) in Section 3 and Section 4. Thus with high probability, we will have |ℒ|≤2⁢n⁢p (by Chernoff bound).

  • ■

    If either |ℒ|>2⁢n⁢p or there exists a pair of vertices u,v with |u⁢v|≥⌊3⁢ln⁡np⌋ such that there is no vertex of ℒ on u⁢v then we will repeat the step of sampling vertices and construct another landmark vertex set such that both these properties hold for the set obtained.

Thus we will assume that |ℒ|=O⁢(n⁢p) and every pair of vertices u,v with |u⁢v|≥⌊3⁢ln⁡np⌋ has at least one vertex of ℒ on u⁢v. The expected number of trials to obtain a desired landmark set ℒ is O⁢(1).

Fault-Tolerant 𝑺⁢𝑻-Distance Oracle.

We now briefly discuss the algorithm of Bilò et al.[9] to construct a fault-tolerant exact distance oracle in G for pairs (s,t)∈S×T, where S⊆V and T⊆V are part of the input. Fix a pair (s,t)∈S×T and let f=(a,b) be any edge on s⁢t. Let ℓ and ℓ′ be the two landmark vertices on s⁢t closest to a and b on a⁢s and b⁢t, respectively.

There are 3 cases with respect to the replacement path s⁢t⋄f: (i) s⁢t⋄f goes through ℓ, (ii) s⁢t⋄f goes through ℓ′, (iii) s⁢t⋄f goes through neither ℓ nor ℓ′. Their algorithm builds tables to deal with each of these cases. Figure 1 captures the main idea.

Figure 1: The replacement path s⁢t⋄f where f=(a,b) in case (i) is s⁢ℓ followed by the magenta path ℓ⁢t⋄f; in case (ii) it is the blue path s⁢ℓ′⋄f followed by ℓ′⁢t and in case (iii) s⁢t⋄f avoids both ℓ and ℓ′ - so the orange path is part of s⁢t⋄f.

The following theorem from [9] will be used in our algorithms.

Theorem 5 ([9]).

An n-vertex directed or undirected weighted graph G for given subsets S and T of V can be preprocessed in polynomial time to compute a data structure of size O⁢((|S|+|T|)⁢n⁢log⁡n) that given any pair (s,t)∈S×T and any failing edge f can report ‖s⁢t⋄f‖ in constant time.

3 Sourcewise Approximate Distance Oracle for a Single Edge Fault

Our input is an undirected weighted graph G=(V,E) with a positive weight function 𝗐𝗍:E→ℝ+ and a subset S⊆V of sources. The goal is to build a compact data structure that can answer distance queries Q⁢u⁢(s,v,f) within a small multiplicative stretch, where s∈S,v∈V and f is the edge fault.

Landmark vertex set 𝓛.

Recall Definition 3 on landmark vertices. Let us sample each vertex independently with probability p=(3⁢ln⁡n)/n to obtain our landmark vertex set ℒ. The following two properties hold (see Proposition 4); otherwise we resample to obtain another landmark vertex set ℒ so that the following two properties hold.

  • ■

    |ℒ|=O⁢(n⁢log⁡n).

  • ■

    For any pair of vertices u and v: if |u⁢v|≥⌊n⌋, then there is at least one landmark vertex on u⁢v.

Our algorithm.

On input G=(V,E) and S⊆V, the first step of our algorithm is to build the above landmark vertex set ℒ. We then compute shortest path trees 𝒯⁢(u) rooted at u for all u∈S∪ℒ. Along with every vertex v, the tree 𝒯⁢(u) also has the two attributes ‖u⁢v‖ and |u⁢v|, i.e., the length and the hop length of u⁢v.

Our algorithm constructs the S⁢T-exact distance oracle from [9] fixing the source set S and destination set T=S∪ℒ. For each v∈V, let tv be the vertex in T that is closest to v, where ties are broken arbitrarily. We maintain the lengths of replacement paths v⁢tv⋄f for each edge f∈v⁢tv. Our algorithm is described below.

  1. 1.

    Obtain the landmark vertex set ℒ.

  2. 2.

    For each u∈S∪ℒ do: compute the shortest path tree 𝒯⁢(u) rooted at u in G=(V,E).

  3. 3.

    Use Theorem 5 to construct an S⁢T-exact distance oracle for the given source set S and target set T=ℒ∪S in G=(V,E).

  4. 4.

    For every v∈V in the graph G=(V,E) do:

    • ■

      Identify the nearest vertex to v in the target set T=ℒ∪S. Call this vertex tv.

    • ■

      For 1≤i≤|v⁢tv| do:

      • –

        Let fi be the i-th edge from tv on v⁢tv.

      • –

        Compute the distance ‖v⁢tv⋄fi‖ between v and tv in G−fi.

      • –

        Set 𝖣𝗂𝗌𝗍T⁢[v,i]=‖v⁢tv⋄fi‖.

Query answering algorithm.

In response to the query Q⁢u⁢(s,v,f), the query answering algorithm first checks if f∈s⁢v. This check can be done efficiently via LCA queries. Given a rooted tree 𝒯 and a pair of vertices x,y in the tree 𝒯, recall that 𝖫𝖢𝖠𝒯⁢(x,y) is the least common ancestor of x and y in tree 𝒯.

Observe that f=(a,b)∈s⁢v if and only if the answer to the following three questions is “yes” where 𝒯⁢(s) is the shortest path tree in G rooted at s.

  • ■

    Is 𝖫𝖢𝖠𝒯⁢(s)⁢(v,a) equal to a?

  • ■

    Is 𝖫𝖢𝖠𝒯⁢(s)⁢(v,b) equal to b?

  • ■

    Is |s⁢a|+1=|s⁢b| or is |s⁢b|+1=|s⁢a|?

A “yes” answer to the first two questions implies that both a and b are vertices on the path s⁢v. Moreover, a and b are adjacent to each other on s⁢v if and only if the answer to the third question is “yes”. Recall that for any vertex w, |s⁢w| is the hop length between s and w, i.e., the number of edges in s⁢w.

Given a tree 𝒯, there is a linear time algorithm to build an O⁢(n) size data structure such that LCA queries on 𝒯 can be answered in O⁢(1) time [3]. Recall that for every vertex w, the hop length |s⁢w| is stored along with w in 𝒯⁢(s). Thus |s⁢a| and |s⁢b| can be retrieved in O⁢(1) time. Hence the query answering algorithm can determine in O⁢(1) time if f∈s⁢v or not. The query answering algorithm will return ‖s⁢v‖ if f∉s⁢v (see Figure 2). Recall that the distance ‖s⁢v‖ is also stored along with v in 𝒯⁢(s).

Figure 2: Here f=(a,b)∉s⁢v, so the path s⁢v is undisturbed by the edge fault f.

If f∈s⁢v, then the query answering algorithm looks up the identity of tv, which is the nearest vertex in T to v. Via LCA queries on 𝒯⁢(tv), we can determine if f=(a,b)∈v⁢tv or not. If not, then ‖v⁢tv⋄f‖=‖v⁢tv‖. So let us assume f∈v⁢tv.

Assume without loss of generality that b is closer than a to tv, i.e., |a⁢tv|=|b⁢tv|+1 (see Figure 2). Let i be the index such that a is the i-th vertex from tv on v⁢tv. Then ‖v⁢tv⋄(a,b)‖=𝖣𝗂𝗌𝗍T⁢[v,i]. Recall that the attribute i=|a⁢tv| is stored along with a in 𝒯⁢(tv).

  • ■

    The query answering algorithm returns ‖v⁢tv⋄f‖+‖s⁢tv⋄f‖, where ‖v⁢tv⋄f‖=𝖣𝗂𝗌𝗍T⁢[v,i].

Note that the distance ‖s⁢tv⋄f‖ is obtained by querying the S⁢T-distance oracle. Thus the query answering time is O⁢(1). We show below that ‖v⁢tv⋄f‖+‖s⁢tv⋄f‖≤5⁢‖s⁢v⋄f‖.

Lemma 6.

For any (s,v)∈S×V and f∈E, our algorithm returns an estimate for the s-v distance in G−f with a multiplicative stretch of at most 5 in constant time.

Proof.

It follows from the discussion above that the query answering time is O⁢(1). Since the query answering algorithm will return ‖s⁢v‖ if f∉s⁢v (see Figure 2), let us assume f∈s⁢v. Then the distance estimate returned by the query answering algorithm in response to query Q⁢u⁢(s,v,f) is ‖s⁢tv⋄f‖+‖v⁢tv⋄f‖ where tv is the nearest vertex in T to v. We now bound the sum ‖s⁢tv⋄f‖+‖v⁢tv⋄f‖. Consider the following four cases.

  1. 1.

    f∈s⁢tv and f∈v⁢tv. This means the edge f belongs to the shortest path between tv and the least common ancestor of s and v in 𝒯⁢(tv) (see Figure 2). However then f∉s⁢v, contradicting our assumption that f∈s⁢v.

  2. 2.

    f∈s⁢tv and f∉v⁢tv. The query answering algorithm will determine via LCA queries that f∉v⁢tv, so ‖v⁢tv⋄f‖=‖v⁢tv‖. Let us bound ‖s⁢tv⋄f‖. The graph G−f has an s-tv path obtained by stitching the paths s⁢v⋄f and v⁢tv, i.e., the path s⁢v⋄f followed by v⁢tv. So ‖s⁢tv⋄f‖≤‖s⁢v⋄f‖+‖v⁢tv‖. Hence the distance returned is at most ‖s⁢v⋄f‖+2⁢‖v⁢tv‖.

    • ■

      Because tv is the closest vertex in T=ℒ∪S to v, we have ‖v⁢tv‖≤‖v⁢s‖. Hence the distance returned is at most ‖s⁢v⋄f‖+2⁢‖s⁢v‖≤3⁢‖s⁢v⋄f‖. So the stretch is at most 3 in this case.

  3. 3.

    f∉s⁢tv and f∈v⁢tv. Since f∉s⁢tv, we have ‖s⁢tv⋄f‖=‖s⁢tv‖. Let us bound ‖v⁢tv⋄f‖. Since the graph G−f has a v⁢tv path obtained by stitching s⁢v⋄f and s⁢tv, we have ‖v⁢tv⋄f‖≤‖s⁢v⋄f‖+‖s⁢tv‖ (see Figure 3). Thus the distance returned by the oracle is at most ‖s⁢v⋄f‖+2⁢‖s⁢tv‖.

    • ■

      Observe that ‖s⁢tv‖≤‖s⁢v‖+‖v⁢tv‖≤2⁢‖s⁢v‖. Hence the distance returned is at most ‖s⁢v⋄f‖+4⁢‖s⁢v‖≤5⁢‖s⁢v⋄f‖. Thus the stretch is at most 5 in this case.

    Figure 3: The oracle returns a distance estimate ≤2⁢‖s⁢tv‖+‖s⁢v⋄f‖, so the stretch is ≤5.
  4. 4.

    f∉s⁢tv and f∉v⁢tv. The query answering algorithm will return ‖s⁢tv⋄f‖+‖v⁢tv⋄f‖=‖s⁢tv‖+‖v⁢tv‖ in this case. We have ‖v⁢tv‖≤‖v⁢s‖ and we also have ‖s⁢tv‖≤‖s⁢v‖+‖v⁢tv‖≤2⁢‖s⁢v‖. Thus the stretch is at most 3 in this case.

This finishes the proof of the lemma. ◀

Data structures constructed.

Our algorithm constructs in step 3 all the data structures constructed by the S⁢T-distance oracle algorithm. Thus we have access to ‖s⁢t⋄f‖ for every (s,t)∈S×T and f∈E. Our oracle also has the table 𝖣𝗂𝗌𝗍T that stores ‖v⁢tv⋄f‖ between v and tv in G−f, for each v∈V and edge f∈v⁢tv. Let us bound the size of our oracle.

Lemma 7.

The size of the data structures constructed by our algorithm is O~⁢(|S|⁢n+n3/2).

Proof.

The size of T is O~⁢(|S|+n). So the sizes of all the shortest path trees constructed in step 2 is O~⁢(|S|⁢n+n3/2). Similarly, the size of the S⁢T-oracle constructed in step 2 is O~⁢(|S|⁢n+n3/2) (by Theorem 5). Furthermore, the data structure used to answer LCA queries on each shortest path tree 𝒯⁢(u) has size O⁢(n). Since u∈S∪ℒ, these data structures also take up space O~⁢(|S|⁢n+n3/2).

It follows from the property of our landmark set ℒ that for any vertex v, we have min⁡{|v⁢ℓ|:ℓ∈ℒ}≤⌊n⌋. So for each vertex v, we have ‖v⁢tv⋄f‖ stored for at most ⌊n⌋ many edges f, where tv is the nearest vertex in T to v. Thus the size of 𝖣𝗂𝗌𝗍T is O⁢(n⋅n)=O⁢(n3/2). This finishes the proof of the lemma. ◀

It is easy to see that our algorithm runs in expected polynomial time. Recall that we used randomization to construct the set ℒ. By blowing up the size of ℒ by a factor of log⁡n, the construction of ℒ can be made deterministic (see [9, Lemma 1]). Thus Theorem 1 follows. We restate it below for convenience. See 1

▶ Remark 8.

The query answering algorithm can return not only an approximate estimate of the distance ‖s⁢v⋄f‖, but also the corresponding approximate shortest path in a succinct form. It is known that any replacement path ρ⋄f is 2-decomposable, i.e., it is a concatenation of at most 2 shortest paths interleaved with at most 1 edge [1].

So along with any distance ‖s⁢tv⋄f‖ (similarly, ‖v⁢tv⋄f‖), we could also store the corresponding replacement paths in 2-decomposable form. Thus the query answering algorithm can return the corresponding s-v approximate shortest path as the union of two replacement paths ρ1=s⁢tv⋄f and ρ2=v⁢tv⋄f, each in 2-decomposable form, say, ρ1=⟨s,x,y,tv⟩ and ρ2=⟨v,x′,y′,tv⟩. This will mean ρ1 is the shortest path in G between s and x followed by the edge (x,y), and the shortest path in G between y and tv, similarly for ρ2.

4 A Sparser Fault-Tolerant Sourcewise Approximate Distance Oracle

In this section, we present another fault-tolerant sourcewise approximate distance oracle for single edge faults. As before, the input is an undirected weighted graph G=(V,E) with a positive weight function 𝗐𝗍:E→ℝ+ and a subset S⊆V of sources. Our goal is to build a sparser data structure that can answer distance queries Q⁢u⁢(s,v,f) within a small multiplicative stretch. For sets S of size o⁢(n), the oracle in this section will be sparser than the one in Section 3.

Our algorithm.

We will now construct two sets ℒ1 and ℒ2 of landmark vertices. We will first run the sampling step in Section 2 with p=(3⁢ln⁡n)/n1/3. Let ℒ1 be the resulting landmark set. The following properties follow from Section 2 (see Proposition 4).

  • ■

    |ℒ1|=O⁢(n2/3⁢log⁡n).

  • ■

    For any pair of vertices u and v: if |u⁢v|≥⌊n1/3⌋ then there is at least one vertex of ℒ1 on u⁢v.

After that, we sample each vertex of ℒ1 with probability 1/n1/3. Let ℒ2 be the set of selected vertices. Observe that this 2-step sampling to obtain ℒ2 is equivalent to running the sampling step in Section 2 with p=(3⁢ln⁡n)/n2/3 on the entire vertex set V. Thus the following properties follow from Section 2 (see Proposition 4).

  • ■

    |ℒ2|=O⁢(n1/3⁢log⁡n).

  • ■

    For any pair of vertices u and v: if |u⁢v|≥⌊n2/3⌋ then there is at least one vertex of ℒ2 on u⁢v.

Rather than sampling each vertex of V with probability p=(3⁢ln⁡n)/n2/3 to get ℒ2, we did this in two steps so that we have ℒ2⊆ℒ1. Let T1=ℒ1∪S and let T2=ℒ2∪S. Our algorithm will use the following notations for any vertex v.

  • ■

    Let tv be the vertex in T1 that is nearest to v.

  • ■

    Let tv′ be the vertex in T2 that is nearest to v.

For each u∈T2, we will keep the shortest path tree 𝒯⁢(u) in G rooted at u. However, we cannot afford to keep shortest path trees rooted at each u∈ℒ1, since that would exceed the desired space bound. Corresponding to each u∈ℒ1, let 𝖡𝖺𝗅𝗅⁢(u)={v∈V:tv=u} be the set of all vertices v that regard u as their nearest vertex in T1.

  • ■

    For each v∈𝖡𝖺𝗅𝗅⁢(u), we will store the path u⁢v.

  • ■

    Thus we keep a truncated shortest path tree 𝒯^⁢(u)=∪v∈𝖡𝖺𝗅𝗅⁢(u)u⁢v in G rooted at u for each u∈ℒ1.

Along with each vertex v∈𝒯^⁢(u) where u∈ℒ1, we also store |u⁢v|, i.e., the hop length of u⁢v, and the distance ‖u⁢v‖. Similarly, as done in Section 3, along with each vertex v∈𝒯⁢(u), where u∈T2, we store |u⁢v| and ‖u⁢v‖.

Below we describe the steps in our algorithm.

  1. 1.

    Obtain the landmark sets ℒ1 and ℒ2, where ℒ2⊆ℒ1, as described above.

  2. 2.

    For each u∈T2=S∪ℒ2 do: compute the shortest path tree 𝒯⁢(u) rooted at u in G.

  3. 3.

    Use Theorem 5 to construct an S⁢T-exact distance oracle for the given source set S and target set T=T2 in G=(V,E).

  4. 4.

    For each u∈ℒ1 do: compute the truncated shortest path tree 𝒯^⁢(u) rooted at u in G.

  5. 5.

    For every v∈V do:

    1. (a)

      Let tv∈T1=S∪ℒ1 be the vertex in T1 that is nearest to v.

    2. (b)

      For 1≤i≤|v⁢tv| do:

      • ■

        Set 𝖣𝗂𝗌𝗍1⁢[v,i]=‖v⁢tv⋄fi‖ where fi is the i-th edge from tv on v⁢tv.

  6. 6.

    For every u∈T1 do:

    1. (a)

      Let tu′∈T2 be the vertex in T2 that is nearest to u.

    2. (b)

      For 1≤j≤|u⁢tu′| do:

      • ■

        Set 𝖣𝗂𝗌𝗍2⁢[u,j]=‖u⁢tu′⋄fj‖ where fj is the j-th edge from tu′ on u⁢tu′.

Observe that the array 𝖣𝗂𝗌𝗍1⁢[v,i] stores for any vertex v, the distance ‖v⁢tv⋄f‖ where f is the i-th edge from tv on the path v⁢tv. Similarly, the array 𝖣𝗂𝗌𝗍2⁢[u,j] stores for any vertex u∈T1, the distance ‖u⁢tu′⋄f‖ where f is the j-th edge from tu′ on the path u⁢tu′.

The query answering algorithm.

In response to the query Q⁢u⁢(s,v,f), the query answering algorithm first checks if f∈s⁢v. As described in Section 3, this is done by checking the answers to some LCA queries in 𝒯⁢(s). Let us assume f∈s⁢v, otherwise the query answering algorithm will return ‖s⁢v‖.

Then the query answering algorithm looks up x=tv and y=tx′. In more detail, (i) x is the closest vertex to v in T1 and (ii) y is the closest vertex to x in T2. The query answering algorithm needs to know if f∈v⁢x or not; if so, it also needs to know the index i∈{1,…,n1/3} such that f is the i-th edge on x⁢v. As described in Section 3, we can decide if f∈v⁢x or not via LCA queries on the truncated shortest path tree 𝒯^⁢(x). If so, we can also obtain from 𝒯^⁢(x) the value i such that f is the i-th edge from x on x⁢v.

Thus the query answering algorithm knows in O⁢(1) time whether f∈x⁢v or not and if so, the index i such that f is the i-th edge from x on x⁢v.

  • ■

    If f∉v⁢x then ‖v⁢x⋄f‖=‖v⁢x‖; else ‖v⁢x⋄f‖=𝖣𝗂𝗌𝗍1⁢[v,i].

Recall that we compute 𝒯⁢(u) for all u∈T2. Thus, as described in Section 3, we can efficiently check if f∈x⁢y or not; if so, the algorithm also knows the index j such that f is the j-th edge from y on the path x⁢y.

  • ■

    If f∉x⁢y then ‖x⁢y⋄f‖=‖x⁢y‖; else ‖x⁢y⋄f‖=𝖣𝗂𝗌𝗍2⁢[x,j].

Since s∈S and y∈T2 (recall that T=T2), the distance ‖y⁢s⋄f‖ is obtained by querying the S⁢T-distance oracle. Thus the query answering algorithm can obtain ‖v⁢x⋄f‖,‖x⁢y⋄f‖, and ‖y⁢s⋄f‖ in O⁢(1) time. In response to the query Q⁢u⁢(s,v,f), the query answering algorithm returns ‖v⁢x⋄f‖+‖x⁢y⋄f‖+‖y⁢s⋄f‖.

We will show in Lemma 9 that our s-v distance estimate in G−f is at most 13⁢‖s⁢v⋄f‖.

Lemma 9.

For any (s,v)∈S×V and f∈E, our algorithm returns an s-v distance estimate with stretch ≤13 in G−f in O⁢(1) time.

Proof.

Suppose the query is Q⁢u⁢(s,v,f). If f∉s⁢v then the algorithm returns ‖s⁢v‖, thus the stretch is 1 in this case. So assume f∈s⁢v. Then the query answering algorithm returns ‖v⁢x⋄f‖+‖x⁢y⋄f‖+‖y⁢s⋄f‖, where x=tv and y=tx′. Let us bound the stretch.

We need to compare the sum ‖v⁢x⋄f‖+‖x⁢y⋄f‖+‖y⁢s⋄f‖ with ‖s⁢v⋄f‖. Let us first show the following claim.

Claim 10.

We have (i) ‖v⁢x‖≤‖v⁢s‖, (ii) ‖x⁢y‖≤2⁢‖v⁢s‖, and (iii) ‖y⁢s‖≤4⁢‖v⁢s‖.

Proof.

It follows from the definition of T1=ℒ1∪S that both x and s are in T1. Since x is the nearest vertex in T1 to v, we have ‖v⁢x‖≤‖v⁢s‖. Recall that y=tx′. Since y is the closest vertex in T2 to x, we have ‖x⁢y‖≤‖x⁢tv′‖, i.e., the x-y distance is at most the distance between x and tv′ (recall that tv′ is the nearest vertex in T2 to v). Furthermore, ‖x⁢tv′‖≤‖x⁢v‖+‖v⁢tv′‖.

Observe that both ‖x⁢v‖ and ‖v⁢tv′‖ are at most ‖s⁢v‖ since s∈T1∩T2, so v’s distance to its nearest vertex in T1 and also in T2 is at most ‖s⁢v‖. Thus ‖x⁢y‖≤2⁢‖s⁢v‖. So we have ‖y⁢s‖≤‖s⁢v‖+‖v⁢x‖+‖x⁢y‖≤‖s⁢v‖+‖s⁢v‖+2⁢‖s⁢v‖=4⁢‖s⁢v‖. ⊲

We are now ready to bound ‖v⁢x⋄f‖+‖x⁢y⋄f‖+‖y⁢s⋄f‖. There are 8 cases depending on the presence of edge f on various shortest paths.

  1. 1.

    f∉v⁢x and f∉x⁢y and f∉y⁢s. Then the algorithm returns ‖v⁢x‖+‖x⁢y‖+‖y⁢s‖.

    • ■

      It immediately follows from Claim 10 that the s-v distance estimate returned in this case is at most 7⁢‖s⁢v‖≤7⁢‖s⁢v⋄f‖.

  2. 2.

    f∉v⁢x and f∉x⁢y and f∈y⁢s. Then the algorithm returns ‖v⁢x‖+‖x⁢y‖+‖y⁢s⋄f‖. Since the failed edge f belongs to neither v⁢x nor x⁢y, we have ‖s⁢y⋄f‖≤‖s⁢v⋄f‖+‖v⁢x‖+‖x⁢y‖. We have ‖v⁢x‖+‖x⁢y‖≤3⁢‖s⁢v‖ (by Claim 10).

    • ■

      Thus the s-v distance estimate returned in this case is at most ‖s⁢v⋄f‖+6⁢‖s⁢v‖≤7⁢‖s⁢v⋄f‖ (by Claim 10).

  3. 3.

    f∉v⁢x and f∈x⁢y and f∉y⁢s. Then the algorithm returns ‖v⁢x‖+‖x⁢y⋄f‖+‖y⁢s‖. Observe that G−f has an x-y path of length at most ‖x⁢v‖+‖v⁢s⋄f‖+‖s⁢y‖. Since ‖y⁢s‖≤4⁢‖v⁢s‖ (by Claim 10), this x-y path in G−f is of length at most ‖s⁢v‖+‖s⁢v⋄f‖+4⁢‖s⁢v‖=5⁢‖s⁢v‖+‖s⁢v⋄f‖.

    • ■

      Using Claim 10 to bound ‖v⁢x‖ and ‖y⁢s‖, the s-v distance estimate returned in this case is at most ‖s⁢v‖+5⁢‖s⁢v‖+‖s⁢v⋄f‖+4⁢‖s⁢v‖=10⁢‖s⁢v‖+‖s⁢v⋄f‖≤11⁢‖s⁢v⋄f‖.

  4. 4.

    f∈v⁢x and f∉x⁢y and f∉y⁢s. Then the algorithm returns ‖v⁢x⋄f‖+‖x⁢y‖+‖y⁢s‖. Observe that G−f has a v-x path of length at most ‖v⁢s⋄f‖+‖s⁢y‖+‖y⁢x‖. This is of length at most ‖s⁢v⋄f‖+4⁢‖s⁢v‖+2⁢‖s⁢v‖=6⁢‖s⁢v‖+‖s⁢v⋄f‖.

    • ■

      Using Claim 10 to bound ‖x⁢y‖ and ‖y⁢s‖, the s-v distance estimate returned in this case is at most ‖s⁢v⋄f‖+6⁢‖s⁢v‖+2⁢‖s⁢v‖+4⁢‖s⁢v‖=12⁢‖s⁢v‖+‖s⁢v⋄f‖≤13⁢‖s⁢v⋄f‖.

  5. 5.

    f∉v⁢x and f∈x⁢y and f∈y⁢s. Consider the shortest path tree 𝒯⁢(x) rooted at x in G. Since f∉v⁢x and f∈x⁢y, the edge f∈w⁢y where w=𝖫𝖢𝖠𝒯⁢(x)⁢(v,y). But the edge f also belongs to y⁢s and s⁢v – this is not possible (see Figure 4). Thus this case cannot arise.

    Figure 4: The edge f=(a,b) is supposed to be in the paths s⁢v,x⁢y, and y⁢s, but not in v⁢x. Here w=𝖫𝖢𝖠𝒯⁢(x)⁢(v,y) where 𝒯⁢(x) is the shortest path rooted at x in G.
  6. 6.

    f∈v⁢x and f∉x⁢y and f∈y⁢s. Consider the shortest path tree 𝒯⁢(s) rooted at s in G and let z=𝖫𝖢𝖠𝒯⁢(s)⁢(v,x). Since f∈s⁢v and f∈v⁢x, it follows that f∈z⁢v. Hence f∉s⁢x. Thus there is a v-x path in G−f of length ‖v⁢s⋄f‖+‖s⁢x‖. Since ‖s⁢x‖≤‖s⁢v‖+‖v⁢x‖≤2⁢‖s⁢v‖, this v-x path in G−f has length ‖s⁢v⋄f‖+2⁢‖s⁢v‖.

    Since f∈s⁢v and f∈s⁢y, the edge f∈s⁢r where r=𝖫𝖢𝖠𝒯⁢(s)⁢(v,y). Thus the edge f does not belong to the path v-r-y in 𝒯⁢(s). Hence there is an s-y path in G−f of length ‖s⁢v⋄f‖+‖v⁢s‖+‖s⁢y‖≤‖s⁢v⋄f‖+‖v⁢s‖+4⁢‖s⁢v‖ (by Claim 10).

    • ■

      Thus G−f has an s-y path of length ‖s⁢v⋄f‖+5⁢‖v⁢s‖, plus a v-x path of length ‖s⁢v⋄f‖+2⁢‖v⁢s‖. Since ‖x⁢y‖≤2⁢‖v⁢s‖, the s-v distance estimate returned in this case is at most 2⁢‖s⁢v⋄f‖+9⁢‖v⁢s‖≤11⁢‖s⁢v⋄f‖.

  7. 7.

    f∈v⁢x and f∈x⁢y and f∉y⁢s. As seen in case 6, there is a v-x path in G−f of length ‖s⁢v⋄f‖+2⁢‖v⁢s‖. Moreover, since f∈v⁢x and f∈x⁢y, the edge f∈x⁢w where w=𝖫𝖢𝖠𝒯⁢(x)⁢(v,y). Hence the edge f does not belong to the path v-w-y in 𝒯⁢(x).

    Thus there is a v-y path in G−f of length at most ‖v⁢x‖+‖x⁢y‖≤3⁢‖s⁢v‖. Hence there is an x-v-y path of length at most ‖s⁢v⋄f‖+2⁢‖v⁢s‖+3⁢‖s⁢v‖=‖s⁢v⋄f‖+5⁢‖v⁢s‖.

    • ■

      So the s-v distance estimate returned in this case is at most ‖s⁢y‖+(‖s⁢v⋄f‖+5⁢‖v⁢s‖)+(‖s⁢v⋄f‖+2⁢‖v⁢s‖). Since ‖s⁢y‖≤4⁢‖s⁢v‖, this is at most 2⁢‖s⁢v⋄f‖+11⁢‖s⁢v‖≤13⁢‖s⁢v⋄f‖.

  8. 8.

    f∈v⁢x and f∈x⁢y and f∈y⁢s. As seen in case 7, there is a v-x path in G−f of length ‖s⁢v⋄f‖+2⁢‖v⁢s‖ and there is an x-y path of length at most ‖s⁢v⋄f‖+5⁢‖v⁢s‖. It also follows from case 7 that there is a v-y path in G−f of length at most 3⁢‖s⁢v‖, thus there is an s-y path in G−f of length at most ‖s⁢v⋄f‖+3⁢‖v⁢s‖.

    • ■

      So the s-v distance estimate returned in this case is at most 3⁢‖s⁢v⋄f‖+10⁢‖s⁢v‖≤13⁢‖s⁢v⋄f‖.

Thus the stretch of our approximate distance oracle is at most 13. We have already seen that the query answering time is O⁢(1). This finishes the proof of the lemma. ◀

Size of the oracle.

We show below in Lemma 11 that the space taken up by the data structures constructed in all the steps of our algorithm is O~⁢(n4/3+|S|⁢n).

Lemma 11.

The space needed to store all the data structures constructed by our algorithm is O~⁢(n4/3+|S|⁢n).

Proof.

The space taken up by the truncated shortest path trees 𝒯^⁢(u) for all u∈ℒ1 is O⁢(∑v∈V|v⁢tv|). Observe that |v⁢tv|≤n1/3 (by Proposition 4). Thus O⁢(∑v|v⁢tv|)=O⁢(n4/3). Similarly the space taken up by 𝒯⁢(t) for all t∈T2 is O⁢(n4/3⁢log⁡n+|S|⁢n) since |T2|=|ℒ2|+|S| and |ℒ2| is O⁢(n1/3⁢log⁡n). The size of the S⁢T-oracle (where T=T2) is also O~⁢(n4/3+|S|⁢n) (by Theorem 5).

For each vertex v, we store tv and tv′ – these are the nearest vertices to v in T1 and T2, respectively. For all edges f∈v⁢tv, we store ‖v⁢tv⋄f‖ in the data structure 𝖣𝗂𝗌𝗍1. We have |v⁢tv|≤n1/3 (by Proposition 4). Thus the space taken by the data structure 𝖣𝗂𝗌𝗍1 to store the distances 𝖣𝗂𝗌𝗍1⁢[v,i] where v∈V and 1≤i≤n1/3 is at most n4/3.

For all edges f∈u⁢tu′, where u∈T1, the data structure 𝖣𝗂𝗌𝗍2 stores ‖u⁢tu′⋄f‖. For any vertex u, we have |u⁢tu′|≤n2/3 (by Proposition 4). Thus the space taken by 𝖣𝗂𝗌𝗍2 to store the distances 𝖣𝗂𝗌𝗍2⁢[u,i] where u∈T1 and 1≤i≤n2/3 is |T1|⋅n2/3=O⁢((n2/3⁢log⁡n+|S|)⋅n2/3), which is O⁢(n4/3⁢log⁡n+|S|⁢n2/3). Thus the entire space taken up by all the data structures is O~⁢(n4/3+|S|⁢n). ◀

It is easy to see that our algorithm runs in expected polynomial time. As mentioned at the end of Section 3, by blowing up the sizes of ℒ1 and ℒ2 by a factor of log⁡n, their construction can be made deterministic as stated in [9, Lemma 1]. Moreover, we can easily ensure that L2⊆L1. Thus Theorem 2 follows. We restate it below for convenience. See 2

As mentioned in Remark 8, along with every distance in 𝖣𝗂𝗌𝗍1 and 𝖣𝗂𝗌𝗍2, we could also store the corresponding replacement paths in 2-decomposable form. Thus along with the approximate s-v distance, the query answering algorithm can also return the approximate path between s and v as the union of 3 paths, each in 2-decomposable form.

5 Concluding Remarks

Fault-tolerant approximate distance oracles that maintain approximate distances for all pairs of vertices have been well-studied. Fault-tolerant single source and multiple source exact distance oracles have also been studied. As mentioned in [9], given a subset S⊆V, for the problem of storing ‖s⁢v⋄f‖ where (s,v)∈S×V and f∉E is allowed333We thank a reviewer for pointing out this subtlety to us. (this is interpreted the same as if no edge has failed), using standard tools, it can be shown that there are n-vertex graph families, for which any representation that allows for the return of all the S×V post-failure distances must have size Ω⁢(n3/2⁢|S|). This motivates the study of sparser data structures that maintain approximate distances for all pairs in S×V under the failure of any f∈E. Such a data structure is a fault-tolerant sourcewise approximate distance oracle.

We showed two such oracles: one of size O~⁢(|S|⁢n+n3/2) and stretch 5 and another of size O~⁢(|S|⁢n+n4/3) and stretch 13. The query time for both oracles is constant. Upon query Q⁢u⁢(s,v,f) where f∉E, it turns out that both our query answering algorithms return the original distance ‖s⁢v‖ as if no edge has failed. There are several interesting open problems:

  • ■

    Are there approximate sourcewise distance oracles of size O~⁢(|S|⁢n+n1+1/k) and stretch 8⁢k−3 with O⁢(1) query answering time for all integers k≥1? Our constructions showed such oracles for k=1,2.

  • ■

    The study of fault-tolerant exact as well as approximate distance oracles has so far considered structured subsets of V×V such as S×T. Is there a sparse fault-tolerant exact or approximate distance oracle for an arbitrary subset 𝒫 of V×V?

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] Surender Baswana and Neelesh Khanna. Approximate shortest paths avoiding a failed vertex: Near optimal data structures for undirected unweighted graphs. Algorithmica, 66(1):18–50, 2013. doi:10.1007/S00453-012-9621-Y.
  • [3] Michael A. Bender and Martin Farach-Colton. The LCA problem revisited. In Gaston H. Gonnet, Daniel Panario, and Alfredo Viola, editors, LATIN 2000: Theoretical Informatics, 4th Latin American Symposium, Punta del Este, Uruguay, April 10-14, 2000, Proceedings, volume 1776 of Lecture Notes in Computer Science, pages 88–94. Springer, 2000. doi:10.1007/10719839_9.
  • [4] Aaron Bernstein and David R. Karger. Improved distance sensitivity oracles via random sampling. In Shang-Hua Teng, editor, Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, January 20-22, 2008, pages 34–43. SIAM, 2008. URL: http://dl.acm.org/citation.cfm?id=1347082.1347087.
  • [5] Aaron Bernstein and David R. Karger. A nearly optimal oracle for avoiding failed vertices and edges. In Michael Mitzenmacher, editor, Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 101–110. ACM, 2009. doi:10.1145/1536414.1536431.
  • [6] Davide Bilò, Shiri Chechik, Keerti Choudhary, Sarel Cohen, Tobias Friedrich, Simon Krogmann, and Martin Schirneck. Approximate distance sensitivity oracles in subquadratic space. TheoretiCS, 3, 2024. doi:10.46298/THEORETICS.24.15.
  • [7] Davide Bilò, Shiri Chechik, Keerti Choudhary, Sarel Cohen, Tobias Friedrich, and Martin Schirneck. Improved distance (sensitivity) oracles with subquadratic space. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, Chicago, IL, USA, October 27-30, 2024, pages 1550–1558. IEEE, 2024. doi:10.1109/FOCS61266.2024.00097.
  • [8] Davide Bilò, Keerti Choudhary, Sarel Cohen, Tobias Friedrich, Simon Krogmann, and Martin Schirneck. Compact distance oracles with large sensitivity and low stretch. In Pat Morin and Subhash Suri, editors, Algorithms and Data Structures - 18th International Symposium, WADS 2023, Montreal, QC, Canada, July 31 - August 2, 2023, Proceedings, volume 14079 of Lecture Notes in Computer Science, pages 149–163. Springer, 2023. doi:10.1007/978-3-031-38906-1_11.
  • [9] Davide Bilò, Keerti Choudhary, Luciano Gualà, Stefano Leucci, Merav Parter, and Guido Proietti. Efficient oracles and routing schemes for replacement paths. In Rolf Niedermeier and Brigitte Vallée, editors, 35th Symposium on Theoretical Aspects of Computer Science, STACS 2018, February 28 to March 3, 2018, Caen, France, volume 96 of LIPIcs, pages 13:1–13:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPICS.STACS.2018.13.
  • [10] Davide Bilò, Sarel Cohen, Tobias Friedrich, and Martin Schirneck. Near-optimal deterministic single-source distance sensitivity oracles. In Petra Mutzel, Rasmus Pagh, and Grzegorz Herman, editors, 29th Annual European Symposium on Algorithms, ESA 2021, September 6-8, 2021, Lisbon, Portugal (Virtual Conference), volume 204 of LIPIcs, pages 18:1–18:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.ESA.2021.18.
  • [11] Davide Bilò, Luciano Gualà, Stefano Leucci, and Guido Proietti. Multiple-edge-fault-tolerant approximate shortest-path trees. Algorithmica, 84(1):37–59, 2022. URL: https://doi.org/10.1007/s00453-021-00879-8, doi:10.1007/S00453-021-00879-8.
  • [12] 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. doi:10.1137/1.9781611974782.96.
  • [13] Shiri Chechik, Michael Langberg, David Peleg, and Liam Roditty. f-sensitivity distance oracles and routing schemes. Algorithmica, 63(4):861–882, 2012. doi:10.1007/S00453-011-9543-0.
  • [14] Camil Demetrescu and Mikkel Thorup. Oracles for distances avoiding a link-failure. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 838–843, 2002. URL: http://dl.acm.org/citation.cfm?id=545381.545490.
  • [15] Dipan Dey and Manoj Gupta. Near optimal algorithm for fault tolerant distance oracle and single source replacement path problem. In Shiri Chechik, Gonzalo Navarro, Eva Rotenberg, and Grzegorz Herman, editors, 30th Annual European Symposium on Algorithms, ESA 2022, September 5-9, 2022, Berlin/Potsdam, Germany, volume 244 of LIPIcs, pages 42:1–42:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.ESA.2022.42.
  • [16] Dipan Dey and Manoj Gupta. Near optimal dual fault tolerant distance oracle. In Timothy M. Chan, Johannes Fischer, John Iacono, and Grzegorz Herman, editors, 32nd Annual European Symposium on Algorithms, ESA 2024, September 2-4, 2024, Royal Holloway, London, United Kingdom, volume 308 of LIPIcs, pages 45:1–45:23. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ESA.2024.45.
  • [17] 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.
  • [18] 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.
  • [19] Ran Duan and Tianyi Zhang. Improved distance sensitivity oracles via tree partitioning. In Faith Ellen, Antonina Kolokolova, and Jörg-Rüdiger Sack, editors, Algorithms and Data Structures - 15th International Symposium, WADS 2017, St. John’s, NL, Canada, July 31 - August 2, 2017, Proceedings, volume 10389 of Lecture Notes in Computer Science, pages 349–360. Springer, 2017. doi:10.1007/978-3-319-62127-2_30.
  • [20] Manoj Gupta and Aditi Singh. Generic single edge fault tolerant exact distance oracle. In Ioannis Chatzigiannakis, Christos Kaklamanis, Dániel Marx, and Donald Sannella, editors, 45th International Colloquium on Automata, Languages, and Programming, ICALP 2018, July 9-13, 2018, Prague, Czech Republic, volume 107 of LIPIcs, pages 72:1–72:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPICS.ICALP.2018.72.
  • [21] John Hershberger and Subhash Suri. Vickrey prices and shortest paths: What is an edge worth? In 42nd Annual Symposium on Foundations of Computer Science, FOCS 2001, 14-17 October 2001, Las Vegas, Nevada, USA, pages 252–259. IEEE Computer Society, 2001. doi:10.1109/SFCS.2001.959899.
  • [22] Merav Parter and David Peleg. Sparse fault-tolerant BFS trees. In Hans L. Bodlaender and Giuseppe F. Italiano, editors, Algorithms - ESA 2013 - 21st Annual European Symposium, Sophia Antipolis, France, September 2-4, 2013. Proceedings, volume 8125 of Lecture Notes in Computer Science, pages 779–790. Springer, 2013. doi:10.1007/978-3-642-40450-4_66.