Abstract 1 Introduction 2 Overview 3 Preliminaries 4 Preparing the Connectivity Oracle 5 Update and Query Algorithms 6 Discussions and Open Problems References

Connectivity Oracle Under Vertex Failures by Shortcutting Unbreakable Decomposition

Xizhe Li ORCID University of Michigan, Ann Arbor, MI, USA    Yaowei Long ORCID University of Michigan, Ann Arbor, MI, USA    David Pidugu University of Michigan, Ann Arbor, MI, USA    Thatchaphol Saranurak ORCID University of Michigan, Ann Arbor, MI, USA    Benyu Wang ORCID University of Michigan, Ann Arbor, MI, USA
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 O(k6) time and answers query in O(k) time, while using 2O(k2)n+O(k2nαc(n)) space and kO(k2)n+O(m+k3nlog2n+k6nlogn) preprocessing time.

Although some previous works achieve k2no(1) update time and O(k) query time [18, 19], the update time is still n-dependent, while oracles that have n-independent update and query times [21, 22] cannot achieve optimal O(k) query time [9] and often have Ω(n2) space and processing time. Our solution would be the first vertex-failure connectivity oracle that achieves O(k) query time with update time completely independent of n, while improving space usage and having competitive preprocessing time.

Keywords and phrases:
Graphs, Fault tolerant, Oracles
Category:
Track A: Algorithms, Complexity and Games
Funding:
Thatchaphol Saranurak: Supported by NSF Grant CCF-2238138 and a Sloan Fellowship.
Copyright and License:
[Uncaptioned image] © Xizhe Li, Yaowei Long, David Pidugu, Thatchaphol Saranurak, and Benyu Wang; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Data structures design and analysis
Related Version:
Full Version: https://arxiv.org/abs/2605.07168 [17]
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

We study connectivity oracles under vertex failures. Given an undirected graph G, the goal is to preprocess G so that after a batch of at most k vertices fails, we can quickly answer connectivity queries in the remaining graph GS. 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 k is a small constant in practice while the underlying graph is massive. In this setting, even a polylog(n) overhead per batch can dominate; this motivates designing oracles whose update and query costs depend only on k (i.e., are independent of n).

1.1 The Connectivity Oracle Problem

The oracle supports three phases:

  • Preprocess: Given G=(V,E) with |V|=n, |E|=m, and a parameter k, 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 SV with |S|k, update the data structure in update time.

  • Query: Given u,vV, decide whether u and v are connected in GS in query time.

Typically, one update (for a batch S) 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 k2 failures using O(n) space, O(m) preprocessing, and O(1) update and query time. Very recently, Kosinas [15] extended this optimal oracle to k=3.

For general k, 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 no(1) factors under fine-grained complexity hypotheses: O(min{m,nk}logn) space, m1+o(1)+O~(mk) preprocessing time111Throughout the paper, we use O~() to hide polylog factors., O(k2no(1)) update time, and O(k) query time. Long and Wang [19] later improved the no(1) factor in the update time to polylogarithmic. Although this landscape is essentially settled when mild n-dependence is allowed, these results share a common drawback: their update time still contains an n-dependent term (subpolynomial or polylogarithmic).

Existing results essentially fall into two camps. On the one hand, we have near-linear-space oracles with excellent k-dependence, but their update time still depends on n. On the other hand, only two known approaches achieve update and query times depending solely on k:

  • The randomized oracle of van den Brand and Saranurak [22] uses algebraic techniques to obtain O(kω) update time and O(k2) query time (where ω is the matrix multiplication exponent), but requires O(n2) space and O(nω) preprocessing time.

  • The deterministic approach of Pilipczuk et al. [21] is based on unbreakable decomposition. It achieves n-independent update time, but their oracle with linear space comes with doubly exponential dependence on k (and very large preprocessing). They also obtained an alternative oracle with poly(k) update and query time, but it is strictly worse than the oracle by [22] except being deterministic.

Thus, prior n-independent oracles either use Ω(n2) space or incur doubly exponential dependency on k. 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 n (with only a poly(k) factor) and purely poly(k) update and query time, independent of n. Moreover, our preprocessing time is near-linear when k=O(1).

Theorem 1 (near-linear space, n-independent update/query).

There exists a deterministic vertex-failure connectivity oracle that uses O(k2nαc(n)) space, kO(k2)n+O(m+k3nlog2n+k6nlogn) preprocessing time, O(k4) update time, and O(k3) query time.

Here αc(n) denotes the extremely slowly growing inverse Ackermann function for any fixed constant c. For constant k, the space and preprocessing are near-linear, while update and query are constant-time.

The ideal dependence on k would be O(k2) update time and O(k) query time: this would be both n-independent and conditionally optimal under fine-grained conjectures [9, 18]. We take a step toward this frontier by showing that optimal O(k) query time is achievable with purely k-dependent update time, via a tradeoff that allows an additional 2O(k2)n term in space (while keeping preprocessing near-linear for constant k).

Theorem 2 (Optimal query time via extra space).

There exists a deterministic vertex-failure connectivity oracle that uses 2O(k2)n+O(k2nαc(n)) space, kO(k2)n+O(m+k3nlog2n+k6nlogn) preprocessing time, O(k6) update time, and O(k) query time.

The O(k) query time in Theorem 2 is conditionally optimal [9]. Table 1 summarizes known vertex-failure connectivity oracles whose update times are independent of n and compares them with our results.

Table 1: Complexities of known vertex-failure connectivity oracles whose update times are independent of n. We use O~() to hide polylog(n) factors. Here 2ω<3 is the matrix multiplication exponent, and αc(n) is the inverse Ackermann function (for any constant c).
Det./Rand. Space Preprocessing Update Query
Kosinas
(k3 only)
[15]
Det. O(n) O(m) O(1) O(1)
Brand & Saranurak
[22]
Rand. O(n2) O(nω) O(kω) O(k2)
Pilipczuk et al.
[21]
Det. n22O(k) mn222O(k) 22O(k) 22O(k)
Det. n2poly(k) poly(n) 2O(klogk) poly(k) poly(k)
This Paper
Det. O(k2nαc(n)) kO(k2)n+O~(km+k6n) O(k4) O(k3)
Det. 2O(k2)n+O(k2nαc(n)) kO(k2)n+O~(km+k6n) O(k6) O(k)

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 n-independent query time for vertex-cut oracles (the current vertex-cut oracles [12, 15] all have their query times depending on n). For example, by plugging in our new n-independent connectivity oracle, it gives the following new vertex-cut oracle.

Theorem 3.

There exists a deterministic vertex-cut oracle that uses O(k2nαc(n)) space, kO(k2)n+O(m+k3nlog2n+k6nlogn) preprocessing time, and O(k4+2kk2) 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 k-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 O(logn) overhead on the query time), and therefore cannot yield reasonable trade-offs with n-independent query time.

1.5 Techniques

We improve upon the oracle of [21] with Ω(n2) 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 n-independent-update oracle using n-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

Section 2 gives a high-level explanation of our results. Section 3 introduces preliminaries and tools. Section 4 describes the preprocessing and data structure. Section 5 gives the update and query algorithms and proves Theorem 2. Finally, Section 6 discusses open problems and future improvements.

Additional configurations and proof for Theorem 1 can be found in the full version [17]. The discussion about two closely related problems: the vertex-cut oracle and the Steiner vertex-cut oracle problem, with the formal statement of Theorem 3 also appear in the full version [17].

2 Overview

2.1 The Unbreakable Decomposition Framework

We start by introducing the framework inspired by [21] using unbreakable decomposition [13]. In a graph G, we say a set BV is (q,k)-unbreakable if for any subset SV(G) of at most k vertices, there can be at most one connected component C in GS such that |CB|>q while |BC|q. A (q,k)-unbreakable decomposition of a graph G is a tree decomposition 𝒯=(T,bag) where the bag associated with each tree node xV(T) is (q,k)-unbreakable in G. Additionally, we say that 𝒯 is strongly (q,k)-unbreakable if every bag(x) is (q,k)-unbreakable in the subgraph of G induced by the union of all bags in the subtree of T rooted at x. Throughout the paper, we will use a strongly (k,k)-unbreakable decomposition of adhesion k given by [13], thus in this paper we always assume q=k.

Given the set of at most k failed vertices S and for each uS, we first identify the topmost node xT where its bag contains u and call the node x important. Let X be the set of all important nodes and let Y be the least common ancestor closure of X in T, adding the root if it is not already included. Note that |X|k and |Y|O(k). For each xX, we aim to compute the profile of x, which is a graph on the adhesion of x where two vertices are adjacent if and only if they are connected in the subgraph of GS induced by the union of all bags in the subtree rooted at x. We build these profiles bottom-up, starting from the lowest nodes in Y 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 x,yV(T) where x is a strict ancestor of y, the graph torso(x,y) is on the adhesions of x and y. Two vertices in torso(x,y) are adjacent if and only if there exists a path between them in G whose interior lies entirely within the the induced subgraph on the union of all bags in the subtree rooted at x and stopping at y.

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 u,v, we first consider u and repeat the same process for v. We first augment u to the computed profile of its closest ancestor in Y while maintaining its connectivity invariants. Then we identify all important nodes along the path from u to the root, and working upward by augmenting u to each of their profiles until the root. After this is repeated for v, we can simply check the profile of the root to determine if u and v are connected in GS.

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 x,y,zV(T) where x is an ancestor of y and y is an ancestor of z in T, then torso(x,z) can be computed through torso(x,y) and torso(y,z) 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 T that when x is an ancestor of z, x can reach z through constant shortcut edges. Therefore, when torso(x,z) is needed, we just use the stored torsos on those shortcut edges to compute torso(x,z). From [3, 16], we only need nαc(n) shortcut edges, and thus we only need to store nαc(n) (instead of n2) torsos.

2.3 Patch Sets

Next, we introduce how our oracle can achieve O(k) optimal query time instead of poly(k) as in [21] with storing some additional information about patch sets. As standard local search in [21] still has O(k2) query time even in (q,k)-unbreakable graphs, it would be good to assume G is (q,k)-unbreakable below while still capturing the hardness and our ideas.

We define a collection 𝒫 of patch sets as follows. Start from an arbitrary vertex vV, we perform BFS in V from v until a set PV with (k+1) vertices are visited. We add P to 𝒫, delete P from V, and then repeat the procedure until there’s no connected component in V with at least (k+1) vertices. Finally, for each remaining component P, we add P into 𝒫. We say P𝒫 is large if |P|=k+1 and small otherwise. A small patch set can only link to large patch sets.

We know that, for any failed vertex set S with size at most k, there exists at most one large component C in GS with |C|>k. We say a patch set P𝒫 is touched if PS, and untouched otherwise. For each vertex v that’s in an touched patch P, we do BFS from v in GS. By visiting at most k+1 vertices in O(k2) time, we either find all vertices connected with v in GS, or certify vC. Since there are at most k affected components, the total update time will be O(kkk2)=O(k4).

Then consider any vertex uV. If u is in an affected patch set P, we already know the component of u. If u is in an unaffected large patch P, we also know uC. Otherwise, u is in an unaffected small patch P. By enumerating at most (k+1) neighbors of P, if P is not a component itself, we will find some u that’s in a large patch set and connected with P. We can then compute the component of u by u. Therefore, given a query u,v, we can check if they are in the same connected component using O(k) 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 G, we use V(G) to denote its vertex set and E(G) to denote its edge set. Additionally, we use n=|V(G)| and m=|E(G)| to represent the size of the graph G. WLOG we can assume m=O(nk) by a sparsification in [20] with O(m) time. For any subset of vertices SV(G), we use G[S] to denote the subgraph of G induced by S, and we use GS to denote the graph G after removing the set of vertices S. We will often use the term BFS in G as a short hand as breadth-first search in a graph G.

3.2 Trees

A rooted tree T is a connected acyclic graph with a distinguished root r. For any node xV(T), we use parent(x) to represent the parent of x and children(x) to represent the set of children of x. Let x,yV(T) be two nodes, we say that x is an ancestor of y and y is a descendant of x if x is on the unique path from y to r. Additionally, we say that x is a strict ancestor of y if x is an ancestor of y and xy. For a node xV(T), we let T(x) represent the subtree of T rooted at x that contains all descendants of x. Also, for two nodes x,yV(T), we denote the least common ancestor of x and y by lca(x,y), and note that x is an ancestor of y if and only if lca(x,y)=x. Suppose x is a strict ancestor of y, we define the y-directed child of x as the child z of x such that z is on the y-x path. We denote such z as dir(x,y).

3.3 Tree Decompositions

A tree decomposition of a graph G is a pair 𝒯=(T,bag) where T is a rooted tree with root rV(T) and bag:V(T)2V(G) is a mapping that assigns every tree node xV(T) a subset bag(x)V(G) called a bag. Furthermore, the following two conditions must be satisfied.

  1. 1.

    For every vertex vG, the set of nodes xT where vbag(x) induces a subtree of T.

  2. 2.

    For every edge (u,v)E(G), there exists a node xT such that u,vbag(x).

For a node xT, we additionally define the following notions.

  • The adhesion of x is adh(x)=bag(parent(x))bag(x).

  • The margin of x is mrg(x)=bag(x)adh(x).

  • The cone at x is the union of all bag(y) where y is a descendant of x, denoted by cone(x).

  • The component at x is comp(x)=cone(x)adh(x).

The adhesion of a tree decomposition 𝒯 is defined as the size of the largest adhesion, which is maxxV(T)|adh(x)|.

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 xV(T).

  1. 1.

    The margin of x is non-empty.

  2. 2.

    The induced graph G[comp(x)] is connected.

  3. 3.

    Every vertex uadh(x) has a neighbor vcomp(x).

The last two conditions would imply that for every pair of vertices u,vadh(x) and for any node x, there must exist a u-v path such that every vertex along this path except u,v are contained in comp(x).

3.4 Unbreakable Decompositions

A separation in a graph G is two subsets of vertices L,RV(G) where LR=V(G) such that after removing its separator LR from G, there will be no edge between the vertices in LR and RL in G(LR). The order of a separation is the size of its separator. For a subset XV(G), we say that X is (q,k)-unbreakable in G if for every separation (L,R) of order at most k, we either have |LX|q or |RX|q.

A (q,k)-unbreakable decomposition of a graph G is a tree decomposition 𝒯=(T,bag) where for every node xV(T), bag(x) is (q,k)-unbreakable in G. Additionally, we say that 𝒯 is strongly (q,k)-unbreakable if every bag(x) is (q,k)-unbreakable in G[cone(x)]. We will use the following theorem to compute an unbreakable decomposition in this paper.

Theorem 4 ([13]).

Given a graph G, there is a deterministic algorithm that computes a strongly (k,k)-unbreakable decomposition with adhesion k and height O(logn) in kO(k2)n+O(m) time.

3.5 Bag Graphs

Let 𝒯=(T,bag) be a regular tree decomposition of a graph G. For any node xV(T), we define its bag graph in the following way, denoted by bgraph(x). We start by initializing bgraph(x) to be the subgraph G[bag(x)], and we call the edges in this graph normal. Next, for each zchildren(x), we add a copy of the edge (u,v) for every pair of vertices u,vadh(z) in bgraph(x). We call these edges adhesion edges supported by z, and they would be labeled as such. Note that we allow multiple edges between some pair of u,vbag(x) supported by different children of x, which means that bgraph(x) is in fact a multigraph.

We claim that the total size of all bag graphs is linear to the total size of G as in the lemma below. We include the proof in full version [17] for completeness.

Lemma 5.

Let 𝒯=(T,bag) be a regular tree decomposition of G of adhesion q. Then we have the following.

  1. 1.

    xV(T)|V(bgraph(x))|O(qn).

  2. 2.

    xV(T)|E(bgraph(x))|O(m+q2n).

3.6 Restricted Bag Graphs

For a regular tree decomposition 𝒯=(T,bag) of G, a tree node x, and a subset SV(G), we define the S-restricted bag graph of x, which is denoted by bgraphS(x) and obtained in the following way. We start with bgraph(x), and for each child z of x, we consider all adhesion edges supported by z. We remove a z-supported adhesion edge (u,v) from bgraph(x) if and only if there does not exist a u-v path in G[cone(z)]S. We obtain bgraphS(x) after considering all adhesion edges. Note that bgraph(x)=bgraph(x) 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 𝒯=(T,bag) be a strongly (q,k)-unbreakable decomposition of G that is regular. Let xV(T) and SV(G) where |S|k, then the following properties must hold.

  1. 1.

    For any u,vbag(x), they are connected in G[cone(x)]S if and only if they are connected in bgraphS(x).

  2. 2.

    Suppose Cbag(x) is a connected component in bgraphS(x) where |C|>q. Let C1,,C be the connected components in bgraphS(x)C, then we have i=1|Ci|q.

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 O(kmlogn) space, O(kmlogn) preprocessing time, O(k4logn) update time, and O(k) query time.

3.8 Shortcutting of Trees

We now consider adding shortcuts to a tree. Formally, given a tree T, we want to add a small number of additional edges to T such that for any nodes x,yV(T) where x is an ancestor of y, one can reach x from y via h non-reversing edges where h is a constant. The non-reversing edges mean that every edge taken from y to reach x travels towards the root. This is called a shortcutting of the tree T with hop-diameter h. From [3, 16] we know that a good shortcutting can be computed efficiently on paths and trees. Explicitly, we can utilize the following theorem.

Theorem 8 ([16, 3]).

Every tree of n nodes admits a shortcutting with hop-diameter h that uses O(nαh/2+1(n)) edges, which can be constructed in time O(nαh/2+1(n)).

Although implicit in [16, 3], given any x,y, one can compute an h-hop path with shortcut edges in O(h) constant time. Note that here αc(n) means inverse Ackermann function as in [16]. For example, α2(n)=O(logn) and α4(n)=O(logn), and so on.

4 Preparing the Connectivity Oracle

In this section we prove the space and preprocessing time of Theorem 2. We start by constructing a strongly (k,k)-unbreakable decomposition 𝒯=(T,bag) of G with adhesion at most k and is regular using Theorem 4. The construction takes time kO(k2)n+O(m).

Next, we need a structure that, given any two tree nodes x,yV(T), answers lca(x,y) and dir(x,y) 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 T, one can compute in time O(|V(T)|) a data structure that may answer the lca(x,y) and dir(x,y) queries in O(1) 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 x,yV(T) where x is a strict ancestor of y, we define the torso graph between x and y, denoted by torso(x,y), in the following way. The vertex set of torso(x,y) is adh(x)adh(y). Any two vertices u,vV(torso(x,y)) are adjacent if and only if there exists a u-v path in G[cone(x)comp(y)] whose interior is disjoint from V(torso(x,y)). Note that any torso graph consists of at most 2k 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 O(k3nlog2n+k6nlogn) time torso(x,y) for all x,yV(T) where x is a strict ancestor of y.

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 2O(k2)+O(k2nαc(n)) space, initializes in O(k3nlog2n+k6nlogn) time, and answers the query in O(1) time: given x,yV(T) where x is a strict ancestor of y, outputs a pointer to the graph torso(x,y).

Proof.

Each torso(x,y) has at most 2k=O(k) vertices so storing it takes O(k2) space. Let St be the set of all possible graphs on 2k vertices, then |St|=2O(k2), and we can store St using O(k2)2O(k2) space. We use Claim 10 to compute all possible torsos. For each computed torso(x,y) we keep a pointer to GtSt where Gt=torso(x,y) for now.

Consider constructing a shortcutting of T using O(nαc(n)) edges with hop-diameter 2(c+1) by calling Theorem 8. We aim to only store a pointer to torso(x,y) for any x,yV(T) where the edge (x,y) is in the shortcutting. This implies that we only need to store O(nαc(n)) pointers of size O(k2). To achieve constant time query, we build and store a two dimensional look-up table U indexed by pairs of torsos. For each computed torso(x,y)=Gt,1 and torso(y,z)=Gt,2, we store the pointer to Gt in the entry U(Gt,1,Gt,2) where Gt=torso(x,z). Then this table has at most (2O(k2))2=2O(k2) entries. Given any torso query x,yV(T) where x is a strict ancestor of y, suppose y,x1,x2,,xh,x is the y-x path in the shortcutting of T, so h2(c+1). We can obtain torso(x2,y) by looking up U(torso(x2,x1),torso(x1,y)), and then we can obtain torso(x3,y) by looking up U(torso(x3,x2),torso(x2,y)). Thus we can get torso(x,y) by repeating this step h times along the path. Each look-up step takes constant time, so obtaining torso(x,y) takes O(h)=O(1) time.

Therefore, the structure uses 2O(k2)+O(k2nαc(n)) space to store all possible torsos, the table U, and the pointers. The initialization time is dominated by computing all torsos, which is O(k3nlog2n+k6nlogn), and torso queries can be answered in O(1) time, finishing the proof.

Next we introduce profiles, which maintain the connectivity of an adhesion within its subtree. For a node xV(T), we define the profile of x, denoted by profile(x), which is a graph on the vertex set adh(x). Two vertices u,vV(profile(x)) are adjacent if and only if they are connected in G[cone(x)]S where S 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 S 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 O(k2)2O(k2) space, initializes in time O(k2)2O(k2), and answers the query in O(1) time: given profile(y) and torso(x,y), where x is a strict ancestor of y and comp(x)cone(y) is disjoint from S, output the following.

  1. 1.

    The graph profile(x).

  2. 2.

    A coloring col:adh(x)adh(y)[O(k)] where col(u)=col(v) if and only if u,vadh(x)adh(y) are connected in G[cone(x)]S.

  3. 3.

    A inverse coloring invcol:[O(k)]adh(x) such that invcol(i)=v where vadh(x) is an arbitrary vertex with col(v)=i.

Proof.

First note that |V(profile(x))|k for any xV(T), so |E(profile(x))|O(k2). There are 2k2 possible graphs on k vertices, we compute and store them explicitly in k22k2 time and space. Recall that each torso has at most 2k vertices, so storing all possible torsos take O(k2)2O(k2) time and space.

Let St,Sp be the set of all torsos and profiles. Next, we construct a 2-dimensional look-up table U, indexed by torsos and profiles. For each GtSt and GpSp we compute entry be U(Gt,Gp) in the following way. Construct graph H on the vertex set V(Gt)V(Gp) and the edge set E(Gt)E(Gp). Then, perform BFS over H to identify its connected components. We construct the graph H on vertex set V(H)=V(Gt)V(Gp), and each pair of vertices u,v in this vertex set are adjacent if and only if they are in the same connected component in H. We assign an arbitrary coloring col:V(Gt)[O(|V(Gt)|)] such that only vertices in the same connected component in H have the same color. For each color i used, we assign invcol(i)=v where v is an arbitrary vertex vV(H) such that col(v)=i (or invcol(i)= if such v does not exist). Finally we set the entry U(Gt,Gp)=(H,col,invcol).

It is clear that computing one entry takes O(k2) time. Suppose that on a valid query torso(x,y) and profile(y) we have the entry U(torso(x,y),profile(y))=(H,col,invcol). By construction, H has vertex set exactly adh(x)=V(profile(x)), and two vertices u,vadh(x) are adjacent if and only if they are connected in G[cone(x)]S, thus H=profile(x). The coloring col and inverse coloring invcol are also correct by the same argument.

U has |St||Sp|=2O(k2)2k2=2O(k2) entries, each storing a graph of at most k vertices that takes O(k2) time to compute along with a coloring and inverse coloring linear in its size. Thus, constructing the table U takes O(k2)2O(k2)=O(k2)2O(k2) time and space. On query torso(x,y) and profile(y), the structure outputs U(torso(x,y),profile(y))=(profile(x),col,invcol) 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 xV(T), we store a version of bgraph(x) that is preprocessed, along with the patch set of x, denoted by pset(x). Each pset(x) contain patches, where a patch Pbag(x) is simply a subset of vertices. We add patches to pset(x) in the following way. Start by choosing an arbitrary vertex vbag(x) and perform BFS in bgraph(x) starting from v until k+1 vertices, including v, are visited. Let P1 be a set that contains exactly these k+1 visited vertices, remove P1 from bgraph(x), include P1 in pset(x), and repeat this process in bgraph(x)P1. This is repeated until in bgraph(x)(Pipset(x)Pi) there is no connected component of size at least k+1. Finally, for any remaining connected component C, we include C as one patch in pset(x).

We say a patch Ppset(x) is big if |P|=k+1, and we say that it is small otherwise. Moreover, we call two patches Pi,Pjpset(x) adjacent to each other if and only if there exist some uPi and vPj such that u and v are adjacent in bgraph(x). From the construction process, the following structural claim is clear.

Claim 13.

For any xV(T) and its computed pset(x), the following properties must hold.

  1. 1.

    All patches in pset(x) are disjoint, and Pipset(x)Pi=bag(x).

  2. 2.

    Any small patch Ppset(x) can only be adjacent to big patches.

We then proceed with a simple processing of bag graphs. For each vertex vbag(x), store in bgraph(x) a pointer along with v that points to Pv, where Pvpset(x) is the patch such that vPv.

Along side this, we also store some neighbor sets of the patches. Let N(P) be the set of at most k+1 vertices vbag(x) where vP and there exists a normal edge (u,v) in bgraph(x) such that uP (if there are more than k+1 such v, choosing an arbitrary subset of k+1 of them suffices). We call N(P) the set of normal neighbors of P.

Moreover, for any patch Ppset(x), let Nadh(P) be the set of neighbors v such that there is an adhesion edge (u,v) in bgraph(x) where uP and vP. We call this the set of adhesion neighbors of P. Each set Nadh(P) stores at most k3+1 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 vNadh(P) a counter indicating the number of adhesion edges (u,v) where uP.

Now, suppose P1,,Ppset(x) are all the small patches. We store with each Pi{P1,,P} the set N(Pi) and Nadh(Pi). 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 G.

Lemma 14.

One can in time O(k3n) and space O(k2n) compute and store the following.

  1. 1.

    For every xV(T), the patch set pset(x) and the processed bgraph(x).

  2. 2.

    For every x and each small patch Ppset(x), the neighbor sets N(P) and Nadh(P).

Proof.

Recall from Lemma 5 that in 𝒯 the total size of all bags is at most O(qn)=O(kn) and the total size of all bag graphs is at most O(m+k2n). From Claim 13 we know that for a pset(x) all patches are disjoint and cover bag(x), thus |Ppset(x)P|=|bag(x)|, so the total space to store all patch sets would be the same as the total size of all bags, which is O(kn). We compute pset(x) by performing BFS procedures in bgraph(x) such that each edge is visited only once, so the total time required to computed all patch sets would be xV(T)|E(bgraph(x))|=O(m+k2n). Moreover, when processing each bgraph(x), we only add one pointer for each vertex, so the space to store all processed bag graphs would still be O(m+k2n)=O(k2n). This process can be done while we are computing patch sets.

In each pset(x) there can be at most |bag(x)| small patches. For each small patch P, at most k+1 vertices can be in N(P). Hence storing all normal neighbor sets across all patch sets would require at most O(kkn)=O(k2n) space. To compute N(P), we visit 2k+1 neighbors of each vP if able, and for each neighbor u of v, we include it in N(P) if it is not already included and uP. We stop early when |N(P)|=k+1. This guarantees that if P has at most k neighbors, all of them would be in N(P), and otherwise N(P) would contain k+1 arbitrary neighbors of P. This takes O(k2) time for each small patch P, so in total across all patch sets this takes O(k2kn)=O(k3n) time.

For each x, we next check each adhesion edge (u,v) in bgraph(x). Let Pu,Pv be the patches that contain u,v respectively. If Pu=Pv, we discard this edge and continue to the next one. Otherwise, we add v to Nadh(Pu) and u to Nadh(Pv), incrementing the counters accordingly. We do not add an edge to a set if it already contains k3+1 vertices. There are at most k2|children(x)| adhesion edges in bgraph(x) since each child of x supports at most k2 adhesion edges. Thus the total number of adhesion edges for in bag graphs is xV(T)k2|children(x)|=k2n=O(k2n), and we can compute all outgoing adhesion edge sets with O(k2n) time and space.

Combining all of these, the total time required is O(k3n) while the total space usage is O(k2n), 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 S is the set of failed vertices, for a node xV(T), we say that it is in the case of single-child failure if S is disjoint from bag(x) and there is exactly one zchildren(x) such that comp(z)S. We call such z the single affected child of x. To speed up query time, we need O(k) time access to some vital information about bgraphS(x) for nodes x that are in this case, formally captured in the following lemma.

Lemma 15.

There is a data structure that uses 2O(k2)n space, initializes in 2O(k2)n time, and answers the query in O(k) time: given a node xV(T) in the case of single-child failure, profile(z) with z being its single affected child, and a vertex ubag(x), output the following.

  1. 1.

    Let C be the unique connected component in bgraphS(x) where |C|>k, the set L=adh(x)C.

  2. 2.

    The set of vertices I where each vI is not in C and is connected to some vadh(x), with a coloring col:I[O(k)] such that col(u)=col(v) for any u,vI if and only if they are connected in bgraphS(x).

  3. 3.

    A label indicating whether uC.

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 O(k) 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. 1.

    The unbreakable decomposition 𝒯=(T,bag) computed using Theorem 4. Each node xV(T) also stores its depth in T. Additionally, each vertex vG contains a pointer that points to the unique tree node xv where vmrg(xv).

  2. 2.

    The data structure for lca and dir queries of Lemma 9.

  3. 3.
    1. (a)

      The torso query structure given by Lemma 11.

    2. (b)

      The profile computing structure given by Lemma 12.

  4. 4.

    For each node xV(T), the patch set pset(x), processed bag graph bgraph(x), and additionally for each patch Ppset(x), its neighbor set N(P). These are computed using Lemma 14.

  5. 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 G except 3(a), which uses 2O(k2)+O(k2nαc(n)) space. Also, structure 5 uses space that is linear in n but exponential in k. Thus their total space usage would be 2O(k2)n+O(k2nαc(n)). The total preprocessing time is dominated by computing the unbreakable decomposition and initializing structure 3(a), which would be kO(k2)n+O(k3nlog2n+k6nlogn) in total444Recall we assume m=O(kn) from [20]. If m>kn, we actually take an extra O(m) 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 SV(G) of failed vertices where |S|k and we update the data structure accordingly, and in the query phase we are given a pair of vertices u,vV(G) and answer whether they are connected in GS. 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 S, we first label all vS as “failed” in G without deleting them or their incident edges. We then compute the set XV(T) of all nodes xT that satisfy mrg(x)S. This can be computed in O(k) time by including xv in X for each vS by checking its pointer, where xv is the unique node such that vmrg(xv). Let r be the root of T, if rX, we also include r in X. Note that |X|k+1. Additionally, let Y be the lowest common ancestor closure of X, so |Y|2|X|12k1=O(k). We can compute Y in O(k2) time by computing lca(x,y) using Lemma 9 and including it in Y for every pair of nodes x,yX.

We say that a node xT(V) is important if xY. Furthermore, we call a node x affected if comp(x)S, otherwise we call it unaffected. We begin by providing a algorithm that allows us to determine connectivity between a subset of vertices of bag(x) within G[cone(x)]S quickly for any important node x.

Lemma 16.

For a node xV(T), given bgraphS(x) and a subset of vertices V(H)bag(x), we can compute the graph H in time O(k2|V(H)|), where two vertices u,vV(H) are adjacent in H if and only if they are connected in G[cone(x)]S.

Proof.

From Lemma 6 we know that two vertices u,vbag(x) are connected in G[cone(x)]S if and only if they are connected in bgraphS(x), and that there exists a unique connected component Cbag(x) in bgraphS(x) with |C|>k. Then we build the edge set of H as follows. We perform BFS in bgraphS(x) starting from each vV(H) until k+1 vertices are reached, avoiding failed vertices. We add an edge (u,v) in H for every u reached by v where uV(H). If more than k vertices are reached, v must be in C, and we mark it as such. After this step has been repeated for all vertices in V(H), we add edges between all pairs of u,vV(H) where both u and v have been marked that they are in C.

It is clear from the construction of H that any two vertices are adjacent in H if and only if they are connected in bgraphS(x) and thus in G[cone(x)]S. Each (k+1)-step BFS takes O(k2) time, so processing all vertices in V(H) takes O(k2|V(H)|) time, completing the proof of this lemma.

Recall the definition of profiles, the next step is to compute profile(x) for all xY.

5.1.1 Computing Important Profiles

We will compute these profiles in a bottom-up manner. We first focus on a general node xV(T). Suppose Zchildren(x) is the set of all affected children of x. The following claim describes how profile(x) is computed given the profiles of all nodes in Z.

Claim 17.

Let xV(T) be a node. Given the set Z and profile(z) for all zZ, one can compute bgraphS(x) and profile(x) in time O(k3).

Proof.

First note that |Z||S|k as there are at most k vertices in S and the components of all affected children are pairwise disjoint. We will build bgraphS(x) by removing edges from bgraph(x). By the definition of bgraphS(x), only adhesion edges supported by the affected children need to be considered for deletion as S is disjoint from the components of children in children(x)Z. For every zZ, consider all adhesion edges supported by z. Recall that any such edge (u,v) is not deleted in bgraphS(x) if and only if u and v are connected in G[cone(z)]S. Note that this is also exactly the definition of the edge set of profile(z), which is provided. Thus for each such edge (u,v), we delete it if and only if (u,v) is not in profile(z), which can be checked in constant time. Since each |adh(z)|k, there will be at most |Z|k2kk2=k3 edges to consider, thus we can construct bgraphS(x) in O(k3) time.

To build profile(x), we need to decide for every pair u,vadh(x) whether they are connected in G[cone(x)]S or not. We use Lemma 16 to compute profile(x) by giving as input the bgraphS(x) that we just computed and V(H)=V(profile(x))=adh(x). Thus, we can obtain H=profile(x) in time O(k2|adh(x)|)O(k3). Note that building both bgraphS(x) and profile(x) take O(k3) time in total, proving the claim.

Note that this lemma holds even when x has no affected children since in this case bgraphS(x)=bgraph(x).

Next, we need to compute the profiles of all affected children Z of x in order to compute profile(x). The next lemma shows how profile(z) is computed for any non-important zZ from the important profiles in its subtree.

Claim 18.

Let z be an affected child of x and suppose zY, given profile(y) for all yY that are contained in the subtree T(z), one can compute profile(z) in time O(k).

Proof.

Let yY be the topmost important node in the subtree of T rooted at z. It can be computed in O(k) time by considering every yY and choosing the node with the smallest depth such that lca(y,z)=z. Note that comp(z)cone(y) is disjoint from S because otherwise there must be an important node yV(T(z))V(T(y)) and lca(y,y) will also be in Y and have a smaller depth than y. Since we have profile(y) and can get torso(z,y) in constant time from Lemma 11, we can use Lemma 12 to compute profile(z) 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 Y, one can in time O(k4) compute profile(x) for all xY.

Proof.

We begin by constructing the tree TY where V(TY)=Y. For any two nodes x,yY, x is the parent of y in TY if and only if it is a strict ancestor of y and the x-y path in T is disjoint from Y. Note that one can compute TY in O(k2) time using lca queries on Y. Then, for each leaf node x in TY, we can compute profile(x) using Claim 17 by setting Z= as x must have no affected children.

Next, for any non-leaf node xY, we compute the set Z of its affected children in T by checking every yY, and we include dir(x,y) in Z if lca(x,y)=x. Note that this takes O(k2) time for all x. 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 z where the profile of every node in V(T(z))Y is computed, then use Claim 17 to compute any profile(x) whose affected children profiles have all been computed.

There are O(k) important profiles to compute, so Claim 17 is called O(k) times, taking total time O(kk3)=O(k4). Each affected child is computed from a unique important profile and the torso between them, so Claim 18 is called O(k) times, which take total time O(kk)=O(k2). Therefore, computing all important profiles takes O(k4)+O(k2)=O(k4) time, completing the proof.

Note that in the process of computing all important profiles, for each xY, 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 xY with the set of its affected children Z, we define the adhesion connectivity graph, denoted by adhconn(x), as the graph on the vertex set (zZadh(z))adh(x) where two vertices u,vV(adhconn(x)) are adjacent if and only if they are connected in G[cone(x)]S. We compute these along with some coloring that preserves connectivity information as follows.

Lemma 20.

Given profile(x) and bgraphS(x), one can compute the following for all xY in time O(k5).

  1. 1.

    The graph adhconn(x).

  2. 2.

    A coloring col:V(adhconn(x))[O(k2)] where col(u)=col(v) if and only if u,vV(adhconn(x)) are connected in G[cone(x)]S.

  3. 3.

    A inverse coloring invcol:[O(k2)]adh(x) such that invcol(i)=v where vadh(x) with col(v)=i.

Proof.

We first consider computing adhconn(x) for a specific xY. Suppose Zchildren(x) is the set of its affected children. Note that |Z|k and all adhesions have at most k=O(k) vertices, so |V(adhconn(x))|(k+1)k. By its definition, we can use Lemma 16 to compute H=adhconn(x), giving as input bgraphS(x) and V(H)=V(adhconn(x)), in O(k2|V(adhconn(x))|)O(k2(k+1)k)=O(k4). Then, we perform BFS in adhconn(x) in O(k4) time to identify its connected components, and assign an arbitrary coloring col:V(adhconn(x))[O(k2)] where only vertices in the same connected components in adhconn(x) have the same color. For each used color i, we assign invcol(i)=v by choosing an arbitrary vadh(x) with col(i)=v, or assign invcol(i)= if no such v exist.

It is clear that computing adhconn(x) with its coloring col and inverse coloring invcol takes O(k4) time for each xY. There are at most O(k) important nodes, so computing these for all xY takes O(kk4)=O(k5) 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 pset(x) of bgraphS(x), for every node x where profile(x) is computed. Note that x can either be an important node or an affected children of some important node. For any such x, we say a patch Ppset(x) is touched if it either contains some vertex vS, or it contains both u,v for some adhesion edge (u,v) that is deleted during construction of bgraphS(x). Let Apset(x) be the set of all touched patches in pset(x).

Suppose Z is the set of affected children of x. For every affected child zS, the set of all z-supported adhesion edges form a clique in bgraph(x) on at most k vertices and k2 edges. Note that only at most k/2=O(k) of these edges are vertex disjoint, so at most O(k) patches can be touched due to these z-supported adhesion edges. Thus we have |A|k+O(kk)=O(k2) as |S|k and there can be at most |Z|O(k)O(k2) disjoint patches touched due to adhesion edge deletions.

Additionally, for each small patch P, we need to update the set Nadh(P) of adhesion neighbors for each small patch Ppset(x) due to the adhesion edge deletions in bgraphS(x). We need to compute A and update Nadh(P) for all small patches P before proceeding to the next step.

Claim 21.

For a node xV(T), given bgraphS(x), one can in time O(k3) compute the set A of affected patches and update the set Nadh(P) for each small patch Ppset(x).

Proof.

We have bgraphS(x) and profile(z) for all zZ where Z is the set of its affected children since xY. We first check all vertices vS. For any vSbag(x), we identify the patch Pv where vPv by looking at its stored pointer and include it in A. Then we compute the set of deleted adhesion edges by comparing for each zZ the set of z-supported adhesion edges in bgraphS(x) and E(profile(z)). For any deleted adhesion edge (u,v), we check if they are in the same patch by comparing their pointers, and we include P if u,vP. It is clear that computing A take O(k3) time as there are at most O(k3) deleted adhesion edges.

We now update Nadh(P) for each small path P. For any deleted adhesion edge (u,v) in bgraphS(x), we consider the patches u and v are in. Let Pu,Pv be the patches containing u,v respectively, we discard this adhesion edge if Pu=Pv. Otherwise, if Pv is a small patch, we decrement the counter of u if uNadh(Pv), and delete it from Nadh(Pv) if the counter reaches zero. We do the same for Pu if it is small. We can compute this in O(k3) time as there can be at most O(k3) deleted adhesion edges in bgraphS(x). 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 bgraphS(x) that has size more than k. If not, we label the vertex with the connected component it is in, formally stated in the following lemma.

Lemma 22.

For a node xV(T), given bgraphS(x), one can compute and label every vertex vP for each patch PA whether it is in the single connected component C in bgraphS(x) where |C|>k in O(k5) time. Moreover, let B be the set of all vertices reachable from (PAP)C in bgraphS(x), one can compute a coloring col:B[O(k)] such that col(u)=col(v) for each u,vB if and only if they are connected in bgraphS(x) in the same time.

Proof.

Recall that each patch has size at most k+1=O(k), then the total number of vertices in touched patches is |PAP||A|O(k)=O(k3). We first call Lemma 16 with bgraphS(x) and V(H)=PAP to obtain H in time O(k2|H|)O(k2k3)=O(k5). For each vertex vV(H) that has been marked as in C when computing H, we also label it as such in bgraphS(x).

Note that |B|k by Lemma 6 since B and C are disjoint by definition. We can compute B and its coloring col as follows. For each vertex vV(H)C, let col(v) be an arbitrary unused color in [O(k)] if v is not already colored, and perform BFS in bgraphS(x) starting from v to visit all vertices reachable from v. For each vertex u reached from v, let col(u)=col(v). Repeating this step for all vertices in V(H)C takes O(|B|2)=O(k2) time as by definition no vertex outside of B 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. 1.

    Given the set of failed vertices S where |S|k, compute the set of important nodes Y in O(k2) time.

  2. 2.

    Compute profile(x) for all xY using Lemma 19. The profiles of all affected children of every xY are also computed in this process.

  3. 3.

    Compute adhconn(x) along with its coloring and inverse coloring for all xY using Lemma 20.

  4. 4.

    Precompute bag graph connectivity information for every node x where profile(x) is computed by repeating Lemma 22.

It is clear that the runtime of the update algorithm is dominated by step 4, where repeating Lemma 22 for all important nodes and their affected children takes O(k5)O(|Y|)O(k6) time. This proves the update time guarantee in Theorem 2.

5.2 The Query Phase

Finally, we describe the algorithm this data structure uses to answer queries. Suppose we are given a query u,vV(G) where we need to answer whether u and v are connected in GS. If either uS or vS, we simply output “not connected”, so let us assume that u,vS for the rest of this section.

We will repeat the same process for u and v, then combine them at the end to answer the query, so for now let us focus on u. The goal is to lift u up to the root and compute their connectivity in profile(r). The procedure is split into cases depending on the position of u, and we will start with the simple case of when u is already included in some precomputed profile.

In general, we will consider four cases for u (and samely, for v) as below. In each case, we can finally compute profile(r) and check the (u,v) connectivity. The complete case analysis can be found in the full version [17].

  • Case 1: u is in a profile computed during update.

  • Case 2: xuY.

  • Case 3: xuY and xu is affected.

  • Case 4: xuY and xu is unaffected.

Given the query u,vV(G), we first identify xu,xv where umrg(xu),vmrg(xv) using their stored pointers. Starting with u, we first decide if xuY. If so, we proceed to Case 2. Otherwise, we decide between Case 3 and Case 4 by checking if there exists an important node yY where lca(xu,y)=xu in O(k) time. We proceed to Case 3 if such y exists as xu must be affected, and we move to Case 4 otherwise. The same process is repeated for v. After all steps are done, we check profile(r), which contains exactly u,v since adh(r)=. One can easily verify by the proofs in each step that profile(r) is a valid profile, thus u and v are connected in G[cone(r)]S=GS if and only if they are connected in profile(r). We finally output “connected” if u,v are connected in profile(r), and output “not connected” otherwise.

Since each step takes O(k) time, one can answer the query on any u,vV(G) in O(k) 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 k-vertex-failure connectivity oracle are

O(min{m,nk}) space,O(m) preprocessing,O(k2) update,O(k) query.

Long et al. [18, 19] achieve all four bounds simultaneously up to polylogn 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 n 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 O(k2nαc(n)) space, and supports updates and queries in small poly(k) time. Currently, the two known approaches to n-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. 1.

    Near-linear space and preprocessing without exponential k-dependence.The algebraic approach uses Ω(n2) space, while current unbreakable-decomposition based oracles incur exponential dependence on k in the preprocessing. Can one obtain

    O~(npoly(k)) spaceandO~(mpoly(k)) preprocessing

    together with poly(k) update and query time?

  2. 2.

    Optimal k-dependence for updates and queries. All known n-independent oracles have update time at least kω or a larger polynomial in k. Can one achieve the conditionally optimal update time O(k2)? More ambitiously, can this be achieved simultaneously with the conditionally optimal query time O(k)?

  3. 3.

    Exactly linear space in n. Our shortcutting scheme reduces the space to Ok(nαc(n)), but still leaves the tiny αc(n) 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 Ok(n) space, but with large polynomial preprocessing time and 22O(k) update and query time. Can one obtain

    Ok(n) space,O~k(m) preprocessing,poly(k) update and query time?

    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.