Connectivity Oracle Under Vertex Failures by Shortcutting Unbreakable Decomposition
Abstract
We study connectivity oracle under vertex failures, one of the most fundamental graph data structures with many applications. We provide a new deterministic connectivity oracle that handles update in time and answers query in time, while using space and preprocessing time.
Although some previous works achieve update time and query time [18, 19], the update time is still -dependent, while oracles that have -independent update and query times [21, 22] cannot achieve optimal query time [9] and often have space and processing time. Our solution would be the first vertex-failure connectivity oracle that achieves query time with update time completely independent of , while improving space usage and having competitive preprocessing time.
Keywords and phrases:
Graphs, Fault tolerant, OraclesCategory:
Track A: Algorithms, Complexity and GamesFunding:
Thatchaphol Saranurak: Supported by NSF Grant CCF-2238138 and a Sloan Fellowship.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Data structures design and analysisEditors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
We study connectivity oracles under vertex failures. Given an undirected graph , the goal is to preprocess so that after a batch of at most vertices fails, we can quickly answer connectivity queries in the remaining graph . This is a fundamental graph data structure in the dynamic subgraph model [6], and it is also useful as a subroutine for other basic connectivity tasks, such as vertex-cut oracles [12, 15] and listing shredders [11].
A particularly natural regime – both in applications and as an algorithmic benchmark – is when the number of failures is a small constant in practice while the underlying graph is massive. In this setting, even a overhead per batch can dominate; this motivates designing oracles whose update and query costs depend only on (i.e., are independent of ).
1.1 The Connectivity Oracle Problem
The oracle supports three phases:
-
Preprocess: Given with , , and a parameter , build a data structure. The preprocessing time is the time to build the structure; the space is its memory usage.
-
Update: Given a failure set with , update the data structure in update time.
-
Query: Given , decide whether and are connected in in query time.
Typically, one update (for a batch ) is followed by many connectivity queries under the same failures.
1.2 The Frontier: Eliminating -Dependence
There is a long line of work optimizing the tradeoffs among space, preprocessing time, update time, and query time. SPQR trees [10, 7] yield an optimal oracle that handles failures using space, preprocessing, and update and query time. Very recently, Kosinas [15] extended this optimal oracle to .
For general , the first structures are due to Duan and Pettie [4, 5]. More recently, Long and Saranurak [18] gave a deterministic oracle whose parameters are simultaneously optimal up to factors under fine-grained complexity hypotheses: space, preprocessing time111Throughout the paper, we use to hide polylog factors., update time, and query time. Long and Wang [19] later improved the factor in the update time to polylogarithmic. Although this landscape is essentially settled when mild -dependence is allowed, these results share a common drawback: their update time still contains an -dependent term (subpolynomial or polylogarithmic).
Existing results essentially fall into two camps. On the one hand, we have near-linear-space oracles with excellent -dependence, but their update time still depends on . On the other hand, only two known approaches achieve update and query times depending solely on :
-
The randomized oracle of van den Brand and Saranurak [22] uses algebraic techniques to obtain update time and query time (where is the matrix multiplication exponent), but requires space and preprocessing time.
-
The deterministic approach of Pilipczuk et al. [21] is based on unbreakable decomposition. It achieves -independent update time, but their oracle with linear space comes with doubly exponential dependence on (and very large preprocessing). They also obtained an alternative oracle with update and query time, but it is strictly worse than the oracle by [22] except being deterministic.
Thus, prior -independent oracles either use space or incur doubly exponential dependency on . Moreover, the preprocessing time is far from linear. See Table 1.
1.3 Our Results
We resolve both drawbacks: we design a deterministic vertex-failure connectivity oracle with near-linear space in (with only a factor) and purely update and query time, independent of . Moreover, our preprocessing time is near-linear when .
Theorem 1 (near-linear space, -independent update/query).
There exists a deterministic vertex-failure connectivity oracle that uses space, preprocessing time, update time, and query time.
Here denotes the extremely slowly growing inverse Ackermann function for any fixed constant . For constant , the space and preprocessing are near-linear, while update and query are constant-time.
The ideal dependence on would be update time and query time: this would be both -independent and conditionally optimal under fine-grained conjectures [9, 18]. We take a step toward this frontier by showing that optimal query time is achievable with purely -dependent update time, via a tradeoff that allows an additional term in space (while keeping preprocessing near-linear for constant ).
Theorem 2 (Optimal query time via extra space).
There exists a deterministic vertex-failure connectivity oracle that uses space, preprocessing time, update time, and query time.
The query time in Theorem 2 is conditionally optimal [9]. Table 1 summarizes known vertex-failure connectivity oracles whose update times are independent of and compares them with our results.
| Det./Rand. | Space | Preprocessing | Update | Query | ||||
|
Det. | |||||||
|
Rand. | |||||||
|
Det. | |||||||
| Det. | ||||||||
|
Det. | |||||||
| Det. |
1.4 Other Consequences: Vertex-Cut Oracles
Beyond connectivity queries, our oracle improves other basic connectivity tasks. We discuss a simple reduction (refining the DFS-based framework of [15]) that converts any vertex-failure connectivity oracle into a vertex-cut oracle222A vertex-cut oracle supports vertex-cut query: will deleting a given set of vertices disconnect the graph?. More interestingly, this reduction is nearly lossless, and thus it immediately opens up new trade-offs with -independent query time for vertex-cut oracles (the current vertex-cut oracles [12, 15] all have their query times depending on ). For example, by plugging in our new -independent connectivity oracle, it gives the following new vertex-cut oracle.
Theorem 3.
There exists a deterministic vertex-cut oracle that uses space, preprocessing time, and query time.
Furthermore, we show a similar reduction for the more generalized Steiner vertex-cut oracles problem. Previously, there were results [1] for the related problem of -vertex-fault-tolerant Steiner connectivity labeling schemes, but there are still no explicit results333[1] states that [12]’s vertex-cut oracle “seems plausible to extend also to the Steiner variant”, but there is no explicit proof, and the reduction following [15]’s DFS-based framework will likely be simpler. for Steiner vertex-cut oracles. The new reduction immediately yields many new trade-offs for Steiner vertex-cut oracles, leveraging the rich body of existing results for vertex-failure connectivity oracles. However, compared with the first reduction, it incurs larger losses (one more overhead on the query time), and therefore cannot yield reasonable trade-offs with -independent query time.
1.5 Techniques
We improve upon the oracle of [21] with space using three key ideas. First, to improve the space to near-linear, we introduce the usage of shortcut on top of the tree that represents the unbreakable decomposition of the graph. Second, to improve the preprocessing time, we observe that we can bootstrap the construction of our -independent-update oracle using -dependent-update oracles (by e.g. [14, 19]). Third, to obtain the optimal query time, we introduce the patch sets. However, applying these three ideas at the same time is non-trivial.
1.6 Organization
2 Overview
2.1 The Unbreakable Decomposition Framework
We start by introducing the framework inspired by [21] using unbreakable decomposition [13]. In a graph , we say a set is -unbreakable if for any subset of at most vertices, there can be at most one connected component in such that while . A -unbreakable decomposition of a graph is a tree decomposition where the bag associated with each tree node is -unbreakable in . Additionally, we say that is strongly -unbreakable if every is -unbreakable in the subgraph of induced by the union of all bags in the subtree of rooted at . Throughout the paper, we will use a strongly -unbreakable decomposition of adhesion given by [13], thus in this paper we always assume .
Given the set of at most failed vertices and for each , we first identify the topmost node where its bag contains and call the node important. Let be the set of all important nodes and let be the least common ancestor closure of in , adding the root if it is not already included. Note that and . For each , we aim to compute the profile of , which is a graph on the adhesion of where two vertices are adjacent if and only if they are connected in the subgraph of induced by the union of all bags in the subtree rooted at . We build these profiles bottom-up, starting from the lowest nodes in and working all the way to the root. We use additional precomputed graphs called torsos to quickly jump between important nodes and skipping sections of the graph where no vertex failures occur. For any where is a strict ancestor of , the graph is on the adhesions of and . Two vertices in are adjacent if and only if there exists a path between them in whose interior lies entirely within the the induced subgraph on the union of all bags in the subtree rooted at and stopping at .
Computing torsos is a main bottleneck in the preprocessing time from [21]. To speed up this, we observe that torso queries can be computed via standard connectivity queries with vertex failures. Therefore, we build another oracle using [14] to boost the preprocessing time.
To evaluate the query , we first consider and repeat the same process for . We first augment to the computed profile of its closest ancestor in while maintaining its connectivity invariants. Then we identify all important nodes along the path from to the root, and working upward by augmenting to each of their profiles until the root. After this is repeated for , we can simply check the profile of the root to determine if and are connected in .
2.2 Tree Shortcuts
To avoid quadratic space used in storing all torsos [21], we develop an approach using shortcuts. We observe that, suppose we have where is an ancestor of and is an ancestor of in , then can be computed through and efficiently.
With this observation, we only need to store a subset of torsos in our oracle. We model this by a set of shortcut edges in that when is an ancestor of , can reach through constant shortcut edges. Therefore, when is needed, we just use the stored torsos on those shortcut edges to compute . From [3, 16], we only need shortcut edges, and thus we only need to store (instead of ) torsos.
2.3 Patch Sets
Next, we introduce how our oracle can achieve optimal query time instead of as in [21] with storing some additional information about patch sets. As standard local search in [21] still has query time even in -unbreakable graphs, it would be good to assume is -unbreakable below while still capturing the hardness and our ideas.
We define a collection of patch sets as follows. Start from an arbitrary vertex , we perform BFS in from until a set with vertices are visited. We add to , delete from , and then repeat the procedure until there’s no connected component in with at least vertices. Finally, for each remaining component , we add into . We say is large if and small otherwise. A small patch set can only link to large patch sets.
We know that, for any failed vertex set with size at most , there exists at most one large component in with . We say a patch set is touched if , and untouched otherwise. For each vertex that’s in an touched patch , we do BFS from in . By visiting at most vertices in time, we either find all vertices connected with in , or certify . Since there are at most affected components, the total update time will be .
Then consider any vertex . If is in an affected patch set , we already know the component of . If is in an unaffected large patch , we also know . Otherwise, is in an unaffected small patch . By enumerating at most neighbors of , if is not a component itself, we will find some that’s in a large patch set and connected with . We can then compute the component of by . Therefore, given a query , we can check if they are in the same connected component using time.
3 Preliminaries
In this section we introduce and define most of the concepts and notations used in later sections. Many of the definitions and notations used by this paper will follow the convention set by [21].
3.1 Graphs
We will use the standard notion of graphs. Throughout this paper, we will only consider undirected graphs. For any graph , we use to denote its vertex set and to denote its edge set. Additionally, we use and to represent the size of the graph . WLOG we can assume by a sparsification in [20] with time. For any subset of vertices , we use to denote the subgraph of induced by , and we use to denote the graph after removing the set of vertices . We will often use the term BFS in as a short hand as breadth-first search in a graph .
3.2 Trees
A rooted tree is a connected acyclic graph with a distinguished root . For any node , we use to represent the parent of and to represent the set of children of . Let be two nodes, we say that is an ancestor of and is a descendant of if is on the unique path from to . Additionally, we say that is a strict ancestor of if is an ancestor of and . For a node , we let represent the subtree of rooted at that contains all descendants of . Also, for two nodes , we denote the least common ancestor of and by , and note that is an ancestor of if and only if . Suppose is a strict ancestor of , we define the -directed child of as the child of such that is on the - path. We denote such as .
3.3 Tree Decompositions
A tree decomposition of a graph is a pair where is a rooted tree with root and is a mapping that assigns every tree node a subset called a bag. Furthermore, the following two conditions must be satisfied.
-
1.
For every vertex , the set of nodes where induces a subtree of .
-
2.
For every edge , there exists a node such that .
For a node , we additionally define the following notions.
-
The adhesion of is .
-
The margin of is .
-
The cone at is the union of all where is a descendant of , denoted by .
-
The component at is .
The adhesion of a tree decomposition is defined as the size of the largest adhesion, which is .
Without loss of generality, we will assume that any tree decomposition we work with is regular, which satisfies the following conditions for every non-root node .
-
1.
The margin of is non-empty.
-
2.
The induced graph is connected.
-
3.
Every vertex has a neighbor .
The last two conditions would imply that for every pair of vertices and for any node , there must exist a - path such that every vertex along this path except are contained in .
3.4 Unbreakable Decompositions
A separation in a graph is two subsets of vertices where such that after removing its separator from , there will be no edge between the vertices in and in . The order of a separation is the size of its separator. For a subset , we say that is -unbreakable in if for every separation of order at most , we either have or .
A -unbreakable decomposition of a graph is a tree decomposition where for every node , is -unbreakable in . Additionally, we say that is strongly -unbreakable if every is -unbreakable in . We will use the following theorem to compute an unbreakable decomposition in this paper.
Theorem 4 ([13]).
Given a graph , there is a deterministic algorithm that computes a strongly -unbreakable decomposition with adhesion and height in time.
3.5 Bag Graphs
Let be a regular tree decomposition of a graph . For any node , we define its bag graph in the following way, denoted by . We start by initializing to be the subgraph , and we call the edges in this graph normal. Next, for each , we add a copy of the edge for every pair of vertices in . We call these edges adhesion edges supported by , and they would be labeled as such. Note that we allow multiple edges between some pair of supported by different children of , which means that is in fact a multigraph.
We claim that the total size of all bag graphs is linear to the total size of as in the lemma below. We include the proof in full version [17] for completeness.
Lemma 5.
Let be a regular tree decomposition of of adhesion . Then we have the following.
-
1.
.
-
2.
.
3.6 Restricted Bag Graphs
For a regular tree decomposition of , a tree node , and a subset , we define the -restricted bag graph of , which is denoted by and obtained in the following way. We start with , and for each child of , we consider all adhesion edges supported by . We remove a -supported adhesion edge from if and only if there does not exist a - path in . We obtain after considering all adhesion edges. Note that as is regular.
We now consider some vital properties of restricted bag graphs in unbreakable decompositions, captured in the following lemma. We include the proof in full version [17] for completeness.
Lemma 6.
Let be a strongly -unbreakable decomposition of that is regular. Let and where , then the following properties must hold.
-
1.
For any , they are connected in if and only if they are connected in .
-
2.
Suppose is a connected component in where . Let be the connected components in , then we have .
3.7 Vertex-Failure Connectivity Oracle
We introduce an existing vertex-failure connectivity oracle presented in [14] that we will utilize in the preprocessing phase, summarized in the following theorem.
Theorem 7 ([14]).
There is a deterministic vertex-failure connectivity oracle that uses space, preprocessing time, update time, and query time.
3.8 Shortcutting of Trees
We now consider adding shortcuts to a tree. Formally, given a tree , we want to add a small number of additional edges to such that for any nodes where is an ancestor of , one can reach from via non-reversing edges where is a constant. The non-reversing edges mean that every edge taken from to reach travels towards the root. This is called a shortcutting of the tree with hop-diameter . From [3, 16] we know that a good shortcutting can be computed efficiently on paths and trees. Explicitly, we can utilize the following theorem.
4 Preparing the Connectivity Oracle
In this section we prove the space and preprocessing time of Theorem 2. We start by constructing a strongly -unbreakable decomposition of with adhesion at most and is regular using Theorem 4. The construction takes time .
Next, we need a structure that, given any two tree nodes , answers and queries in constant time. We use the following lemma given in [21], which relies on the data structure for lca queries presented in [8].
Lemma 9.
Given a tree , one can compute in time a data structure that may answer the and queries in time.
4.1 Torsos and Profiles
We now design data structures that allow quick evaluations of the connectivity between vertices in the adhesions of tree nodes that speed up update and query times.
First, we introduce the notion of torsos. For any where is a strict ancestor of , we define the torso graph between and , denoted by , in the following way. The vertex set of is . Any two vertices are adjacent if and only if there exists a - path in whose interior is disjoint from . Note that any torso graph consists of at most vertices.
We often need torsos in the update and query phases. To do this quickly, we need a data structure that answers torso queries in constant time. We first show that we can compute all torsos quickly, by applying Theorem 7.
Claim 10.
One can compute in time for all where is a strict ancestor of .
The claim enables fast preprocessing time of our oracle. The proof of the above claim appears in the full version [17]. Next, we design a structure that outputs torsos in constant time upon queries.
Lemma 11.
There is a data structure that uses space, initializes in time, and answers the query in time: given where is a strict ancestor of , outputs a pointer to the graph .
Proof.
Each has at most vertices so storing it takes space. Let be the set of all possible graphs on vertices, then , and we can store using space. We use Claim 10 to compute all possible torsos. For each computed we keep a pointer to where for now.
Consider constructing a shortcutting of using edges with hop-diameter by calling Theorem 8. We aim to only store a pointer to for any where the edge is in the shortcutting. This implies that we only need to store pointers of size . To achieve constant time query, we build and store a two dimensional look-up table indexed by pairs of torsos. For each computed and , we store the pointer to in the entry where . Then this table has at most entries. Given any torso query where is a strict ancestor of , suppose is the - path in the shortcutting of , so . We can obtain by looking up , and then we can obtain by looking up . Thus we can get by repeating this step times along the path. Each look-up step takes constant time, so obtaining takes time.
Therefore, the structure uses space to store all possible torsos, the table , and the pointers. The initialization time is dominated by computing all torsos, which is , and torso queries can be answered in time, finishing the proof.
Next we introduce profiles, which maintain the connectivity of an adhesion within its subtree. For a node , we define the profile of , denoted by , which is a graph on the vertex set . Two vertices are adjacent if and only if they are connected in where is the set of failed vertices. Note that by this definition every connected component in each profile must be a clique as connectivity is transitive. As profiles are dependent on the set of failed vertices, we do not build profiles directly in this section, but they will be constructed and used extensively in the update and query phases. In this section, we design the following data structure to compute profiles quickly from existing profiles and torsos.
Lemma 12.
There is a data structure that uses space, initializes in time , and answers the query in time: given and , where is a strict ancestor of and is disjoint from , output the following.
-
1.
The graph .
-
2.
A coloring where if and only if are connected in .
-
3.
A inverse coloring such that where is an arbitrary vertex with .
Proof.
First note that for any , so . There are possible graphs on vertices, we compute and store them explicitly in time and space. Recall that each torso has at most vertices, so storing all possible torsos take time and space.
Let be the set of all torsos and profiles. Next, we construct a 2-dimensional look-up table , indexed by torsos and profiles. For each and we compute entry be in the following way. Construct graph on the vertex set and the edge set . Then, perform BFS over to identify its connected components. We construct the graph on vertex set , and each pair of vertices in this vertex set are adjacent if and only if they are in the same connected component in . We assign an arbitrary coloring such that only vertices in the same connected component in have the same color. For each color used, we assign where is an arbitrary vertex such that (or if such does not exist). Finally we set the entry .
It is clear that computing one entry takes time. Suppose that on a valid query and we have the entry . By construction, has vertex set exactly , and two vertices are adjacent if and only if they are connected in , thus . The coloring col and inverse coloring invcol are also correct by the same argument.
has entries, each storing a graph of at most vertices that takes time to compute along with a coloring and inverse coloring linear in its size. Thus, constructing the table takes time and space. On query and , the structure outputs by looking up the table in constant time. This completes the proof.
4.2 Patch Sets, Processed Bag Graphs, and Neighbor Sets
To maintain and determine connectivity in update and query, the data structure relies heavily on bag graphs. More specifically, for every node , we store a version of that is preprocessed, along with the patch set of , denoted by . Each contain patches, where a patch is simply a subset of vertices. We add patches to in the following way. Start by choosing an arbitrary vertex and perform BFS in starting from until vertices, including , are visited. Let be a set that contains exactly these visited vertices, remove from , include in , and repeat this process in . This is repeated until in there is no connected component of size at least . Finally, for any remaining connected component , we include as one patch in .
We say a patch is big if , and we say that it is small otherwise. Moreover, we call two patches adjacent to each other if and only if there exist some and such that and are adjacent in . From the construction process, the following structural claim is clear.
Claim 13.
For any and its computed , the following properties must hold.
-
1.
All patches in are disjoint, and .
-
2.
Any small patch can only be adjacent to big patches.
We then proceed with a simple processing of bag graphs. For each vertex , store in a pointer along with that points to , where is the patch such that .
Along side this, we also store some neighbor sets of the patches. Let be the set of at most vertices where and there exists a normal edge in such that (if there are more than such , choosing an arbitrary subset of of them suffices). We call the set of normal neighbors of .
Moreover, for any patch , let be the set of neighbors such that there is an adhesion edge in where and . We call this the set of adhesion neighbors of . Each set stores at most such vertices, and we implement it as a doubly-linked list such that deletion can be done in constant time. We store along with each vertex a counter indicating the number of adhesion edges where .
Now, suppose are all the small patches. We store with each the set and . Furthermore, we claim that we can compute and store all patch sets, processed bag graphs, and neighbor sets of small patches in time and space linear to the size of .
Lemma 14.
One can in time and space compute and store the following.
-
1.
For every , the patch set and the processed .
-
2.
For every and each small patch , the neighbor sets and .
Proof.
Recall from Lemma 5 that in the total size of all bags is at most and the total size of all bag graphs is at most . From Claim 13 we know that for a all patches are disjoint and cover , thus , so the total space to store all patch sets would be the same as the total size of all bags, which is . We compute by performing BFS procedures in such that each edge is visited only once, so the total time required to computed all patch sets would be . Moreover, when processing each , we only add one pointer for each vertex, so the space to store all processed bag graphs would still be . This process can be done while we are computing patch sets.
In each there can be at most small patches. For each small patch , at most vertices can be in . Hence storing all normal neighbor sets across all patch sets would require at most space. To compute , we visit neighbors of each if able, and for each neighbor of , we include it in if it is not already included and . We stop early when . This guarantees that if has at most neighbors, all of them would be in , and otherwise would contain arbitrary neighbors of . This takes time for each small patch , so in total across all patch sets this takes time.
For each , we next check each adhesion edge in . Let be the patches that contain respectively. If , we discard this edge and continue to the next one. Otherwise, we add to and to , incrementing the counters accordingly. We do not add an edge to a set if it already contains vertices. There are at most adhesion edges in since each child of supports at most adhesion edges. Thus the total number of adhesion edges for in bag graphs is , and we can compute all outgoing adhesion edge sets with time and space.
Combining all of these, the total time required is while the total space usage is , which proves the lemma.
4.3 Auxiliary Structure for Single-Child Failure
In this section we consider the special case of single-child failure. Suppose is the set of failed vertices, for a node , we say that it is in the case of single-child failure if is disjoint from and there is exactly one such that . We call such the single affected child of . To speed up query time, we need time access to some vital information about for nodes that are in this case, formally captured in the following lemma.
Lemma 15.
There is a data structure that uses space, initializes in time, and answers the query in time: given a node in the case of single-child failure, with being its single affected child, and a vertex , output the following.
-
1.
Let be the unique connected component in where , the set .
-
2.
The set of vertices where each is not in and is connected to some , with a coloring such that for any if and only if they are connected in .
-
3.
A label indicating whether .
The proof of this lemma is included in the full version [17]. At this moment we will assume the correctness of this lemma, and we can think of it intuitively as a look-up table that stores all queried information and takes time to check the entries.
4.4 Data Structures
With all necessary supporting structures in place, we can describe the data structure used to prove Theorem 2, which consists of the following parts.
-
1.
The unbreakable decomposition computed using Theorem 4. Each node also stores its depth in . Additionally, each vertex contains a pointer that points to the unique tree node where .
-
2.
The data structure for lca and dir queries of Lemma 9.
- 3.
-
4.
For each node , the patch set , processed bag graph , and additionally for each patch , its neighbor set . These are computed using Lemma 14.
-
5.
The auxiliary data structure for the case of single-child failure given by Lemma 15.
We now analyze the total space usage and processing time of this data structure. It is clear that all structures use space linear in except 3(a), which uses space. Also, structure 5 uses space that is linear in but exponential in . Thus their total space usage would be . The total preprocessing time is dominated by computing the unbreakable decomposition and initializing structure 3(a), which would be in total444Recall we assume from [20]. If , we actually take an extra time in sparsification.. Hence this proves the guarantees in Theorem 2.
5 Update and Query Algorithms
In this section we prove the update and query time in Theorem 2 using the data structure defined and preprocessed in Section 4. Recall that in the update phase we are given a set of failed vertices where and we update the data structure accordingly, and in the query phase we are given a pair of vertices and answer whether they are connected in . Note that there can be an update followed by multiple queries. Let us begin by describing the update algorithm.
5.1 The Update Phase
Suppose we are given , we first label all as “failed” in without deleting them or their incident edges. We then compute the set of all nodes that satisfy . This can be computed in time by including in for each by checking its pointer, where is the unique node such that . Let be the root of , if , we also include in . Note that . Additionally, let be the lowest common ancestor closure of , so . We can compute in time by computing using Lemma 9 and including it in for every pair of nodes .
We say that a node is important if . Furthermore, we call a node affected if , otherwise we call it unaffected. We begin by providing a algorithm that allows us to determine connectivity between a subset of vertices of within quickly for any important node .
Lemma 16.
For a node , given and a subset of vertices , we can compute the graph in time , where two vertices are adjacent in if and only if they are connected in .
Proof.
From Lemma 6 we know that two vertices are connected in if and only if they are connected in , and that there exists a unique connected component in with . Then we build the edge set of as follows. We perform BFS in starting from each until vertices are reached, avoiding failed vertices. We add an edge in for every reached by where . If more than vertices are reached, must be in , and we mark it as such. After this step has been repeated for all vertices in , we add edges between all pairs of where both and have been marked that they are in .
It is clear from the construction of that any two vertices are adjacent in if and only if they are connected in and thus in . Each -step BFS takes time, so processing all vertices in takes time, completing the proof of this lemma.
Recall the definition of profiles, the next step is to compute for all .
5.1.1 Computing Important Profiles
We will compute these profiles in a bottom-up manner. We first focus on a general node . Suppose is the set of all affected children of . The following claim describes how is computed given the profiles of all nodes in .
Claim 17.
Let be a node. Given the set and for all , one can compute and in time .
Proof.
First note that as there are at most vertices in and the components of all affected children are pairwise disjoint. We will build by removing edges from . By the definition of , only adhesion edges supported by the affected children need to be considered for deletion as is disjoint from the components of children in . For every , consider all adhesion edges supported by . Recall that any such edge is not deleted in if and only if and are connected in . Note that this is also exactly the definition of the edge set of , which is provided. Thus for each such edge , we delete it if and only if is not in , which can be checked in constant time. Since each , there will be at most edges to consider, thus we can construct in time.
To build , we need to decide for every pair whether they are connected in or not. We use Lemma 16 to compute by giving as input the that we just computed and . Thus, we can obtain in time . Note that building both and take time in total, proving the claim.
Note that this lemma holds even when has no affected children since in this case .
Next, we need to compute the profiles of all affected children of in order to compute . The next lemma shows how is computed for any non-important from the important profiles in its subtree.
Claim 18.
Let be an affected child of and suppose , given for all that are contained in the subtree , one can compute in time .
Proof.
Let be the topmost important node in the subtree of rooted at . It can be computed in time by considering every and choosing the node with the smallest depth such that . Note that is disjoint from because otherwise there must be an important node and will also be in and have a smaller depth than . Since we have and can get in constant time from Lemma 11, we can use Lemma 12 to compute in constant time in this situation. This completes the proof.
With these tools, we can proceed with computing all important profiles.
Lemma 19.
Given the set of important nodes , one can in time compute for all .
Proof.
We begin by constructing the tree where . For any two nodes , is the parent of in if and only if it is a strict ancestor of and the - path in is disjoint from . Note that one can compute in time using lca queries on . Then, for each leaf node in , we can compute using Claim 17 by setting as must have no affected children.
Next, for any non-leaf node , we compute the set of its affected children in by checking every , and we include in if . Note that this takes time for all . With this, we can build all important profiles bottom-up by repeating the following process until all of them are computed. First, use Claim 18 to compute the profiles of all affected children where the profile of every node in is computed, then use Claim 17 to compute any whose affected children profiles have all been computed.
There are important profiles to compute, so Claim 17 is called times, taking total time . Each affected child is computed from a unique important profile and the torso between them, so Claim 18 is called times, which take total time . Therefore, computing all important profiles takes time, completing the proof.
Note that in the process of computing all important profiles, for each , all profiles of its affected children are also computed.
5.1.2 Computing Adhesion Connectivity Graphs
We now design a structure that keeps track of the connectivity between the profile of any important node and the profiles of its affected children within its restricted bag graph. Formally, for any with the set of its affected children , we define the adhesion connectivity graph, denoted by , as the graph on the vertex set where two vertices are adjacent if and only if they are connected in . We compute these along with some coloring that preserves connectivity information as follows.
Lemma 20.
Given and , one can compute the following for all in time .
-
1.
The graph .
-
2.
A coloring where if and only if are connected in .
-
3.
A inverse coloring such that where with .
Proof.
We first consider computing for a specific . Suppose is the set of its affected children. Note that and all adhesions have at most vertices, so . By its definition, we can use Lemma 16 to compute , giving as input and , in . Then, we perform BFS in in time to identify its connected components, and assign an arbitrary coloring where only vertices in the same connected components in have the same color. For each used color , we assign by choosing an arbitrary with , or assign if no such exist.
It is clear that computing with its coloring col and inverse coloring invcol takes time for each . There are at most important nodes, so computing these for all takes time. This completes the proof.
5.1.3 Precomputing Connectivity Within Bag Graphs
To achieve fast query time, we precompute some vital connectivity information with regard to the patch set of , for every node where is computed. Note that can either be an important node or an affected children of some important node. For any such , we say a patch is touched if it either contains some vertex , or it contains both for some adhesion edge that is deleted during construction of . Let be the set of all touched patches in .
Suppose is the set of affected children of . For every affected child , the set of all -supported adhesion edges form a clique in on at most vertices and edges. Note that only at most of these edges are vertex disjoint, so at most patches can be touched due to these -supported adhesion edges. Thus we have as and there can be at most disjoint patches touched due to adhesion edge deletions.
Additionally, for each small patch , we need to update the set of adhesion neighbors for each small patch due to the adhesion edge deletions in . We need to compute and update for all small patches before proceeding to the next step.
Claim 21.
For a node , given , one can in time compute the set of affected patches and update the set for each small patch .
Proof.
We have and for all where is the set of its affected children since . We first check all vertices . For any , we identify the patch where by looking at its stored pointer and include it in . Then we compute the set of deleted adhesion edges by comparing for each the set of -supported adhesion edges in and . For any deleted adhesion edge , we check if they are in the same patch by comparing their pointers, and we include if . It is clear that computing take time as there are at most deleted adhesion edges.
We now update for each small path . For any deleted adhesion edge in , we consider the patches and are in. Let be the patches containing respectively, we discard this adhesion edge if . Otherwise, if is a small patch, we decrement the counter of if , and delete it from if the counter reaches zero. We do the same for if it is small. We can compute this in time as there can be at most deleted adhesion edges in . We then finish the proof.
Next, we precompute and store for each vertex in a touched patch whether it is in the unique connected component in that has size more than . If not, we label the vertex with the connected component it is in, formally stated in the following lemma.
Lemma 22.
For a node , given , one can compute and label every vertex for each patch whether it is in the single connected component in where in time. Moreover, let be the set of all vertices reachable from in , one can compute a coloring such that for each if and only if they are connected in in the same time.
Proof.
Recall that each patch has size at most , then the total number of vertices in touched patches is . We first call Lemma 16 with and to obtain in time . For each vertex that has been marked as in when computing , we also label it as such in .
Note that by Lemma 6 since and are disjoint by definition. We can compute and its coloring col as follows. For each vertex , let be an arbitrary unused color in if is not already colored, and perform BFS in starting from to visit all vertices reachable from . For each vertex reached from , let . Repeating this step for all vertices in takes time as by definition no vertex outside of can be reached. Thus the proof is complete.
5.1.4 Complete the Update Process
Now we have finished every step in the update algorithm, let us summarize the complete update process below.
-
1.
Given the set of failed vertices where , compute the set of important nodes in time.
-
2.
Compute for all using Lemma 19. The profiles of all affected children of every are also computed in this process.
-
3.
Compute along with its coloring and inverse coloring for all using Lemma 20.
-
4.
Precompute bag graph connectivity information for every node where is computed by repeating Lemma 22.
5.2 The Query Phase
Finally, we describe the algorithm this data structure uses to answer queries. Suppose we are given a query where we need to answer whether and are connected in . If either or , we simply output “not connected”, so let us assume that for the rest of this section.
We will repeat the same process for and , then combine them at the end to answer the query, so for now let us focus on . The goal is to lift up to the root and compute their connectivity in . The procedure is split into cases depending on the position of , and we will start with the simple case of when is already included in some precomputed profile.
In general, we will consider four cases for (and samely, for ) as below. In each case, we can finally compute and check the connectivity. The complete case analysis can be found in the full version [17].
-
Case 1: is in a profile computed during update.
-
Case 2: .
-
Case 3: and is affected.
-
Case 4: and is unaffected.
Given the query , we first identify where using their stored pointers. Starting with , we first decide if . If so, we proceed to Case 2. Otherwise, we decide between Case 3 and Case 4 by checking if there exists an important node where in time. We proceed to Case 3 if such exists as must be affected, and we move to Case 4 otherwise. The same process is repeated for . After all steps are done, we check , which contains exactly since . One can easily verify by the proofs in each step that is a valid profile, thus and are connected in if and only if they are connected in . We finally output “connected” if are connected in , and output “not connected” otherwise.
Since each step takes time, one can answer the query on any in time. This proves the update time guarantee of Theorem 2 and thus completes the proof of the entire theorem.
6 Discussions and Open Problems
The ideal bounds for a -vertex-failure connectivity oracle are
Long et al. [18, 19] achieve all four bounds simultaneously up to factors. Moreover, each of these bounds is separately conditionally optimal under standard hypotheses [9, 18]. Thus, the main remaining frontier is to remove the dependence on from the update and query times while keeping near-linear preprocessing and space.
Our oracle makes progress on this frontier. It has near-linear preprocessing, uses space, and supports updates and queries in small time. Currently, the two known approaches to -independent update and query times are the algebraic approach of [22] and the unbreakable-decomposition approach of [21]. The following challenges highlight what seems to require new techniques.
-
1.
Near-linear space and preprocessing without exponential -dependence.The algebraic approach uses space, while current unbreakable-decomposition based oracles incur exponential dependence on in the preprocessing. Can one obtain
together with update and query time?
-
2.
Optimal -dependence for updates and queries. All known -independent oracles have update time at least or a larger polynomial in . Can one achieve the conditionally optimal update time ? More ambitiously, can this be achieved simultaneously with the conditionally optimal query time ?
-
3.
Exactly linear space in . Our shortcutting scheme reduces the space to , but still leaves the tiny factor. This factor appears tied to the constant-hop tree shortcutting used by our method; see the shortcutting lower bounds in [2]. Pilipczuk et al. [21] achieve space, but with large polynomial preprocessing time and update and query time. Can one obtain
Such a result would likely require a way to bypass our shortcut-based technique.
References
- [1] Koustav Bhanja and Asaf Petruschka. Near-optimal vertex fault-tolerant labels for steiner connectivity. In Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman, editors, 33rd Annual European Symposium on Algorithms, ESA 2025, Warsaw, Poland, September 15-17, 2025, volume 351 of LIPIcs, pages 44:1–44:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.44.
- [2] Arnab Bhattacharyya, Elena Grigorescu, Kyomin Jung, Sofya Raskhodnikova, and David P Woodruff. Transitive-closure spanners. SIAM Journal on Computing, 41(6):1380–1425, 2012. doi:10.1137/110826655.
- [3] Hans L. Bodlaender, Gerard Tel, and Nicola Santoro. Trade-offs in non-reversing diameter. Nord. J. Comput., 1(1):111–134, 1994.
- [4] Ran Duan and Seth Pettie. Connectivity oracles for failure prone graphs. In Leonard J. Schulman, editor, Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, Cambridge, Massachusetts, USA, 5-8 June 2010, pages 465–474. ACM, 2010. doi:10.1145/1806689.1806754.
- [5] Ran Duan and Seth Pettie. Connectivity oracles for graphs subject to vertex failures. SIAM J. Comput., 49(6):1363–1396, 2020. doi:10.1137/17M1146610.
- [6] Daniele Frigioni and Giuseppe F. Italiano. Dynamically switching vertices in planar graphs. Algorithmica, 28(1):76–103, 2000. doi:10.1007/s004530010032.
- [7] Carsten Gutwenger and Petra Mutzel. A linear time implementation of spqr-trees. In Joe Marks, editor, Graph Drawing, 8th International Symposium, GD 2000, Colonial Williamsburg, VA, USA, September 20-23, 2000, Proceedings, volume 1984 of Lecture Notes in Computer Science, pages 77–90. Springer, Springer, 2000. doi:10.1007/3-540-44541-2_8.
- [8] Dov Harel and Robert Endre Tarjan. Fast algorithms for finding nearest common ancestors. SIAM J. Comput., 13(2):338–355, 1984. doi:10.1137/0213024.
- [9] Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Rocco A. Servedio and Ronitt Rubinfeld, editors, Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, June 14-17, 2015, pages 21–30. ACM, 2015. doi:10.1145/2746539.2746609.
- [10] John E. Hopcroft and Robert Endre Tarjan. Dividing a graph into triconnected components. SIAM J. Comput., 2(3):135–158, 1973. doi:10.1137/0202012.
- [11] Kevin Hua, Daniel Li, Jaewoo Park, and Thatchaphol Saranurak. Finding most-shattering minimum vertex cuts of polylogarithmic size in near-linear time. In Karl Bringmann, Martin Grohe, Gabriele Puppis, and Ola Svensson, editors, 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, Tallinn, Estonia, July 8-12, 2024, volume 297 of LIPIcs, pages 87:1–87:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICALP.2024.87.
- [12] Yonggang Jiang, Merav Parter, and Asaf Petruschka. New oracles and labeling schemes for vertex cut queries. In Kasper Green Larsen and Barna Saha, editors, Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026, Vancouver, BC, Canada, January 11-14, 2026, pages 2760–2791. SIAM, SIAM, 2026. doi:10.1137/1.9781611978971.102.
- [13] Tuukka Korhonen. Linear-time algorithms for k-edge-connected components, k-lean tree decompositions, and more. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, Prague, Czechia, June 23-27, 2025, pages 111–119. ACM, 2025. doi:10.1145/3717823.3718123.
- [14] Evangelos Kosinas. Connectivity queries under vertex failures: Not optimal, but practical. In Inge Li Gørtz, Martin Farach-Colton, Simon J. Puglisi, and Grzegorz Herman, editors, 31st Annual European Symposium on Algorithms, ESA 2023, Amsterdam, The Netherlands, September 4-6, 2023, volume 274 of LIPIcs, pages 75:1–75:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ESA.2023.75.
- [15] Evangelos Kosinas. An optimal 3-fault-tolerant connectivity oracle. In Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele Puppis, editors, 52nd International Colloquium on Automata, Languages, and Programming, ICALP 2025, Aarhus, Denmark, July 8-11, 2025, volume 334 of LIPIcs, pages 110:1–110:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ICALP.2025.110.
- [16] Hung Le, Lazar Milenkovic, Shay Solomon, and Cuong Than. Tree-like shortcuttings of trees. CoRR, abs/2510.14918, 2025. doi:10.48550/arXiv.2510.14918.
- [17] Xizhe Li, Yaowei Long, David Pidugu, Thatchaphol Saranurak, and Benyu Wang. Connectivity oracle under vertex failures by shortcutting unbreakable decomposition. CoRR, abs/2605.07168, 2026. doi:10.48550/arXiv.2605.07168.
- [18] Yaowei Long and Thatchaphol Saranurak. Near-optimal deterministic vertex-failure connectivity oracles. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pages 1002–1010. IEEE, 2022. doi:10.1109/FOCS54457.2022.00098.
- [19] Yaowei Long and Yunfan Wang. Better decremental and fully dynamic sensitivity oracles for subgraph connectivity. In Karl Bringmann, Martin Grohe, Gabriele Puppis, and Ola Svensson, editors, 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, Tallinn, Estonia, July 8-12, 2024, volume 297 of LIPIcs, pages 109:1–109:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICALP.2024.109.
- [20] Hiroshi Nagamochi and Toshihide Ibaraki. Computing edge-connectivity in multigraphs and capacitated graphs. SIAM Journal on Discrete Mathematics, 5(1):54–66, 1992. doi:10.1137/0405004.
- [21] Michal Pilipczuk, Nicole Schirrmacher, Sebastian Siebertz, Szymon Torunczyk, and Alexandre Vigny. Algorithms and data structures for first-order logic with connectivity under vertex failures. In Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, Paris, France, July 4-8, 2022, volume 229 of LIPIcs, pages 102:1–102:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.102.
- [22] Jan van den Brand and Thatchaphol Saranurak. Sensitive distance and reachability oracles for large batch updates. In David Zuckerman, editor, 60th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2019, Baltimore, Maryland, USA, November 9-12, 2019, pages 424–435. IEEE, IEEE Computer Society, 2019. doi:10.1109/FOCS.2019.00034.
