Abstract 1 Introduction 2 Preliminaries 3 Algorithm for Multi-Source CFT Distance Preservers 4 Lower Bounds for Multi-Source CFT Distance Preservers References Appendix A Neighborhood Cover

Color Fault-Tolerant Distance Preservers:
Õptimal Size in Conditionally Õptimal Time

Merav Parter ORCID Weizmann Institute, Rehovot, Israel    Asaf Petruschka ORCID Weizmann Institute, Rehovot, Israel
Abstract

We revisit the problem of fault-tolerant (FT) distance preservers, when failure events in the network admit a form of correlation modeled as color faults.

FT distance preservers are sparse subgraphs that preserve distances between specified pairs of vertices, even after some edge or vertex failures occur. In the classical fault model, any set of at most k edges or vertices might fail (where k1 is a given parameter). Despite extensive research, the classical model admits significant and tantalizing gaps, both in terms of sparsity bounds and of algorithmic efficiency.

In this work, we study the problem in the recently introduced color fault-tolerant (CFT) model: the given graph G=(V,E) has arbitrary colors on its edges/vertices where each color appears at most k times, and is susceptible to color faults, where the failure of color c causes all the c-colored elements to crash. Our main contribution is in the multi-source setting, where G has a source-set SV, and the CFT preserver should preserve S×V distances under any single color fault. We show the following results (where n=|V|, |E|=m):

  • There exists a CFT distance preserver H of G with O~(n21k+1|S|1k+1) edges.111The O~() notation suppresses poly-logarithmic factors in n.

  • The above sparsity bound is worst-case optimal up to polylogarithmic terms.

  • There is a combinatorial randomized algorithm that produces a preserver H whose size meets the above optimal sparsity bound, with running time of O~(mn11k+1|S|1k+1).

  • The above running time is conditionally optimal: a polynomial improvement would refute the combinatorial Boolean Matrix Multiplication (BMM) conjecture. Furthermore, the running time remains optimal even if we only require mild sparsification to m1ϵ edges.

Our (conditionally) tight algorithm relies on a new approach for compressing fault-tolerant distance information in the presence of nearby faults, using the tool of sparse neighborhood covers. We believe that this technique may have further applications in the study of fault-tolerant graph sparsification.

Keywords and phrases:
fault tolerance, network design, distance preservers
Category:
Track A: Algorithms, Complexity and Games
Funding:
Merav Parter: Supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme, grant agreement No. 949083.
Asaf Petruschka: Supported by an Azrieli Foundation fellowship.
Copyright and License:
[Uncaptioned image] © Merav Parter and Asaf Petruschka; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Sparsification and spanners
Related Version:
Full Version: https://arxiv.org/abs/2504.17868 [36]
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Let G=(V,E) be an undirected unweighted graph and PV×V be a set of vertex pairs. A subgraph H=(V,E) of G is called a P-distance preserver if distH(u,v)=distG(u,v) for every (u,v)P. Since their introduction by Coppersmith and Elkin [16], the graph-theoretic and algorithmic aspects of sparse distance preservers and their numerous applications have been extensively studied [4, 5, 6, 10, 40, 9, 20, 11, 18, 27, 25]. However, the above definition falls short when it comes to the crucial aspect of fault tolerance. In real-world networks, some nodes (vertices) or links (edges) might occasionally fail, and it is desirable for the distances in the surviving network to still be preserved in the surviving subgraph. This led researchers to introduce and study the natural notion of fault-tolerant (FT) distance preservers [7, 31, 29, 34, 35, 13, 19]. The following definition refers to failing vertices (the obvious modification to failing edges appears in parentheses): the subgraph H is called k-FT P-distance preserver if distHF(u,v)=distGF(u,v) for every (u,v)P and FV (FE) of size |F|k.

As stated by [7], finding sparse FT preservers turns out to be a very challenging task. Indeed, despite extensive research on the graph-theoretical and algorithmic aspects of k-FT distance preservers, tantalizing gaps and questions remain open to date, some resisting progress for over a decade. This work takes a different approach: we substitute the k-FT model by the recently-introduced color faults model [39, 38, 37], inspired by older notions such as shared risk resource groups [17, 26], hedge connectivity [21] and label cuts [44]. Intuitively, the goal is accounting for a form of correlation or dependence between failures; these are neglected by the classical k-FT setting allowing any set of up to k vertices/edges to fail.

We assume that G comes with arbitrary colors on its vertices or its edges, where each color appears at most k times. (Neighboring vertices/edges can have the same color.) These represent the “simplest” form of dependence between individual failures: elements of the same color fail together. The failure events to be supported are (single) color faults, where a faulty color c leaves us with the graph Gc where all vertices/edges of color c are failing (i.e., deleted from G). We get the following definition for color fault-tolerant (CFT) preservers:

Definition 1.

Given graph G=(V,E) whose vertices (edges) are colored such that each color appears at most k times, and pairs PV×V, subgraph H=(V,E) of G is a CFT P-distance preserver if for every color c and every (u,v)P, it holds that distGc(u,v)=distHc(u,v).

We note that the disjointness of color classes is not crucial for us: all of our results trivially extend if each vertex/edge is assigned with some constant number 1 of colors, and we focus on =1 just for sake of readability. However, the assumed bound k on the size of color classes is unavoidable: if one allows arbitrarily large color classes, then our results (presented next) show that the CFT preservers in consideration cannot provide meaningful sparsification.

Main Results.

Our main focus is multi-source fault-tolerant distance preservers, where there is a set SV of sources and P=S×V. This setting was first considered by Peleg and Parter [31], and has since attracted considerable attention [28, 32, 22, 24, 7, 30, 8]. The most fundamental problem is of a graph-theoretic nature: determining the (worst-case) size/sparsity of such preservers. Parter [28] showed a lower bound of Ω(n21k+1|S|1k+1) on the number of edges these preservers require in the k-FT model, for every k1. However, a matching upper bound is known only for k{1,2} [31, 28, 24]. When k3, the state-of-the-art upper bound is O(n212k|S|12k), given by [7, 8]. Resolving this gap for k-FT is a major open problem in the field, which poses challenging barriers as demonstrated by [8]. However, in the color faults model, we are able to fully resolve the sparsity question, up to logarithmic factors:

Theorem 2.

For any n-vertex colored graph G=(V,E) with color classes of size at most k, and any SV, there exists a CFT S×V distance preserver with O~(n21k+1|S|1k+1) edges.

Theorem 3 (Informal statement of Theorem 16).

The bound in Theorem 2 is worst-case optimal, up to polylogarithmic factors.

Another important aspect of research is algorithmic, namely, how efficiently can one compute such sparse preservers. The current best for k-FT multi-source preservers is the O~(mn) time algorithm of [7], producing a preserver with O~(n212k|S|12k) edges as mentioned before; for k=2, [28, 24] give optimal size guarantees of O~(n5/3|S|1/3) edges, but with larger running time. In this work, we settle the time complexity of combinatorial algorithms in the color faults model. The term “combinatorial algorithms” is loosely defined, colloquially referring to algorithms that do not use fast matrix multiplication tricks. Combinatorial algorithms are of significant interest from both practical and theoretical perspectives, see [1] for a comprehensive discussion. A fundamental conjecture regarding these is on combinatorial Boolean Matrix Multiplication (BMM), asserting that no combinatorial algorithm can polynomially improve over the naïve one (see precise statement in Conjecture 17). We give a combinatorial algorithm for computing multi-source CFT distance preservers with optimal size bound, whose improvement would refute this conjecture:

Theorem 4.

There is a combinatorial randomized algorithm with the following properties. Given a colored graph G=(V,E) with n vertices and m edges, where each color appears at most k times in G, and a source set SV, the algorithm runs in O~(mn11k+1|S|1k+1) time and outputs w.h.p.222The term w.h.p. (with high probability) means with probability 1nq for an arbitrarily large constant q. a CFT S×V distance preserver H with |E(H)|=O~(n21k+1|S|1k+1) edges.

Theorem 5 (Informal statement of Theorem 18).

If there is a combinatorial algorithm for computing CFT multi-source distance preservers that runs polynomially faster than in Theorem 4 and guarantees mild (polynomial) sparsification, then the combinatorial BMM conjecture is false.

The design of our (conditionally) tight algorithm introduces a new way to compress fault-tolerant distance information in the face of nearby faults, through sparse neighborhood covers [3]. We believe this approach has the potential to extend to other problems in fault-tolerant graph sparsification. We mention that combinatorial lower bounds of a similar flavor have been shown for the closely-related problem of replacement paths [43, 42, 12, 23]. Specifically, Vassilevska Williams, Woldeghebriel and Xu [43] have shown a lower bound for combinatorial data structures for replacement paths under k edge/vertex faults in directed graphs between a fixed pair of vertices. Our lower bound in Theorem 5 can also be interpreted as a similar data structure lower bound for undirected graphs in the single/multi-source setting (see Remark 20 for details).

Other CFT Preservers.

To complement our main results, in the full version [36] we further explore the landscape of other CFT preservers: single-pair or pairwise distance preservers, +2 spanners and reachability or bounded flow preservers. These are interesting to view from the perspective of “utilizing” the correlation of failures encoded by the color structure. For example, for single-pair distance preservers in weighted graphs, no meaningful sparsification guarantee is possible already with k=2 edge/vertex faults [7]. However, in the CFT model with color classes of size up to k=O(logn), our results imply an upper bound of O~(n3/2). On the other hand, for single-source reachability preservers, we prove that the sparsity in the CFT setting does not improve on k-FT.

Concluding Remarks.

The size upper bound of Theorem 2 also holds when G is directed (we prove this in the full version [36]). However, our algorithm in Theorem 4 does not directly work for directed graphs, and extending it is an interesting open problem. As the main “undirected ingredient” is the neighborhood cover, it is plausible that directed LDD (low diameter decomposition) could be useful for this purpose. Another challenge is derandomization: here, the main barrier is the use of oblivious hitting sets to hit yet-unknown replacement paths, a key randomized ingredient which is recurrent in this context [7, 12, 23, 14, 15]. Finally, while our work settles the complexity of combinatorial algorithms, the study of non-combinatorial algorithms relying on fast matrix multiplications is an intriguing future direction.

2 Preliminaries

We use the following notations for the vertex (resp., edge) colored graph G=(V,E). As usual, we denote n=|V| and m=|E|. The color of vertex (resp., edge) x is denoted by c(x). The set of all c-colored vertices (resp., edges) is Vc (resp., Ec). The notation Gc is a shorthand for GVc (resp., GEc). We assume that each color appears at most k times in G. For two vertices u,vV, π(u,v) denotes a shortest uv path in G, and π(u,vc) denotes a shortest uv path in Gc where c is some color. The last edge of π(u,v), i.e. the edge touching v, is denoted by 𝙻𝚊𝚜𝚝𝙴(u,v). In a similar fashion, 𝙻𝚊𝚜𝚝𝙴(u,vc) is the last edge of π(u,vc). We also need notations for balls: the r-radius ball of a vertex set UV in the graph G is BG(U,r)={vVdistG(u,v)r}=uUBG(u,r).

3 Algorithm for Multi-Source CFT Distance Preservers

In this section, we give our main result, providing the algorithm stated in Theorem 4 (note that this algorithm also proves the size bound stated in Theorem 2). Throughout, we fix the given sources SV. We assume that k=O(logn) as otherwise, the size bound of Theorem 4 is trivially O(n2) and we can just output H=G. Also, we assume that mn21k+1|S|1k+1, as otherwise we can again output H=G. We give the algorithm for the case where G has colored vertices; this is a somewhat arbitrary choice, as the proof for colored edges is virtually the same.333We chose to show the proof with failing vertices rather than edges because in some fault-tolerant settings, vertex faults are considered harder to deal with than edge faults. However, the proofs in this paper are trivially translated from vertex colors to edge colors and vice versa. (The exceptional case is our results on single-pair distance preservers, but these appear only in the full version [36]). For convenience, one may assume that shortest paths in G, and in Gc for any color c, are unique (although this is not necessary for us). This can be achieved by treating the edges of G as having initially weight 1, then perturbing the weight of each edge by adding small random noise.

3.1 Framework and Overview

To build a valid CFT S×V distance preserver H, our algorithm must include in H a shortest st path from Gc, for every triplet (s,t,c)S×V×C. But in fact, it has been commonly observed (e.g., [33, 28, 24, 7]) that including only the last edge of every such path suffices.

Observation 6 (Last edge observation).

Suppose H includes the last edge of a shortest st path in Gc, for every (s,t,c)S×V×C. Then H is a CFT S×V distance preserver of G.

Proof.

We show that if d:=distGc(s,t), then Hc contains an st path of length d, by induction on d. The base case d=0 is trivial. When d>0, the last edge (t,t) of a shortest st path in Gc is also in Hc by assumption. As distGc(s,t)=d1, by induction hypothesis, Hc contains an st path of length d1. Concatenating (t,t) gives the desired st path. Thus, the algorithm’s goal is to include 𝙻𝚊𝚜𝚝𝙴(s,tc) in H for every triplet (s,t,c)S×V×C.

We define decreasing distance thresholds by di:=(n/|S|)1ik+1 for i=1,2,,k. Additionally, we define two “trivial thresholds” by d0:=n and dk+1:=1. We use the following terminology: Two vertices u,vV are said to be i-near if distG(u,v)2di, and i-far otherwise. The factor 2 is due to technical reasons, which will become apparent shortly (in the proof of Lemma 9).

Next, for each nontrivial threshold di, i=1,2,k, we construct a corresponding hitting set AiV of size |Ai|=O(ndilogn)=O(nik+1|S|1ik+1logn), with the following property:

  1. (P)

    For every sS, tV, and color c, if P is a contiguous subpath of π(s,tc) of length |P|di, then P contains some vertex from Ai.

This is achieved by taking Ai to be a random vertex subset of size Θ(ndilogn), ensuring Property (P) w.h.p. by standard hitting set arguments. We call the vertices in Ai the i-landmarks. Note that |Ai| is increasing with i. We also define the 0-landmarks as A0=S, and there are no (k+1)-landmarks.

Levels.

The algorithm works in k+1 levels, numbered as i=0,1,,k. Each level only “cares about” including the last edges corresponding to triplets (s,t,c) such that the distances between the target t and the vertices of color c are well-structured, as in the following definition.

Definition 7 (Level-i triplet).

A triplet (s,t,c)S×V×C is in level i, 0ik if there are i vertices of color c that are i-far from t, and all other vertices of color c are (i+1)-near to t.

The strategy of dividing into levels indeed suffices for including the last edges for all triplets, as shown by the following observation:

Observation 8.

Every triplet (s,t,c)S×V×C is found in some level i, 0ik.

Proof.

Let x1,,x be the vertices of color c, ordered such that distG(x1,t)distG(x,t). Recall that k. Let i=min{0jj=, or distG(xj+1,t)2dj+1}. Then

distG(x1,t)distG(xi,t)>2di>2di+1distG(xi+1,t)distG(x,t),

so x1,,xi are i-far from t, and xi+1,,x are (i+1)-near to t. So, (s,t,c) is in level i.

The main tool we use to exploit the nice distances structure of i-level triplets is formalized in the following Lemma 9; while its proof is simple, it plays a crucial role in our algorithm. Intuitively, it allows us to convert a level-i triplet (s,t,c) into a corresponding highly-structured triplet (z,t,c) where zAiS, such that 𝙻𝚊𝚜𝚝𝙴(s,tc)=𝙻𝚊𝚜𝚝𝙴(z,tc). Thus, we think of AiS as the sources for level i, or i-sources for short. Instead of treating level-i triplets (s,t,c) directly, we will treat all those highly-structured triplets (z,t,c)(AiS)×V×C and aim to include the last edges corresponding to them.

While this approach requires us to consider a larger number of sources (AiS instead of S), it comes with major benefits reflected in the structure. First, for a given i-source z, we will only care about targets t lying inside the ball BG(z,di). Second, we will also only care about colors that appear at most ki times in this ball BG(z,di), so the “effective size” of the faulty set of vertices gets smaller. Furthermore, all these appearances of color c are concentrated in a much smaller ball, of radius roughly di+1, around the target.

Lemma 9.

Let (s,t,c)S×V×C in level i, 0ik. Then, there is an i-source zAiS such that:

  1. (1)

    z lies on the di-suffix of π(s,tc), and in particular 𝙻𝚊𝚜𝚝𝙴(s,tc)=𝙻𝚊𝚜𝚝𝙴(z,tc).

  2. (2)

    If xBG(z,di) has color c, then x is (i+1)-near to t.

  3. (3)

    If x,xBG(z,di) have color c, then distG(x,x)4di+1.

  4. (4)

    The number of c-colored vertices in BG(z,di) is at most ki.

Proof.

If distGc(s,t)di we take z=s, and otherwise we can take some zAi found on the di-suffix of π(s,tc), which exists by property (P). Then (1) clearly holds. For (2), observe that distG(x,t)distG(x,z)+distG(z,t)2di, so x is i-near to t. Since (s,t,c) is in level i, any c-colored vertex that is not i-far from t must be (i+1)-near to t, hence x is (i+1)-near to t. Item (3) follows immediately from (2) by triangle inequality. Finally, (4) follows from (2): indeed, because (s,t,c) is in level i, there are i vertices of color c that are i-far from t. As the c-colored vertices in BG(z,di) are (i+1)-near to t, they can be at most ki.

We are now ready to give an overview of the algorithm. First, we explain how the last level is easily dealt with, and afterwards we only focus on the other levels. As a first step, we give a simple algorithm that achieves near-optimal size for the output, but has suboptimal running time. Then, we explain the high-level ideas for improving the running time to near-optimal.

Handling the Last Level.

Item 4 in Lemma 9 makes the last level, i.e., i=k, particularly easy to deal with: We simply compute the SSSP (single-source shortest path) trees rooted at each k-source zAkS, and include all these trees in the output H. This adds O(n|AkS|) edges and takes O(m|AkS|) time, which is easily verified to be within our budget. To see the correctness, consider some level-k triplet (s,t,c). By Lemma 9, there is some zAkS on the dk-suffix of π(s,tc) (item 1), and BG(z,dk) contains no c-colored vertices (item 4). Hence, the dk-length suffix of π(s,tc) is simply π(z,t), which is the zt path in the tree rooted at z.

Achieving Near-Optimal Size.

Let us fix some non-last level 0ik1. As in the last level, we still compute SSSP trees from the i-sources as a preprocessing step: For every i-source zAiS, we execute SSSP from z in G, but trim it at distance di; The resulting rooted tree T(z) is the shortest path tree from z inside the ball BG(z,di). We add all trees T(z) to the output H. Again, this adds O(n|AiS|) edges and takes O(m|AiS|) time, which is within budget.

Now, fix an i-source zAiS. By Lemma 9(1), we only care about adding 𝙻𝚊𝚜𝚝𝙴(z,tc) for triplets (z,t,c) where tBG(z,di), i.e., tT(z). In this case, π(z,t), which is the T(z)-path from the root z to t, is already in H. So, if π(z,t) avoids the color c, then (z,t,c) is already taken care of. We therefore assume that t has some ancestor x of color c in T(z). But by Lemma 9(2) we have distG(x,t)2di+1, meaning x is in fact within the 2di+1 nearest ancestors to t.

In other words, to treat the i-source z, it’s enough to add 𝙻𝚊𝚜𝚝𝙴(z,tc) whenever the target t sees the color c among its 2di+1 nearest ancestors in T(z). Thus, each target t only causes the insertion of up to 2di+1 edges when processing a specific i-source z, hence |AiS|2di+1 edges overall (in level i). Summing over tV, the total number of added edges in level i is at most n|AiS|2di+1=O~(n2di+1di)=O~(n21k+1|S|1k+1), as required.

By the discussion above, we get the following simple algorithm for level i: For each i-source zAiS and color c, run SSSP from z in Gc, but add to H only the last edges of the shortest paths π(z,tc) such that t has the color c among its 2di+1 nearest ancestors in T(z). This simple algorithm is already enough to ensure the output H is a CFT S×V distance preserver of the required size. However, the running time is O(m|AiS|n), which in level k1 becomes O~(mn22k+1|S|2k+1). This is larger than our desired running time by a factor of n11k+1|S|1k+1.

Achieving Near-Optimal Time.

The main challenge lies in improving the running time to near-optimal. Roughly, the idea is to harness the same argument we used for bounding the size of the output H, to also effectively bound the running time: if we could restrict each edge to participate in only O~(di+1) SSSP computations from a specific i-source z, we would get total running time of O~(m|AiS|di+1)=O~(mn11k+1|S|1k+1) which is precisely our budget. Intuitively, to achieve this, we would like the SSSP computation from z in Gc to only use edges incident on vertices t such that the color c appears on their nearest O~(di+1) ancestors; these “allowed” edges are the only ones we might actually need to add into H as a result of this computation. Clearly, this intuition doesn’t work as is: e.g., it could be that all edges incident on z are not allowed to be used during the SSSP computation from z, which is absurd.

To make it work, instead of executing the SSSP directly on Gc, we construct a shortcutted graph G^(z,c) that has the allowed original edges, plus extra weighted shortcut edges which represent safe paths avoiding the color c.

We put two types of shortcuts in G^(z,c). The simpler ones represent paths in T(z) that are unaffected by the failure of color c. Roughly speaking, these simple shortcuts let the SSSP computation “get inside” the subtrees of the c-colored vertices. However, the allowed edges are found only in the shallow layers of these subtrees (the first O~(di+1) layers), while shortest paths from z avoiding c may need to travel into deep layers, even if they end in the shallow ones.

The second, more complicated type of shortcuts is designed to represent such traversals in the deep layers. These use the fact that the (i+1)-landmarks Ai+1 must appear on the path at least once every di+1 steps. The idea is to create a shell of additional O~(di+1) layers beneath the original shallow layers, which we now call the kernel layers. We also allow the edges touching the shell to be used, which is within budget. Now, to go from between the kernel layers and the deep layers beneath the shell, one must walk through the shell for at least di+1 steps, and hit some (i+1)-landmark there. Thus, we can add shortcuts to the (i+1)-landmarks in the shell, which represent paths that entirely avoid the kernel (and hence the color c); these take care of representing the traversal into deep layers.

As it turns out, the shortcut edges are few enough so that they do not hinder the overall running time of the SSSP computations in the shortcutted graphs G^(z,c). However, the second-type shortcuts present a problem: how do we compute their weights in the first place? We need those weights just to construct G^(z,c). A priori, this requires computing distance in G minus the kernel layers, which depend on the color c, and is therefore too costly. We overcome this obstacle by using (a variant of) the well-known tool of sparse neighborhood covers. Essentially, each cluster in the neighborhood cover will be used to define the kernel layers and shell layers for many different colors c, and thus we can compute the shortcuts for avoiding the kernels of the different clusters (instead of different colors), which can be done efficiently.

3.2 Algorithm Description for Level 𝒊𝒌𝟏

From now on, we focus on the algorithm for level i, which ensures that 𝙻𝚊𝚜𝚝𝙴(s,tc) is included in H for every level-i triplet (s,t,c). In its analysis, we will show that it takes O~(mn11k+1|S|1k+1) time while adding O~(n21k+1|S|1k+1) edges to H, so summing over all k=O(logn) levels yields the required running time and size bounds of the entire algorithm.

Step 1: Shortest-Path Trees from 𝒊-Sources.

For each i-source zAiS, we execute SSSP in G from the root z. Let T(z) be the resulting shortest-path tree, but trimmed at depth di. We add all trees T(z) to the output H. This adds O(n|AiS|) edges and takes O(m|AiS|) time, which is easily verified to be within our budget. Note that this step also yields the distance distG(z,v) between any i-source zAiS and any vertex v. We will later use these distances as weights for shortcuts in the shortcutted graphs, as explained in the overview.

Step 2: Neighborhood Cover.

An r-neighborhood cover is a collection of vertex-subsets called clusters, such that every vertex has its r-radius ball contained in some cluster. The quality of a neighborhood cover is measured by two parameters that one wishes to minimize: The diameter of the clusters, and their overlap which is the maximum number of clusters having some vertex common to all of them. For our purposes, we need a variant of neighborhood cover, where each cluster consists of an inner kernel and shell, and the kernels themselves already cover all the r-neighborhoods. Formally, we use the following result:

Lemma 10.

Let r1 be an integer. There is an O~(m) time algorithm that computes a collection of kernels K1,,KV with corresponding clusters Xj:=BG(Kj,r) and shells Yj:=XjKj, such that:

  • (Covering) Each vV has a covering kernel Kj with BG(v,r)Kj.

  • (Diameter) Each cluster has weak diameter444A vertex set WV is said to have weak diameter d if distG(w,w)d for every w,wW. O(rlogn).

  • (Overlap) Each vV belongs to O(logn) clusters.

Lemma 10 follows as a corollary from the classical near-linear time algorithm for neighborhood covers (without kernels) of [3]. We provide the proof in Appendix A.

For level i, we apply Lemma 10 with r:=4di+1, where this choice of radius stems from item 3 of Lemma 9. From now on, K1,,K, X1,,X and Y1,,Y denote the kernels, clusters and shells resulting from this application.

As explained in the overview, the shortcutted graphs will have weighted shortcut edges based on the neighborhood cover. These shortcuts will correspond to distances from the following set:

{distGKj(a,v)1j,aAi+1Yj,vVKj}.

Namely, for each (i+1)-landmark aAi+1 and each j such that a belongs to the shell Yj, we need to compute SSSP in GKj, i.e., avoiding the kernel Kj. By the overlap guarantee in Lemma 10, each (i+1)-landmark appears in O(logn) shells, and hence triggers only O(logn) SSSP calls. Thus, the total time spent for computing these distances is O~(m|Ai+1|)O~(m|Ak|)=O~(mn11k+1|S|1k+1), which is within budget.

Step 3: Finding Relevant Colors.

We also use the neighborhood cover to define the notion of relevant colors:

Definition 11 (Relevant Color for i-Source).

Color c is relevant for i-source zAiS if there exists some c-colored vertex xBG(z,di) whose covering kernel Kj (i.e., the kernel with BG(x,4di+1)Kj) contains all c-colored vertices in BG(z,di). In this case, we choose one such arbitrary x, and denote the kernel, cluster and shell for the pair z,c by K(z,c):=Kj, X(z,c):=Xj and Y(z,c):=Yj, respectively.

The reasoning behind the name “relevant” stems from Lemma 9(3): it says that an i-source z should only care about colors c such that the c-colored vertices in BG(z,di) are within distance 4di+1 from each other, and hence the covering kernel of any one of them would contain all of them. To check if some color c is relevant for some i-source z only takes O~(1) time, since each vertex in VcBG(z,di) only belongs to O(logn) kernels, and |Vc|k=O(logn). Thus, computing all pairs of i-sources and relevant colors takes time zAiSO~(|BG(z,di)|)|AkS|×O~(m)=O~(mn11k+1|S|1k+1), which is within budget.

Step 4: Constructing Shortcutted Graphs.

Fix an i-source zAiS and relevant color c. We now give the construction of the corresponding shortcutted graph G^(z,c). We first introduce some notations and terminologies. To avoid clutter, in the following we may omit z,c from the notations when they are clear from context.

  • The ball refers to B:=BG(z,di), and the tree refers to the shortest paths tree T:=T(z) from z in B, which was computed in Step 1.

  • A vertex vB is called affected if it is a descendant of some c-colored vertex in the tree T, and the set of affected vertices is denoted by D:=D(z,c).

  • The kernel, cluster, and shell refer to K:=K(z,c), X:=X(z,c), and Y:=Y(z,c) from Definition 11, respectively. Recall that the cluster is the 4di+1-radius ball around the kernel, i.e., X=BG(K,4di+1), and the shell is the part of the cluster outside the kernel, i.e., Y=XK.

  • The affected kernel, affected cluster and affected shell are the intersections of the kernel, cluster and shell with the affected set D, denoted KD, XD and YD respectively.

  • The designated landmarks L:=L(z,c) are all those (i+1)-landmarks found in the affected shell. That is, L=Ai+1YD.

  • The outer layer O:=O(z,c) are all those vertices in B that have some neighbor from the affected cluster, but are not affected themselves. That is, O=NG(XD)(BD).

We define the shortcut graph for z and c as follows (see verbal description following the formal definition below).

The Shortcutted Graph G^(z,c)

For zAiS and relevant color c, the shortcutted graph G^=G^(z,c) is defined by

V(G^) :=B,
E(G^) :=OriginalEdges(G^)LandmarkShortcuts(G^)RootShortcuts(G^),

where the edges and their weights are defined by

OriginalEdges(G^) :={(u,v) of weight 1(u,v)E,uB,vXD}
LandmarkShortcuts(G^) :={(a,v) of weight distGK(a,v)aL,vBK}
RootShortcuts(G^) :={if L:{(z,v) of weight distG(z,v)vO or vB(KD)}if L=:{(z,v) of weight distG(z,v)vO}

The vertex set of G^ is just the ball B. We include in G^ every original edge from G that has some endpoint in the affected cluster XD (and the other endpoint can be anywhere in B). These original edges are given weight 1. Then, we add two types of shortcut edges to G^. One type is the landmark shortcuts: From each designated landmark aL, we add edges to every vertex v outside the kernel K, with weight distGK(a,v). The other type is the root shortcuts: First, we add edges from the root z to every vertex v in the outer layer O, with weight distG(z,v). Additionally, in the “non-degenerate” case where L, i.e., there is some designated landmark, we add such root shortcuts from z to every vB(KD), i.e., v is a non-affected vertex outside the kernel. (The reason behind this slight complication is rather technical. Essentially, if L=, then the latter kind of root shortcuts are not required for us, but including them might damage the running time.)

We defer the analysis of the time it takes to construct the shortcut graphs, as it is more convenient to analyze together with the time to execute the next Step 5.

Step 5: SSSPs in Shortcutted Graphs.

For every pair of i-source zAiS and relevant color c, we consider the corresponding shortcutted graph G^=G^(z,c). We execute (weighted) SSSP from z in G^c. Then, for each target vertex t in the affected kernel KD, we add the last edge of the zt shortest path computed by this SSSP into the output H. Note that this edge must be original, since shortcuts do not touch the affected kernel.

This concludes the description of the algorithm for level i. Next, we provide an analysis of the output size and running time (for steps 4 and 5). Afterward, we provide the correctness proof for the algorithm.

3.3 Size and Running Time Analysis

The analysis of the output size and the algorithm’s running time hinges on the following:

Lemma 12.

Let zAiS and color c relevant for z. Then, every vertex in the affected cluster XD(z,c) must have a c-colored vertex among its O(di+1logn) nearest ancestors in T(z).

Proof.

Let vXD(z,c). Then, because v is affected, it has some c-colored ancestor x in T(z). Since c is a relevant color for z, the corresponding cluster X(z,c) (in fact, even its kernel K(z,c)) contains every c-colored vertex in T(z), and particularly x. As clusters have weak diameter O(di+1logn), the distance between x and v in G, and hence also in the shortest-path tree T(z), is O(di+1logn).

First, we analyze the number of edges added to the output H during level i. Each subroutine for pair z,c adds as many edges as the size of the affected kernel. So, by Lemma 12, the total number of added edges during level i is |V||AiS|O(di+1logn)=O~(n2di+1di)=O~(n21k+1|S|1k+1), which is within our budget.

We now focus on the running time. To start, let us consider the time required to construct the shortcutted graphs. The primary task here is to identify the vertices in the affected kernel/cluster/shell. By Lemma 12, this can be done by scanning the subtrees rooted in the c-colored vertices in T(z), but only up to depth O(di+1logn) from the root of the subtree, and checking if the scanned vertices belong to the corresponding kernel/cluster/shell. Thus, fixing z and letting c vary, each edge in T(z) is scanned only O(di+1logn) times. Now summing over z, we bound the running time for identifying all affected clusters by m|AiS|O(di+1logn)=O~(mndi+1di)=O~(mn11k+1|S|1k+1), which is within budget. Once the affected kernel/cluster/shell (and the designated landmarks inside the affected shell) are identified, the rest of the time to construct the shortcutted graph G^(z,c) is linear in the number of edges (original or shortcuts) that G^(z,c) has. The SSSP we execute in this G^(z,c) is also near-linear in the number of edges; hence, it remains to account for the time required to run the SSSPs in the shortcutted graphs.

Observe that the number of edges in G^(z,c) is dominated by its original edges and its landmark shortcuts. Indeed, a root shortcut of the form (z,v) with vO can be charged to some original edge (v,u) with uXD. Also, a root shortcut of the form (z,v) with vB(KD) can be charged to a landmark shortcut (a,v) with aL. Now, recall that original edges and landmark shortcuts have at least one endpoint in the affected cluster. Thus, by Lemma 12, each original edge eE can appear in at most |AiS|O(di+1logn)=O~(ndi+1di)=O~(n11k+1|S|1k+1) shortcutted graphs. Similarly, each pair in Ai+1×V can appear as a landmark shortcut (with varying weight) in O~(n11k+1|S|1k+1) shortcutted graphs. So, summing over all pairs z,c, the total time for level i (other than the preprocessing, which we already accounted for) is

(m+|Ai+1|n)O~(n11k+1|S|1k+1)

Note that |Ai+1|n|Ak|n=O~(n21k+1|S|1k+1)O~(m), so the total running time of level i is O~(mn11k+1|S|1k+1) as needed.

3.4 Correctness

We now prove the correctness of the algorithm in level i, meaning that it includes in the output H all of the required last edges in this level. Let (s,t,c)S×V×C be a level-i triplet; our goal is to show that 𝙻𝚊𝚜𝚝𝙴(s,tc)H. To this end, let zAiS be the i-source from Lemma 9 for the triplet (s,t,c). By Lemma 9(1), we have 𝙻𝚊𝚜𝚝𝙴(s,tc)=𝙻𝚊𝚜𝚝𝙴(z,tc), and we will show that the latter has been added to H during level i.

We first handle a trivial case, when π(z,t) doesn’t have the color c; then 𝙻𝚊𝚜𝚝𝙴(z,tc) is just the last edge of π(z,t). Note that π(z,t) has length at most di by Lemma 9(1), and hence it is found in the shortest-path tree T=T(z) of the ball B=BG(z,di), which we’ve added to H. Thus, we may assume t has some c-colored ancestor x in the tree T. By Lemma 9(3) we have VcBBG(x,4di+1), hence the covering kernel of x contains all of VcB. Therefore, color c is relevant for the i-source z. We thus focus on the subroutine executed for the pair z,c (and again, omit them from notations to avoid clutter).

Consider K, X, and Y, which are, respectively, the kernel, cluster, and shell we have chosen for z and c. By their definition, there is some c-colored vertex xB such that BG(x,4di+1)K. Now, by Lemma 9(2), we have distG(x,t)2di+1, implying that tK. Recall that t also has the c-colored vertex x as an ancestor, meaning t is an affected vertex in T, i.e., tD. Thus, t is in the affected kernel KD, meaning that the subroutine for z,c included in H the last edge of the shortest zt path in G^c, and our goal is to show that this is in fact 𝙻𝚊𝚜𝚝𝙴(z,tc). To this end, we first observe the following:

Observation 13.

The following hold:

  1. (1)

    π(z,tc) is the shortest zt path in G(VcB) (and not only in Gc).

  2. (2)

    Every path in G^c corresponds to some path in G(VcB).

Proof.

  1. (1)

    By Lemma 9(1), distGc(z,t)di, so π(z,tc) cannot leave the di-ball B around z.

  2. (2)

    This follows as shortcuts in G^ correspond to paths in G(VcB). Indeed, root shortcuts correspond to paths in T to unaffected vertices, which avoid the color c entirely. As for landmark shortcuts, they represent paths in GK, and the kernel K contains VcB by its definition.

Thus, the heart of the argument lies in the following lemma, completing the correctness proof:

Lemma 14.

There is a path in G^c that corresponds to π(z,tc).

Proof.

First, observe that once π(z,tc) enters the affected set D, it stays in D. This is because if vBD is some unaffected vertex, then the shortest zv in Gc is simply the tree path in T, which only consists of unaffected vertices. We use this observation (implicitly) throughout.

Partition π(z,tc) into subpaths P1P2P2q (last vertex of Pj is first vertex of Pj+1), where the even subpaths P2,P4,,P2q are exactly the maximal subpaths within the affected core KD. (This is well defined as zKD and tKD.) All original edges inside the affected cluster exist in G^, so the even subpaths are taken care of, and we just need to argue about the odd ones.

Consider any odd subpath Pj except the prefix P1. If Pj does not leave the affected cluster XD, then Pj exists in G^ as is. Otherwise, Pj must take its first edge from some uKD into some v in the affected shell YD, and walk through YD for at least 4di+1 steps to leave the cluster (since the shell is the 4di+1-width ring around the kernel). So by the hitting set property (P), this traversal through the shell must hit some (i+1)-landmark aAi+1YD=L. From a, Pj continues outside the kernel up until its last edge connecting some vYD to the final vertex uKD. Note that the edges (u,v) and (v,u) are within the affected cluster XD, and hence included in G^. Also, G^ has the landmark shortcuts (v,a) and (a,v) with weights distGK(v,a) and distGK(a,v), which is precisely the distances that Pj travels between v,a, and between a,v. Thus, the path (u,v)(v,a)(a,v)(v,u) in G^c corresponds to Pj.

It remains to consider the prefix P1. Let us first handle the case where P1 does not go through DXD, i.e., it only visits unaffected vertices or travels inside the affected cluster. Let v be the last unaffected vertex on P1. The next vertex after v must be in XD, meaning vO. Thus, G^ has the root shortcut (z,v) with weight distG(z,v), which is exactly the distance P1 travels between z,v. After reaching v, the path P1 only uses edges touching XD, which exist in G^. So, P1 has a corresponding path in G^c as needed.

Finally, suppose P1 goes through DXD. Then, after visiting its last vertex from DXD, it must travel for at least 4di+1 steps inside the shell YD, until it takes its final edge from some vYD to its final vertex uKD. So, by property (P), this traversal on the shell must hit some designated landmark aL (and in particular L). Then, G^ has the landmark shortcut (a,v) of weight distGK(a,v), which is precisely the distance that P1 travels between a,v. Also, the edge (v,u) is within XD, and thus exists in G^. It remains to show that the subpath P1 of P1 between z,a has a corresponding path in G^c. To this end, consider the last unaffected uBD vertex that P1 visits.

  • If uK, then G^ has the root shortcut (z,u) of weight distG(z,u), which is the distance P1 travels between z,u. Also, G^ has the landmark shortcut (u,a) with weight distGK(u,a), which is the distance P1 travels between u,a.

  • If uK, then consider the next vertex v after u in P1. Then v is affected, so it cannot be in the kernel (as P1 only reaches the affected kernel in its last vertex u). Thus, G^ has the landmark shortcut (v,a) of weight distGK, which is the distance of P1 between v,a. We thus remain with the subpath P1′′ between z,v. As v is an affected neighbor of the kernel, it must be in the affected cluster XD, and hence uO. Thus, the original edge (u,v) is in G^, and G^ contains a root shortcut (z,u) of weight distG(z,u): together, they correspond to P1′′.

So, in both cases G^c has a corresponding path to P1, and we are done.

This concludes the proof of Theorem 4.

4 Lower Bounds for Multi-Source CFT Distance Preservers

4.1 Tree Construction

Both of the lower bounds for CFT multi-source distance preservers (size and running time) hinge on a colored tree construction, which adapts the one given by Parter [28] for the k-FT setting to hold also in the more relaxed CFT setting with color classes of size at most k.

Lemma 15.

Let k0 and q2 be integers. There exists a rooted, partially colored555“Partially colored” means that vertices/edges with no color are allowed. Alternatively, uncolored vertices/edges can be thought of as having a unique color that does not appear anywhere else. tree T=T(k,q) with the following properties:

  1. (a)

    For every leaf v of T, there exists a color cv such that v is the unique leaf of minimal depth among those leaves that remain connected to the root in Tcv.

  2. (b)

    Each color appears on at most k edges in T.

  3. (c)

    T has qk leaves.

  4. (d)

    Each leaf in T has depth at least d(k,q):=qk1 and at most D(k,q):=2(qk1).

  5. (e)

    The number of edges in T is N(k,q)=k(qk+1qk1).

  6. (f)

    The tree T and the colors cv corresponding to each leaf v can be computed in linear time (w.r.t. the size of T).

Proof.

We show the proof with edge colors: the vertex-colored version of the tree is obtained by assigning each vertex the color of the edge connecting it to its parent. By induction on k. For the base case, T(0,q) is a single vertex v with no edges. We artificially define the color palette of T(0,q) as {cv}, with the color cv unused. The required properties clearly hold. For the induction step, we construct T=T(k,q) for k1 as follows.

  • Create q disjoint copies T1,,Tq of T(k1,q), with disjoint color palettes (so that no color appears in two different copies). The leaves of T will be those of T1,,Tq. For a leaf v of Ti, we define cv as the same color guaranteed to exist by Property (a) of Ti.

  • Create q disjoint uncolored paths Q1,,Qq, where |Qi|=2(qi)qk1 (so Qq is a single vertex). “Hang” each Ti at the end of Qi, i.e., the last vertex of Qi is the root ri of Ti.

  • Let u1,,uq be the first vertices of Q1,,Qq respectively. Connect each consecutive pair ui,ui+1 by a path Pi with |Pi|=qk1, and color Pi as follows: for each leaf v of Ti, assign its corresponding color cv to some unique edge in Pi. (By Property (c), Ti has qk1 leaves, so Pi has exactly enough edges to accommodate the colors.)

  • Define the root of T as r:=u1.

See Figure 1 for an illustration.

Figure 1: Construction of the tree T(k=2,q=3). T1, T2 and T3 are copies of T(1,3) with disjoint colors. The corresponding color cv for each leaf v is shown beneath it.

To prove the stated properties, we first focus on the paths going from the root of T to the roots of T1,,Tq, denoted by R1,,Rq respectively. By Property (d) of T(k1,q), it holds that

|Ri|+d(k1,q)0ptT(v)|Ri|+D(k1,q)for any leaf v in Ti. (1)

We calculate |Ri|; observe that Ri=P1Pi1Qi, so

|Ri| =(i1)qk1+2(qi)qk1=(2qi1)qk1 (2)

We are now ready to show the required properties. The most interesting is Property (a); the rest follow by straightforward induction.

  • (a)

    Consider a leaf v, originating from Ti. The only path of P1,,Pq1 on which the color cv appears is Pi (or, if i=q, none of them contain cv). Hence, the path Rj survives in Tcv iff ji. Therefore, a leaf v of T that remains connected to r in Tcv is either (i) found in Ti and remains connected to its root in Ticv, or (ii) found in some Tj with j<i.
    By Property (a) of Ti, v has minimal depth in Ti among the type-(i) leaves, hence this also holds in T. Next, let v be a type-(ii) leaf. In this case,
    0ptT(v)0ptT(v) (|Rj||Ri|)+(D(k1,q)d(k1,q)) by Equation 1 =(ij)qk1(qk11) by Equation 2, def. of d(,q),D(,q) 1 as ij1.

  • (b)

    Each color c in T appears at most k1 times in some Ti (by induction), at most once in Pi, and nowhere else, so overall at most k times.

  • (c)

    By induction, each Ti has qk1 leaves, hence T has qqk1=qk leaves.

  • (d)

    The shortest (longest) of the Ri’s is Rq (R1) by Equation 2. So by Equation 1 for leaf v,

    0ptT(v) |Rq|+d(k1,q)=(q1)qk1+qk11=qk1=d(k,q),
    0ptT(v) |R1|+D(k1,q)=2(q1)qk1+2(qk11)=2(qk1)=D(k,q).
  • (e)

    Each edge of T either is in some Ti, Qi or Pi. Hence, the total number of edges is
    qN(k1,q)+i=1q|Qi|+i=1q1|Pi| =q(k1)(qkqk2)+(q1)qk+(q1)qk1 =k(qk+1qk1)=N(k,q).

  • (f)

    Immediate by the construction procedure of T from T1,,Tq.

4.2 Size Lower Bound

We now prove the tight lower bound on the worst-case size of CFT multi-source distance preservers.

Theorem 16.

For any integers 1k,σn, there exists an n-vertex colored graph G=(V,E), where each color appears at most k times, and sources SV with |S|=σ, such that any CFT S×V distance preserver of G has at least Ω~(n21k+1σ1k+1) edges.

Proof.

We construct the lower bound instance as follows:

  • Take σ disjoint copies T1,T2,,Tσ of the tree T(k,q) from Lemma 15, where we set q:=(nσk)1k+1. For each copy, we use a different color palette, so that the trees are also color-disjoint, with color classes of size at most k by Lemma 15(b).

  • Define S as the σ different roots s1,,sσ of T1,,Tσ (respectively).

  • Denote by X the set of leaves of T1,,Tσ.

  • Create a set Y of n new vertices, and add all edges (x,y)X×Y (with no color) to G.

The total number of vertices is

|V(G)|=n+i=1σ|V(Ti)|=n+σO(kqk+1)=n+σO(nσ)=Θ(n),

where the first equality is by Lemma 15(e), and the second by choice of q. The number of edges in X×Y is

ni=1σ#leaves in Ti=nσqk=Ω(n21k+1σ1k+11k),

where the first equality is by Lemma 15(c), and the second by choice of q. So, it suffices to show that a CFT S×V distance preserver H of G must contain every edge (x,y)X×Y.

Consider the copy Ti of T(k,q) in which x is a leaf. By Lemma 15(a), there is a color cx such that x is the unique leaf of minimal depth in Ti that remains connected to si in Ticx. By construction of G, any siy path in Gcx must start with an si-to-leaf path in Ticx, and take at least one more edge to arrive at y. It follows that there is a unique shortest siy path in Gcx, which goes along the six path in Ticx, then takes the edge (x,y). As H is a subgraph of G and distHc(s,y)=distGc(s,y), it must contain this path, and particularly the edge (x,y).

4.3 Conditional Lower Bound for Combinatorial Algorithms

Finally, we give the lower bound for combinatorial algorithms computing CFT multi-source distance preservers, conditioned on the following:

Conjecture 17 (see e.g. [41, 42, 2, 12]).

Any combinatorial algorithm that gets as input two Boolean n×n matrices A,B{0,1}n with a total of m 1’s and outputs their (OR,AND)-product AB, requires Ω((mn)1o(1)+n2) running time.

Theorem 18.

Fix k1 and a,b[0,1] such that a>k+bk+1. For any integer n1, denote m=m(n)=n1+a+o(1) and σ=σ(n)=nb+o(1). (So, m is polynomially larger than n21k+1σ1k+1.) Suppose there is a combinatorial algorithm with the following guarantee: There is a constant ϵ>0 such that given a colored graph with color classes of size at most k that has n vertices, m edges and σ sources, the algorithm outputs a CFT multi-source distance preserver with m1ϵ edges within n2+a1bk+1ϵ time (i.e., polynomially faster than mn11k+1σ1k+1). Then Conjecture 17 is false.

Proof.

Consider a BMM instance, i.e., two n×n Boolean matrices A,B with a total of at most m=n1+a+o(1) 1’s. We represent this instance as a graph G whose vertices are partitioned to three sets I,J,K of size n, where there is an edge between iI and jJ iff A[i,j]=1, and similarly, there is an edge between jJ and kK iff B[j,k]=1. Thus, for iI and kK, there is a 2-path between i,k iff the Boolean product of A,B has a 1 in entry i,k. So, to solve the BMM instance, we need to determine which pairs in I×K have 2-paths.

Recall that σ=nb+o(1). We partition I into r:=(n/σ)1k+1 blocks of size n/r=nkk+1σ1k+1. The algorithm works in a block-by-block manner; from now on, we focus on finding the pairs with 2-paths in I×K for some block II. We further partition I into σ sub-blocks I1,,Iσ of size n/(rσ)=(n/σ)kk+1. For each sub-block I, we create a copy T of the tree T(k,q:=(n/σ)1k+1) of Lemma 15, with mutually disjoint color palettes for the different copies. Each tree T has qk=(n/σ)kk+1 leaves; we connect it to G by identifying them with the sub-block I. Let G be the resulting graph after connecting these σ trees to the block I. We’ve only added kn=O(n) vertices (and edges) to get G from G. Note that G is a partially-colored graph with color classes having size at most k: colors appear only on the trees, and the G part remains uncolored, i.e., non-faulty. Let S={s1,,sσ} be the roots of T1,,Tσ. We construct a CFT S×V(G) distance preserver HG using the assumed sparsification algorithm.

Next, we iterate over every iI, with our goal to find every kK such that i,k have a 2-path. Let I be the sub-block containing i, and let ci be the color corresponding to i as a leaf of T: namely, i is the unique leaf of minimum distance from the root s in Tci. We run BFS from s in Hci, which gives us all distances from s to every other vertex in Hci, and thus also in Gc (as H is a preserver of G). Finally, for each kK, we check if the following holds:

distGci(s,k)(?)distGci(s,i)+2. (3)

This achieves our goal, by the following claim:

Claim 19.

There is a 2-path between i,k in G iff Equation 3 holds.

Proof (of claim)..

If there is a 2-path between i,k in G, then it survives in Gci (since the colors in G only appear on added trees), so Equation 3 holds by triangle inequality.

Conversely, suppose Equation 3 holds. By our construction of G, the shortest path between s and k in Gci starts by walking from the root s on the tree Tci to some leaf iIj. So,
distGci(s,k) =distTci(s,i)+distGci(i,k) distTci(s,i)+distGci(i,k) as i has min. depth in leaves of Tci, (4) distTci(s,i)+2 as there are no edges between I and K, (5) distGci(s,i)+2 since Tci is a subgraph of Gci, distGci(s,k) as Equation 3 holds.

Hence, all the above inequalities in fact hold with equality. By the equality in Equation 4 we have distTci(s,i)=distTci(s,i). But i is the unique leaf of minimum depth in Tci, so we conclude that i=i. Now, by the equality in Equation 5 we have distGc(i,k)=2, meaning there is a 2-path between i (which is i) and k, as we needed to show.

We now analyze the algorithm’s running time. Denote the size and running time guarantees of the assumed sparsification algorithm by

s=m1ϵ=n1+aϵ+o(1),t=n2+a1bk+1ϵ=n2+aϵ+o(1)/r.

Consider the time spent on block I:

  • Constructing G from G amounts to constructing the trees T1,,Tσ. Each such tree is constructed in linear time in its size, and the total size of the trees is O(n).

  • Applying the sparsification to get the preserver H takes up to O(t) time.

  • Then, for each iI, we run one BFS procedure in (a subgraph of) H and check n inequalities involving the output distances, which takes O(s+n) time.

Thus, the total running time of our BMM algorithm is
r#blocks(O(n)construct G+O(t)construct H+(n/r)|I|O(s+n)BFS in H)=O(rt+ns+n2)=O(n2+aϵ+o(1)+n2).

Since the sparsification algorithm for constructing preservers is combinatorial, our resulting BMM algorithm is also combinatorial, and its running time (which is faster than Ω((mn)1o(1)+n2)) contradicts Conjecture 17.

 Remark 20.

Observe that a CFT S×V distance preserver H of G immediately provides a data structure that, given a query (s,c) of a source sS and a failing color c, reports the single-source distances in Gc, i.e. {distGc(s,t)tV}, in O(|E(H)|) time. Indeed, the query is answered by computing BFS rooted at s in Hc. So, the size guarantee of the algorithm that computes H translates to the query time of the data structure, and its running time becomes the preprocessing time.

In the proof of Theorem 18, we actually used this implied data structure and not the preserver directly. Thus, the lower bound obtained there also hold for the data structure problem. Furthermore, as a k-FT S×V distance preserver is also a CFT preserver when color classes have size bounded by k, the lower bound also holds for the k-FT version of the data structure, that given a query (s,F) with sS and F a set of at most k failing vertices/edges, reports the single-source distances from s in GF.

References

  • [1] Amir Abboud, Nick Fischer, Zander Kelley, Shachar Lovett, and Raghu Meka. New graph decompositions and combinatorial boolean matrix multiplication algorithms. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, Vancouver, BC, Canada, June 24-28, 2024, pages 935–943. ACM, 2024. doi:10.1145/3618260.3649696.
  • [2] Amir Abboud and Virginia Vassilevska Williams. Popular conjectures imply strong lower bounds for dynamic problems. In 55th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2014, Philadelphia, PA, USA, October 18-21, 2014, pages 434–443. IEEE Computer Society, 2014. doi:10.1109/FOCS.2014.53.
  • [3] Baruch Awerbuch, Bonnie Berger, Lenore Cowen, and David Peleg. Near-linear time construction of sparse neighborhood covers. SIAM Journal on Computing, 28(1):263–277, 1998. doi:10.1137/S0097539794271898.
  • [4] Greg Bodwin. On the structure of unique shortest paths in graphs. 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 2071–2089. SIAM, 2019. doi:10.1137/1.9781611975482.125.
  • [5] Greg Bodwin. New results on linear size distance preservers. SIAM J. Comput., 50(2):662–673, 2021. doi:10.1137/19M123662X.
  • [6] Greg Bodwin. A note on distance-preserving graph sparsification. Inf. Process. Lett., 174:106205, 2022. doi:10.1016/J.IPL.2021.106205.
  • [7] 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, volume 80 of LIPIcs, pages 73:1–73:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.73.
  • [8] Greg Bodwin and Merav Parter. Restorable shortest path tiebreaking for edge-faulty graphs. J. ACM, 70(5):28:1–28:24, 2023. doi:10.1145/3603542.
  • [9] Greg Bodwin and Virginia Vassilevska Williams. Very sparse additive spanners and emulators. In Proceedings of the 2015 Conference on Innovations in Theoretical Computer Science, ITCS 2015, Rehovot, Israel, January 11-13, 2015, pages 377–382. ACM, 2015. doi:10.1145/2688073.2688103.
  • [10] Greg Bodwin and Virginia Vassilevska Williams. Better distance preservers and additive spanners. ACM Trans. Algorithms, 17(4):36:1–36:24, 2021. doi:10.1145/3490147.
  • [11] Hsien-Chih Chang, Pawel Gawrychowski, Shay Mozes, and Oren Weimann. Near-optimal distance emulator for planar graphs. In 26th Annual European Symposium on Algorithms, ESA 2018, Helsinki, Finland, August 20-22, 2018, volume 112 of LIPIcs, pages 16:1–16:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.ESA.2018.16.
  • [12] Shiri Chechik and Sarel Cohen. Near optimal algorithms for the single source replacement paths problem. In 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.
  • [13] Shiri Chechik, Michael Langberg, David Peleg, and Liam Roditty. Fault-tolerant spanners for general graphs. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC, pages 435–444. ACM, 2009. doi:10.1145/1536414.1536475.
  • [14] Shiri Chechik and Ofer Magen. Near optimal algorithm for the directed single source replacement paths problem. In 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, Saarbrücken, Germany (Virtual Conference), July 8-11, 2020, volume 168 of LIPIcs, pages 81:1–81:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ICALP.2020.81.
  • [15] Shiri Chechik and Tianyi Zhang. Faster algorithms for dual-failure replacement paths. In 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, Tallinn, Estonia, July 8-12, 2024, volume 297 of LIPIcs, pages 41:1–41:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICALP.2024.41.
  • [16] Don Coppersmith and Michael Elkin. Sparse sourcewise and pairwise distance preservers. SIAM J. Discret. Math., 20(2):463–501, 2006. doi:10.1137/050630696.
  • [17] David Coudert, Pallab Datta, Stephane Perennes, Hervé Rivano, and Marie-Emilie Voge. Shared risk resource group complexity and approximability issues. Parallel Process. Lett., 17(2):169–184, 2007. doi:10.1142/S0129626407002958.
  • [18] Marek Cygan, Fabrizio Grandoni, and Telikepalli Kavitha. On pairwise spanners. In 30th International Symposium on Theoretical Aspects of Computer Science, STACS 2013, Kiel, Germany, February 27 - March 2, 2013, volume 20 of LIPIcs, pages 209–220. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2013. doi:10.4230/LIPIcs.STACS.2013.209.
  • [19] Michael Dinitz and Robert Krauthgamer. Fault-tolerant spanners: better and simpler. In Proceedings of the 30th Annual ACM Symposium on Principles of Distributed Computing, PODC, pages 169–178, 2011. doi:10.1145/1993806.1993830.
  • [20] Michael Elkin and Seth Pettie. A linear-size logarithmic stretch path-reporting distance oracle for general graphs. ACM Trans. Algorithms, 12(4):50:1–50:31, 2016. doi:10.1145/2888397.
  • [21] Mohsen Ghaffari, David R. Karger, and Debmalya Panigrahi. Random contractions and sampling for hypergraph and hedge connectivity. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, pages 1101–1114. SIAM, 2017. doi:10.1137/1.9781611974782.71.
  • [22] Mohsen Ghaffari and Merav Parter. Near-optimal distributed algorithms for fault-tolerant tree structures. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2016, Asilomar State Beach/Pacific Grove, CA, USA, July 11-13, 2016, pages 387–396. ACM, 2016. doi:10.1145/2935764.2935795.
  • [23] Manoj Gupta, Rahul Jain, and Nitiksha Modi. Multiple source replacement path problem. In PODC ’20: ACM Symposium on Principles of Distributed Computing, Virtual Event, Italy, August 3-7, 2020, pages 339–348. ACM, 2020. doi:10.1145/3382734.3405714.
  • [24] 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, volume 80 of LIPIcs, pages 127:1–127:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.127.
  • [25] Gary Hoppenworth, Yinzhan Xu, and Zixuan Xu. New separations and reductions for directed hopsets and preservers. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 4405–4443. SIAM, 2025. doi:10.1137/1.9781611978322.150.
  • [26] F. Kuipers. An overview of algorithms for network survivability. ISRN Communications and Networking, 2012, December 2012. doi:10.5402/2012/932456.
  • [27] Ofer Neiman and Idan Shabat. On the size overhead of pairwise spanners. In 15th Innovations in Theoretical Computer Science Conference, ITCS 2024, Berkeley, CA, USA, January 30 - February 2, 2024, volume 287 of LIPIcs, pages 83:1–83:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ITCS.2024.83.
  • [28] Merav Parter. Dual failure resilient BFS structure. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing, PODC 2015, Donostia-San Sebastián, Spain, July 21 - 23, 2015, pages 481–490. ACM, 2015. doi:10.1145/2767386.2767408.
  • [29] Merav Parter. Vertex fault tolerant additive spanners. Distributed Comput., 30(5):357–372, 2017. doi:10.1007/S00446-015-0252-9.
  • [30] Merav Parter. Distributed constructions of dual-failure fault-tolerant distance preservers. In 34th International Symposium on Distributed Computing, DISC 2020, October 12-16, 2020, Virtual Conference, volume 179 of LIPIcs, pages 21:1–21:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.DISC.2020.21.
  • [31] 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, volume 8125 of Lecture Notes in Computer Science, pages 779–790. Springer, 2013. doi:10.1007/978-3-642-40450-4_66.
  • [32] Merav Parter and David Peleg. Fault tolerant BFS structures: A reinforcement-backup tradeoff. In Proceedings of the 27th ACM on Symposium on Parallelism in Algorithms and Architectures, SPAA 2015, Portland, OR, USA, June 13-15, 2015, pages 264–273. ACM, 2015. doi:10.1145/2755573.2755590.
  • [33] Merav Parter and David Peleg. Sparse fault-tolerant BFS structures. ACM Trans. Algorithms, 13(1):11:1–11:24, 2016. doi:10.1145/2976741.
  • [34] Merav Parter and David Peleg. Fault-tolerant approximate BFS structures. ACM Trans. Algorithms, 14(1):10:1–10:15, 2018. doi:10.1145/3022730.
  • [35] Merav Parter and David Peleg. Fault tolerant approximate BFS structures with additive stretch. Algorithmica, 82(12):3458–3491, 2020. doi:10.1007/S00453-020-00734-2.
  • [36] Merav Parter and Asaf Petruschka. Color fault-tolerant distance preservers: Õptimal size in conditionally Õptimal time, 2026. arXiv:2504.17868.
  • [37] Merav Parter, Asaf Petruschka, Shay Sapir, and Elad Tzalik. Parks and recreation: Color fault-tolerant spanners made local. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 4061–4094. SIAM, 2025. doi:10.1137/1.9781611978322.139.
  • [38] Asaf Petruschka, Shay Sapir, and Elad Tzalik. Connectivity labeling in faulty colored graphs. In 38th International Symposium on Distributed Computing, DISC 2024, Madrid, Spain, October 28 - November 1, 2024, volume 319 of LIPIcs, pages 36:1–36:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.DISC.2024.36.
  • [39] Asaf Petruschka, Shay Sapir, and Elad Tzalik. Color fault-tolerant spanners. ACM Trans. Algorithms, 22(1):6:1–6:21, 2026. doi:10.1145/3750728.
  • [40] Seth Pettie. Low distortion spanners. ACM Trans. Algorithms, 6(1):7:1–7:22, 2009. doi:10.1145/1644015.1644022.
  • [41] Liam Roditty and Uri Zwick. On dynamic shortest paths problems. Algorithmica, 61(2):389–401, 2011. doi:10.1007/S00453-010-9401-5.
  • [42] Virginia Vassilevska Williams and R. Ryan Williams. Subcubic equivalences between path, matrix, and triangle problems. J. ACM, 65(5):27:1–27:38, 2018. doi:10.1145/3186893.
  • [43] Virginia Vassilevska Williams, Eyob Woldeghebriel, and Yinzhan Xu. Algorithms and lower bounds for replacement paths under multiple edge failure. In 63rd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2022, Denver, CO, USA, October 31 - November 3, 2022, pages 907–918. IEEE, 2022. doi:10.1109/FOCS54457.2022.00090.
  • [44] Peng Zhang, Jin-Yi Cai, Lin-Qing Tang, and Wen-Bo Zhao. Approximation and hardness results for label cut and related problems. Journal of Combinatorial Optimization, 21:192–208, 2011. doi:10.1007/s10878-009-9222-0.

Appendix A Neighborhood Cover

Here, we give the proof of Lemma 10 from the classical O~(m) time algorithm for neighborhood covers by Awerbuch, Berger, Cowen and Peleg [3]. First, by using their algorithm to construct a “standard” 2r-neighborhood cover, we can compute a collection of clusters ZijV for 1ip, 1jq, and a mapping cov:V{Zij}1ip,1jq, such that:

  • (Covering) For each vV, BG(v,2r)cov(v).

  • (Diameter) Each Zij has (strong) diameter O(rlogn).

  • (Overlap) p=O(logn) and, for every i=1,p, the sets {Zij}1jq are mutually disjoint.

We construct our “shelled” neighborhood cover for balls of radius r as follows: For each Zij we create the kernel Kij=BG(cov1(Zij),r) and cluster Xij=BG(Kij,r)=BG(cov1(Zij),2r) (and the shell Yij=XijKij). Let us now prove the required properties:

  • (Covering) For vV, if cov(v)=Zij, then BG(v,r)Kij by definition of Kij.

  • (Diameter) If u,vXij, then by definition of Xij there are u,vcov1(Zij)Zij such that distG(u,u),distG(v,v)2r. By triangle inequality, distG(u,v)4r+distG(u,v). But u,vZij which has diameter O(rlogn), so we obtain distG(u,v)=O(rlogn). Thus, Xij has weak diameter O(rlogn).

  • (Overlap) We assert that for each 1ip, the clusters {Xij}1jq are mutually disjoint, so in particular each vertex can belong to at most p=O(logn) clusters. Seeking contradiction, suppose vXijXi for j. Then there exist ujcov1(Zij) and ucov1(Zi) such that vBG(uj,2r)BG(u,2r)ZijZi, which is impossible as Zij and Zi are disjoint.

As for the running time: Computing Kij and Xij is done by multi-origin BFS666By multi-origin BFS we mean adding a dummy source vertex, connecting it by dummy edges to the set of origins, and running BFS from the dummy source. from cov1(Zij) trimmed at depth 2r, so the running time is linear in the number of edges touching Xij. For a fixed 1ip, the clusters {Xij}j are disjoint, so the time to compute them is O(m). Hence, the overall running time is O~(m)+O(pm)=O~(m). This concludes the proof of Lemma 10.