Manuscript Offprint
arXiv:2610.32721Deterministic Incremental Triconnectivity in Worst-Case Time
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We consider the problem of maintaining the triconnectivity in some biconnected graph G in the incremental dynamic setting. We consider updates in the form of edge insertions and edge subdivisions, and triconnectivity queries, i.e. queries of the form "are there at least three vertex disjoint paths between a and b?". All algorithms presented in this paper are deterministic. All queries and updates are answered in worst-case time. By combining this result for biconnected graphs with a result of Holm and Rotenberg [SODA'20] we get an algorithm for general graphs with a worst-case running time of per operation. Both algorithms represent an improvement of the state-of-the-art by a factor of .
Related version: This paper is based on the M.Sc. thesis by Niels Inselmann Christiansen, supervised by Eva Rotenberg, defended February 2026 at the Technical University of Denmark.
This research is supported by Danmarks Frie Forskningsfond via the grant “Dynamic Graphs: Distributed and Geometry” with grant-ID 10.46540/4251-00004B.
1 Introduction & preliminaries
In a graph, two vertices are triconnected (also denoted 3-vertex-connected) if there exist three internally vertex disjoint paths between them. This relation induces a covering on the vertices of the graph, the member sets of which we call the triconnected components of G. The triconnected components of a graph have received much attention due to their importance in graph drawing: a triconnected graph has a unique planar embedding, and thus, the triconnected components give information about any planar embedding of a planar graph. In the static setting, a linear time algorithm for finding the triconnected components is due to Hopcroft and Tarjan [HT73]. In this work, we consider the incremental variant of this problem where edges and vertices arrive interspersed with queries about the triconnected components of the graph. The analogous question about graph connectivity in the incremental setting is solved by the well-established union find data structure, which has tight amortised and worst-case time per operation. For triconnectivity, an amortised update time has been established for decades[BT96], but the first polylogarithmic incremental worst-case algorithm was only introduced in 2020 [HR20]. In this work, we take a major step towards obtaining tight bounds in the worst case setting also: Given a biconnected graph, we give deterministic worst-case bounds for updating triconnectivity information under edge-insertions, which is tight up to -factors. Our algorithm also leads to an improvement for general graphs, improving from worst-case to .
An algorithm solving the incremental connectivity (commonly attributed to McIlroy and Morris) was proved to have an amortised running time of [Tar75], which is optimal in the cell-probe model [Tar79; FS89]. This lower bound extends to bi- and triconnectivity with a simple reduction and have matching algorithms by Westbrook and Tarjan[WT92] and Di Battista and Tammasia [BT96]. The latter [BT96] introduced SPQR-trees as a data structure for storing the triconnected components of a graph and gave procedures for maintaining this under subdivisions and edge insertions. Similar to SPQR-trees, Tutte [Tut66] had previously introduced a decomposition (now dubbed the Tutte decomposition) that reflects the relation between triconnected components and separation pairs in the graph; this Tutte-decomposition can be computed in linear time [HT73; GM00; BP25]. For incremental worst-case time complexity, there is a lower bound for incremental connectivity of [Blu86; FS89] which is tight with matching algorithm due to Alstrup, Ben-Amram and Rauhe [ABR99]. In the realm of incremental worst-case update-time algorithms, the current state-of-the-art for biconnectivity is due to La Poutré and Westbrook [PW98] and for triconnectivity due to Holm and Rotenberg [HR20].
The fully dynamic connectivity problem was first studied by Fredrickson [Fre85] and has since received much attention by the community [Epp+97; HK99; HT97; HLT01; Tho00; Epp03; PD06; Wul16; Chu+20; KKM13]. It has a lower bound by Patrascu and Demaine [PD06] in the cell-probe model of for the maximum amongst update time or query time, and current state of the art of amortised, randomised due Huang, Huang, Kopelowitz, Pettie and Thorup [Hua+17]. The fully dynamic biconnectivity problem has also received attention [WT92; Rau92; Rau94; HL95; Hen95; Epp+99; Hen00] together with the related 2-edge-connectivity problem [WT92; Fre97; Epp+99; HLT01; HK97; HRT18; HR21]. The triconnectivity problem, supporting relational triconnected( ) queries, has yet to admit a polylogarithmic time algorithm, and has been studied for planar graphs [Epp+97; Hol+18].
Many of these algorithms maintain a dynamic forest as a skeleton for the graph using e.g. Sleator and Tarjan's Link-Cut Trees [ST83] or Top-Trees by Alstrup, Holm, De Lichtenberg and Thorup [Als+05].
Which allows among other things time to insert edges and vertices and adding weight to a path of the forest. These operations are usually supported using a weighted variant of search trees such as e.g. Bent, Sleator and Tarjan's biased search trees [BST85] or Sleator and Tarjan's splay trees [ST85], which allow for a 'trees-within-trees' structure that maintains a total logarithmic depth for any leaf node.
Subsequent and parallel work. Recent results give efficient randomised, amortised algorithms for general vertex connectivity of a graph [Ade+26]. Note here that our results are deterministic and that the update time guarantees hold in the worst-case, and that we answer pair-wise relational queries.
1.2 Our contribution
We study the maintenance of connected and biconnected graphs. Let G be a biconnected graph, we give a data structure which can maintain a representation of the triconnected components of G while supporting the following updates and query:
Subdivide(e): Replace the edge with a path through a new vertex .
InsertEdge(u, v): Connect u and v with a new edge.
Triconnected(u, v): Are the vertices u and v triconnected?
It is well known every 2-connected graph can be built from the triangle using only these operations. In Section 3 we prove
Theorem 1. There is a data structure, which maintains a biconnected graph G in linear space, while supporting the operations InsertVertex and InsertEdge in deterministic worst-case time and answers Triconnected in deterministic worst-case time.
Combining this with a theorem by Holm and Rotenberg [HR20] we consequently obtain
Corollary 2. There is a data structure, which maintains a graph on n vertices in linear space, while supporting the operations InsertVertex and InsertEdge in deterministic worst-case time and answers Triconnected in deterministic worst-case time.
1.3 Techniques and challenges
Our paper mainly builds on the work of Holm and Rotenberg [HR20], which further build on the dynamic trees of Sleator and Tarjan [ST83] and the incremental SPQR-tree Di Battista and Tammasia [BT96]. Holm and Rotenberg reduces the problem of maintaining the SPQR-tree of some graph, to maintaining a tree under edge insertion, edge deletion and path contraction efficiently. For this purpose they use ST-trees along with an edge marking system, to indicates contracted edges. These edge markings are a classical application of ST-trees and can be implemented without additional asymptotic cost, however edge insertion in the SPQR-tree requires finding a specific edge, the search procedure of which requires an additional factor of in the running time. We describe how one, by storing additional information in the ST-tree, can find these important edges without a slowdown. Section 2 is dedicated to recalling ST-trees and related techniques. Section 3 defines SPQR-trees and the tree operations required to maintain them and restates the reduction of Holm and Rotenberg, ending with a discussion of the representation of the three and how to implement all operations in time for biconnected graphs.
1.4 Preliminaries
Let to be a (multi) graph with vertex set and edge (multi) set . Throughout this paper we use the convention that and . A tree is a connected graph with no cycles. It is well known that trees have exactly edges and that there is a unique path between any two vertices of . In this paper, we will denote the vertices of a tree as nodes. A tree rooted at a node is a directed tree where all edges point in the direction of the unique path to . All nodes (except the root) have a neighbour closest to the root; we call this the parent, . All neighbours which are not the parent are children of . The set of children is denoted . The set of nodes which contain on their root path are the descendants of . The subtree of rooted at , denoted , is and all its descendants.
The graph on vertices where all pairs share an edge is called the complete graph on vertices, . We call the multigraph on exactly 2 vertices with distinct edges between them .
Connectivity A graph G is k-connected if there are k internally-vertex-disjoint paths between any two vertices of G. A 1-connected, 2-connected or 3-connected graph is generally called connected, biconnected or triconnected. Menger's theorem [Men27] states that for a k-connected graph, no set of size will leave G - c disconnected. Such a set is generally known as a -cut and serves as a certificate that a graph is not k-connected. A 1-cut is usually called a cut-vertex.
Separation Sets and Classes Let be a graph and a set with . If we divide the edges of into equivalence classes such that two edges which lie on a common path not containing any vertex of except as an endpoint are in the same class, then we call separation classes with respect to . A separation class with more than 1 edge is called a proper separation class. If there are at least two proper separation classes, then is a -separator (and a -cut). If is a 2-separator, then we also call a split pair.
Observation 1.1. If G is a graph with k-separator S, then S is not a k-separator in any separation class of S. This leads to a natural decomposition of biconnected graphs into so-called biconnected components.
Definition 1.2. Given two cut-vertices of a graph G, we define the block or biconnected component between them as the separation class containing both. A biconnected component is either:
(i) A maximal biconnected subgraph
(ii) An edge between two cut-vertices (trivial block)
The idea to decompose a graph using k-separators has since been applied to define the triconnected components of a graph which we will revisit in Section 3
2 Heavy Path Decompositions
In this section we will recall the dynamic trees of Sleator and Tarjan [ST83] in the weighted setting, which we will use later to store the triconnected components of a biconnected graph, while supporting changes to the tree in logarithmic worst-case time. We present the weighted formulation used by Holm and Rotenberg [HR20].
Definition 2.1. Let be a positive weighting of the nodes of a rooted tree . Define the weight of the subtree rooted at to be
Then a (proper) heavy path decomposition of T is a partitioning of into two groups, heavy and light such that the edge is heavy if and only if
and light otherwise.
Apart from splitting the edges, this also partitions T into so-called heavy paths which we will use as a kind of compressed or generalised edge. This partitioning can be done in linear time using a simple traversal of T by computing bottom up. This definition, however, is somewhat limited as the partitioning of heavy and light is fixed for any tree. To mitigate this, we will consider a variant which enables us to force a single path to be heavy.
Definition 2.2. A u-exposed heavy path decomposition of a rooted tree T is a partitioning of into two groups, solid and dashed such that the edge is solid if and only if it is on the u-to-root path or is not on the u-to-root path and is heavy.
We can consider a solid edge to be almost heavy and a dashed edge to be almost light. We note that a proper heavy path decomposition is u-exposed for some choice of u. We now prove some properties of heavy path decompositions and describe some internal operations.
Lemma 2.3. A vertex v has at most one heavy child.
Proof. Assume that and are heavy. Then
However, this is contradicted by
Corollary 2.4. A node has at most one solid child.
Lemma 2.5. Let be the root of and . For any node in a heavy path decomposition the light depth at most .
Proof. Consider the light edges of the v-to-root path and let be the light children of said edges. Clearly
Applying this inequality along the entire path, we get
Thus
Lemma 2.6. The dashed depth of a node v in a u-exposed heavy path decomposition of T is at most 1 more than the light depth.
Proof. On the path from v to the first node x with a parent on the u-to-root path, the notion of light and dashed is equivalent. The path from is entirely solid. Thus, only the edge might be heavy but not solid. This means that the dashed depth is at most 1 more than the light depth.
With this, we are ready to describe the internal updates. Suppose we have a heavy path decomposition T. We will support the following operations on T. Let u be a vertex in T and r the root of T.
expose(u): If T is proper, make T u-exposed.
conceal(u): If T is u-exposed, make T proper.
reverse(r): If T is u-exposed, make u the root and T r-exposed.
link-exposed(u, v): Given node u in a u-exposed heavy path decomposition and a root node v in another, make u the dashed parent of v resulting in a new u-exposed heavy path decomposition containing the nodes of both trees.
cut-exposed(u): Where T is u-exposed and u is not the root r of T, remove the edge creating two new trees and . is -exposed and is proper.
To do this, we also need the following 2 internal operations used to edit the tree locally. Let be the (unique) solid child of u if it exists.
splice(u): Where u is a light child of its parent. If is dashed, make it solid. If has a solid child, make it dashed.
slice(u): Where u is a light child of . If is solid, make it dashed. If has a heavy child , make solid.
We denote this collection of operations the heavy path operations.
Splice and slice provide a natural way to implement expose and conceal for some vertex u. To expose, splice every light vertex on the path from u-to-root. To conceal, slice each light child on the u-to-root path, and if u has a heavy child, slice it as well. Note that all solid children are heavy when exposing. Using these, it is easy to see
Observation 2.7. Let be the light depth of . Then, on a proper tree, we can expose a vertex using splices. On a -exposed tree, we can conceal in slices.
Lemma 2.8. All the other operations change the colour of at most one edge.
Proof. To implement link-exposed and cut-exposed, we only need to add or remove a single edge. The argument for reverse is as follows: If the tree is u-exposed, then reversing the root path does not change the colour of any edge, as the resulting tree is r-exposed. All the off-path edges are still dashed.
2.1 Implementing Heavy Path Decompositions
To represent heavy paths and dashed children of nodes, we shall use Bent, Sleator and Tarjan's Globally Biased Search Trees [BST85]. Let P be an ordered set and wt a positive weighting of P.
Theorem 2.9. [BST85]. There is a data structure which maintains a directed, vertex-weighted path P as a binary search tree. To each internal node, the data structure associates a left and right subpath and the unique edge connecting the two. If W is the total weight in P then the following queries are supported:
Path(v): For , find the root of the search tree containing v in
Head(P), Tail(P): Find the first and last vertices of P in time.
and the following dynamic operations:
Reverse(P): Reverse the direction of P in time.
Reweight : Change the value of wt(v) to in a path with total weight W before and after. This is .
Concatenate(P, Q): Let P be a path with Tail(P) = u and Q another path with Head(Q) = v. Insert the edge (v, w). If and are the weights of P and Q respectively then Concatenate is
Split(v): Delete the edges of v resulting in up to three new paths. The lower part from Head(v) up to but not including v, v itself and p(v) to Tail(v). If and W is the total weight on P Then split is .
If the items are ordered by their weight, the following operations are supported using Concatenate and Split.
Insert(v, p): Inserts v into path p in .
Delete(v): Deletes v from path p in .
The goal is now to use Theorem 2.9 to represent a heavy path decomposition of T. Direct the edges of T towards the root. Then store the heavy paths of T using a biased search tree, where each node is weighted by a to-be-defined weight function wt. Let each node store a pointer to its parent and a biased search tree of its children, weighted by , which we denote the child set. Using the parent pointers it is possible to traverse any u-to-root path using repeated Tail and Path calls. The heavy path weighting function wt is defined as follows
The maintenance of this weighting is non-trivial but solvable using standard techniques. Refer to [ST83] for details. Note that the total weight in the child set of v is . We can now describe how to implement the heavy path operations.
splice(v): To splice a node v, first remove v from the child set of . Then split Path( ) by and concatenate the upper part, and Path(v). Change the tail parent pointer of the lower part to Path(v) and add the lower part as a child to .
slice(v): To slice a node v, split Path(v) by v and find if it exists. Concatenate the upper part of the path to the path of the heavy child and concatenate v to the lower part of the path. Add v as a dashed child of .
reverse(r): To reverse the root-to-u path of a u-exposed tree use reverse on Path(r).
link-exposed(u, v): Add v as a dashed child of u and reweight u according to the new weight..
cut-exposed(u): Split the root-path of T at u.
With this we see that the heavy path operations can be implemented using a logarithmic amount of search tree operations. We analyse the specific running times of each operation.
To expose and conceal, we need splices and slices.
Observation 2.10. For a path P, the total weight is .
Lemma 2.11. Traversing the v-to-root path of any node v is
Proof. We call Path and Tail repeatedly to find the root. Let , , , , be the parents of each path tail and , , , be the traversed heavy paths. Note that Lemma 2.6 implies .
Now by Theorem 2.9 each pair of Path and Tail calls are and since Tail( ) is a dashed child of we observe that
Applying this inequality and summing the run times yields
Lemma 2.12. splice(v) and slice(v) run in
where is the tail of Path( ).
Proof. We analyse splice first. Removing from the child list of is done using delete. The total weight in the child list is at most . Thus the delete takes . Splitting Path() is . Concatenating Path() to that of is as heavier than . This changes and constitutes a reweight which is . Inserting the previously solid child into the child list of is constant, as the child was heavy. The time taken for slice is almost the same. Splitting and concatenating the relevant paths is identical. Finding and extracting the heavy child takes constant time. In the end, the only difference is adding as a child of . This is .
Lemma 2.13. Expose and conceal are where W is the total weight in T.
Proof. We begin with expose. As we have already shown the light depth of any node to be , we only need to show that the accumulated running times of splice and slice do not exceed this. Let be the node to expose and the root of . Let and be the remaining solid paths on the root path and the tails of said paths. Refer to Figure 1 for a graphical representation. Expose will call splice on in sequence. Thus, the total time used in splice is
The final detail is the time to find the next light edge. Given we can find in and given we can find in . Thus, the traversal of the light edges is no slower than splicing and slicing on the respective nodes. The only exception is , which must be taken into account. By noting that , we find that expose is
The analysis is analogous for conceal.
□

Figure 1: The layout of the paths towards the root when exposing some node v.

Figure 2: On the left a biconnected graph G. On the right the SPQR tree of G with the skeletons pictured. Each edge is marked with the corresponding 2-cut. Note: Based on Figure 2 by Holm et. al. [Hol+18]
With expose and conceal, the correctness and time bounds of link, cut and reverse also follow.
Theorem 2.14. There exists a data structure which maintains a weighted heavy path decomposition of a directed tree T while supporting expose, conceal, reverse, link-exposed and cut-exposed in .
Since wt is some internal weighting, the following bound is weaker but easier to conceptualise. Recall that . Then for any positive weighting w, of the nodes in T get:
Corollary 2.15. There exists a data structure which maintains a weighted heavy path decomposition of a directed tree T while supporting expose, conceal, reverse, link-exposed and cut-exposed in .
3 Incremental Triconnectivity for Biconnected Graphs
In this section, we will construct a decomposition of biconnected graphs into a tree of their triconnected components. These were defined in their modern form by Hopcroft and Tarjan [HT73]. We will use a definition of Holm and Rotenberg [HR20] as it is easier to work with, however an easier to follow definition is given by Di Battista and Tammasia [BT96] in their original work on SPQR-trees.
It is well known that all biconnected graphs can be constructed from by subdivision of edges and edge insertions (see e.g [Whi32]) thus these dynamic operations allow us to span the entire set of biconnected graphs incrementally while supporting Triconnected queries. We can now move on to the data structure.
3.1 SPQR-trees
Definition 3.1. [Hol+18; HR20] The (strict) SPQR-tree for a biconnected multigraph with at least 3 edges is a tree with nodes labelled S, P and R. Each node has an associated skeleton graph with the following properties:
(i)
(ii) For any edge there is a unique node with
(iii) If x is an S-node, then is a simple cycle with at least 3 edges
(iv) If x is a P-node, then is a pair of vertices with at least 3 parallel edges.
(v) If x is an R-node, then is a simple triconnected graph.
(vi) No two S-nodes are neighbours and no two P-nodes are neighbours.
(vii) For every edge in the SPQR-tree, is a separation pair in G between the skeletons on either side of . The virtual edge is in both and . We say that is marked by .
(viii) Any edge is either virtual or non-virtual. If an edge is non-virtual .
The SPQR-tree is unique (see e.g. [BT96]). The skeletons of the tree nodes are also referred to as the triconnected components of G. A relaxed SPQR-tree is a tree that satisfies all but (vi)
Lemma 3.2. [BT96] For any SPQR-node , is homeomorphic to a subgraph of G. Also any 2-cut in is a 2-cut in G.
Lemma 3.3. The nodes containing a vertex, v, form a connected component of .
Proof. Suppose two nodes of contain v and don't form a connected component. Any edge separating them is marked by a 2-cut of G, this is a contradiction, as no vertex can be separated from itself.
Lemma 3.4. The nodes containing both u and v also form a connected component of .
Proof. By the previous lemma, the nodes containing and respectively form two subtrees and . Clearly the nodes containing both is . It is well known that the intersection of two trees is connected.
Lemma 3.5. In any S or R-node, there is at most one virtual edge connecting u and v
Proof. Suppose there were two edges connecting u and v. As the skeletons of either type are simple, such an edge would violate Definition 3.1.
Lemma 3.6. If more than two SPQR-nodes contain vertices u and v, there is a unique P-node containing both.
Proof. Suppose more than two nodes contain both u and v. By Lemma 3.3, these nodes form a connected component of . The only nodes with degree greater than 1 must be P-nodes as these are the only nodes to admit more than 1 u, v edge. Thus, all S and R-nodes must have a P-node as a neighbour. As no P-node neighbours another, this P-node must be unique for the component to be connected.
Observation 3.7. If there are more than two SPQR edges marked with u and v they form a star around the unique P-node with
With this, we can define an important relation between pairs of vertices in G.
Definition 3.8. Given some SPQR-tree let . The critical path, is then defined as:
- If exactly one SPQR-node, , contains x and y then

Figure 3: An SPQR tree with three different kinds of critical paths. Blue: Two vertices share exactly two nodes. Yellow: Two vertices share more than three nodes. Red: Two vertices share no node.
-
If exactly two SPQR-nodes, , contain both x and y then they are adjacent and .
-
If more than two SPQR-nodes containing both x and y then is the unique P-node containing both.
-
If no node contains both and then is the unique shortest path in such that and
Note that exists and is unique [HR20]. See Fig. 3 for an example.
3.2 Answering queries
To answer the Triconnected queries, we will need the following lemmas, which explain how we can infer the triconnectedness of arbitrary nodes from the SPQR-tree.
Lemma 3.9. A pair of vertices are triconnected if and only if u and v share a P or R-node.
Proof. . Since the skeleton of any P or R-node is triconnected and since they are homeomorphic to a subgraph of G, any pair of vertices sharing a P or R-node are triconnected. If u and v are triconnected, they must share at least one node. If there are two or more such nodes, one must be an P or R-node. Suppose then that u and v share a single S-node. The skeleton of this node is a cycle C in G, on at least three vertices. Thus, at least one of the two paths on the cycle will contain a cutvertex. If the other does not contain a cutvertex, u and v are neighbours along C, and the remaining two paths connecting them will belong to a P-node neighbouring the S-node in question, contradicting our assumption.
Observation 3.10. Any pair of vertices share a P or R-node only if or is a single P or R-node.
3.3 Updates
To insert edges, we first require two restructuring primitives: split and merge. Let be adjacent nodes of the same type and let be an S-node of . Then define
merge( ): Contract the tree edge between and into a new node . Let be the virtual edge representing in their respective skeleton graphs. Then the skeleton of is .
split( ): Pick two disjoint paths of , and . Remove all vertices but the endpoints of and from . This splits into at most 2 disjoint paths. Connect the endpoints of and with virtual edges in , and and create two new S-nodes and with the cycles and as their skeleton. The neighbours of , and are exactly those corresponding to the virtual edges of their skeleton.
The definition of split deviates from Di Battista and Tammasia [BT96], but is equivalent for paths of length 1 or 2. Splitting a node by a neighbouring SPQR-node corresponds to choosing a path equal to the virutal edge connecting it to . Splitting by a vertex of means choosing one of the paths to be this vertex. An example of split can be seen in Fig. 4.
With this, we can now describe how to insert an edge in the SPQR-tree. Let be an edge to be inserted. If some node contains both u and v, the insertion turns out to be relatively simple. If not, we will need to look at , which shall be contracted into a single R-node if u and v are linked. That this is necessary follows from the following lemma.
Lemma 3.11 (Implicit in [BT96]). Let G be a graph with SPQR-tree and let be an edge not in G. Then all pairs of vertices contained in P- and R-nodes on are triconnected in . The connective properties of any vertex not contained in a node of this type are unchanged.
The procedure for inserting an edge into an SPQR tree is as follows.
InsertEdge(u, v): Find and let .
-
If and it is an P or R-node simply insert e into the skeleton. If the node is an S-node, then we split it between u and v and create a new P-node v containing e. The two new S-nodes are both connected to the P-node.
-
If and marks the single edge on , replace this edge connecting with a P-node connected to both.
-
If no node contains both u and v let be their critical path.
(a) Remove all SPQR-tree edges of . In P-nodes, remove the corresponding virtual edge as well.
(b) Merge all R-nodes of into .
(c) Split all internal S-nodes between their neighbours. If an endpoint is an S-node, split it between its path neighbour and either u or v.
(d) Connect the new S-nodes and the old P-nodes to .
(e) If the skeleton of any S- or P-node has edges, merge it into .
What remains now is to describe the subdivision of some edge .
Subdivide . Let be the vertex to be inserted. We use the cases of the critical path; note that the presence of means that case 4 is irrelevant. Let be an S-node containing the cycle with being virtual.
-
If is a single node, that is not a P-node, let be virtual in and connect to . If is an S-node, then insert into the cycle.
-
If is exactly two nodes, replace the edge between them with a P-node and connect said P-node to , and .
-
If is a single P-node, connect to
4 SPQR-trees as heavy path decompositions
In this section, we will use a heavy path decomposition to implement SPQR-trees with worst-case guarantees. The main challenge in this regard will be to prevent InsertEdge from requiring a traversal of . We will do this by reducing edge insertions to a constant amount of heavy path operations and a contract. This reduction is due to Holm and Rotenberg [HR20].
Let be an SPQR-tree represented by a heavy path decomposition with the nodes marked S and P. With each edge we store its marking and a non-negative value. We will represent R-nodes as connected subtrees of nodes connected by edges with non-zero value. The representation of S and P nodes closely resembles the representation discussed in the previous section; however we will defer this to Section 4.3 For now we shall first define a variant of the SPQR-tree.
4.1 Splitting along heavy paths
Recall that during the insertion of an edge, we split each S-node of the critical path by its neighbours and remove up to 3 edges from every P-node. In this section, we will show how to do this during other operations so that relevant nodes are already split when the time comes to insert an edge. We will first formally define how exactly to split each node and then give a mechanism to pre-split all nodes required by any insertion. The choice will essentially follow the cases from the definition of InsertEdge from Section 3 where we let the heavy paths of stand in for the critical path.
Definition 4.1. Let and be vertices of . Let be a rooted relaxed SPQR-tree of represented by a heavy path decomposition. We can expose a vertex of by exposing some node of containing . This makes -exposed. Similarly, we can root at if some node containing is the root of . We say that is rooted at . We refer to and as the selected vertices of .
Definition 4.2. A node u in is primary if it is the root or has a parent of a different type. Otherwise u is secondary.
Definition 4.3. Let be a primary node in a relaxed SPQR tree represented by a heavy path decomposition with the vertex exposed and rooted at . Let the solid degree be the number of solid edges connected to . Then we define up to 2 child groups of as disjoint subsets of the edges of .
- If u is an S-node, we have four possible cases:
(a) If has 2 solid edges and , then the child groups are the (possibly empty) sets of edges between the virtual edges of corresponding to and
(b) If has , is an endpoint of the solid path of the root, and contains either x or y, then the child groups are the edges on either side of the virtual edge corresponding to the solid edge and the aforementioned vertex.
(c) If is the head of a non-root solid path, then its child groups is the set of edges between the virtual edges of its parent and solid child.
(d) If has , is the root and contains both x and y, then the child groups are the edges on either side of x and y.
-
If is a P-node on the root path or has it has at most 1 child group. All the edges that don't correspond to an incident solid edge form the child group of .
-
In all other cases, there is no child group.
A proper child group is a child group with more than 1 edge.
Notice that the child groups of an internal node on a heavy path are exactly the virtual edges that would not be included in when inserting an edge between vertices on either side of the node. We shall now define how we separate and unite the child groups from their primary vertex by redefining split and merge in the context of heavy paths.
Definition 4.4. Let be a node of a relaxed SPQR-tree with a heavy path decomposition. We have two operations:
Split( ): Separate the proper child groups of from and create at most 2 new child nodes of with the proper child groups as skeletons. If any virtual edges are moved, move their corresponding tree-edges to the new children. Connect the new children to with a dashed edge (and insert a virtual edge). If the new children have a heavy child, make the edge between them solid.
Merge( ): Contract to edges to the at most 2 secondary children of into a single node. If any secondary child had a solid edge, make it dashed.
Fig. 4 shows an example of the two operations.
With a way to operate on child groups, we can define which nodes are split at what times and how we maintain this under the heavy path tree operations.
Definition 4.5. A node is splittable if it has a proper child group. A node is mergeable if it has a secondary child.
Lemma 4.6. Given a relaxed x-exposed SPQR-tree rooted at y, the following invariants hold under splits and merges:
(I-1) No node is both splittable and mergeable.
(I-2) Every secondary node is the dashed child of a primary node, and its skeleton is a proper child group of its parent. Every mergeable primary node has at most 1 solid child and at most 2 secondary children.
Furthermore, any such tree can be constructed from a strict SPQR-tree of the same graph by splitting a subset of the splittable nodes.
Proof. In a strict SPQR-tree (I-2) holds trivially. (I-1) holds as no node is secondary and thus no node is mergeable.
Given a relaxed SPQR tree where the invariants hold and a splittable primary node . Splitting makes it mergeable. It is not splittable since all proper child groups were removed by the split. After the split, all edges in a proper child group have been moved to a secondary child, thus ensuring (I-2) for . The parent of is unchanged, as is its solid child. 's dashed children have all changed parents, but as was splittable, they were all primary before the split and thus cause no violations of (I-2). All other nodes are unchanged. Thus split preserves the invariants.
Suppose now that is a mergeable node. By (I-2) is primary and has at most 2 secondary children. After a call to merge, is no longer mergeable; instead, the skeleton of now contains child groups, making primary and splittable. All children of after the merge were by (I-2) primary. Merge does not change this. All other nodes are unchanged. Thus, merge preserves the invariants. To go from a strict SPQR tree to a given relaxed one, use split on the set of mergeable nodes.

(a) Splitting an S-node s with a single selected vertex. The virtual edge with solid endpoints corresponds to the solid edge of s. After the split s has two secondary children, one of which happens to have a heavy child.

(b) Splitting a P-node p with 2 solid edges. After the split p has a single secondary child containing all dashed children of p. One dashed child is heavy and is thus a solid child in the secondary node.
Figure 4: The result of split and merge for the different kinds of SPQR-nodes. The skeletons are drawn immediately next to the nodes. Virtual edges are marked with dashed lines, and non-virtual marked with solid lines.
With this, we see that every strict SPQR-node is represented by at most 3 nodes in our relaxed SPQR-tree, maintaining the linear space complexity. To use our new definition of child groups, we must also be able to freely choose the selected vertices x and y. We introduce two additional operations:
Select : Given a proper heavy path decomposition of and a vertices . Find containing and containing . First expose and reverse to root at . Then conceal the old root and expose . Set to be rooted at and -exposed.
Deselect: Given a v-exposed heavy path decomposition of rooted at u. Return a proper heavy path decomposition without any selected vertices.
Note that these two operations might break (I-2), as they might change the child groups of some nodes. Before fixing this, we shall first define the final form of our SPQR-tree:
Lemma 4.7. Given a u-exposed relaxed SPQR-tree rooted at v satisfying the invariants of Lemma 4.6. There is a corresponding relaxed SPQR-tree that satisfies the same invariants in addition to the following:
(I-3) A primary node is only splittable if it is the child of an R-node.
We call a pre-split SPQR tree of G with selected vertices u and v and the invariants the pre-split invariants.
Proof. Starting with , we obtain the pre-split SPQR tree of G by splitting all the splittable primary vertices. By Lemma 4.6 this preserves (I-1) and (I-2) and establishes (I-3) for all violating primary nodes.
Furthermore, we can also make our new operations respect the new invariant.
Lemma 4.8. We can restore the pre-split invariants after split or merge using a constant amount of additional splits and merges.
Proof. Let be some primary SPQR-node to be split. If is a P-node, then splitting it affects the heavy path of at most one child. However the endpoint of this path must be an S or R-nod and thus in either case, the child groups do no change when adding something to the end of the path. Thus a split of preseves (I-3). If is an S-node then splitting it affects the heavy path of at most two children. If any of these children were a P-node, another split is necessary if they happen to be the heavy child of a new secondary node. This split however does not cascade further. Thus a split of some S-node also preseves (I-3).
After a merge of some node , any of its former secondary children might have had a solid child which is now the endpoint of its solid path. If this is an S-node, its child groups do not change. If this is a P-node, it might necessitate an additional merge, which stops as its children are either S or R-nodes. Thus (I-3) is preseved by merge.
Lemma 4.9. We can restore the pre-split invariants after a select or deselect using at most 2 merges or splits.
Proof. After select or deselect the tree satisfies all but (I-2). Specifically, the endpoints of the root solid path might violate the child group conditions. A merge followed by a split at each end restores the invariants. To see that this is indeed the case, consider the fact that only the child groups of the root path are affected by the choice of selected vertices. Additionally, all internal nodes on the path have solid degree 2 and are thus also unaffected by the choice. The only remaining violators are the endpoints.
With this, we have defined exactly which nodes should be split at what times. What we now need is to also maintain this while the SPQR-tree changes.
4.2 Maintaining a Pre-Split SPQR-tree Under Heavy Path Operations
This section will show how to maintain a pre-split SPQR tree under all heavy path operations. These will later allow us to implement InsertEdge, Subdivide and Triconnected. Recall that expose and conceal only require splice and slice. However, these currently violate the invariants. Suppose that has no selected vertices. We extend them as follows:
Splice( ): If is primary splice as normal and split it. If is secondary, merge and let be the new tail of 's solid path. Execute splice as normal on and split . In both cases, merge the (formerly solid) heavy child of if relevant.
Slice( ): If is primary, splice as normal. If is secondary merge and define as before. Splice as normal and split . Merge and split if relevant.
Lemma 4.10. Splice and slice preserve the pre-split invariants. Assuming that split and merge are worst-case then splice and slice are where is the weight of the solid path of . This does not change the analysis of expose and conceal.
Proof. We first consider splice. After the merge of , the pre-split invariants hold in all but and . Splicing restores the invariants for , but invalidates them for 's solid child. Splitting and its former solid child fixes this. For slice, the merge of also violates the pre-split invariants in only and . Slicing does not fix this, but instead potentially invalidates them in as well. Splitting and and merging fixes this.
The number of merges of splits is clearly bounded, thus the worst-case bound for both operations is unchanged. The analysis of expose and conceal still works; however, we need to argue that splicing instead of does not change the run time. A simple argument is to merge and split around all the dashed parents before changing the colours on the edges. Then expose can proceed normally using time. Finally, do the splits and merges required after the splice and slice. There is also of these.
We will defer the analysis of merge and split to the next section. For now, this result immediately implies the following
Corollary 4.11. Expose and conceal preserve the pre-split invariants and are .
Now that we can freely select and expose vertices and nodes, we can move on to modifying the SPQR-tree using the other heavy path operations.
Lemma 4.12. Given a -exposed pre-split SPQR tree , another pre-split SPQR tree with root node , both without any selected vertices and supposing that and share exactly two vertices which constitute a cut of and are of different types. Then connecting and with a dashed edge doesn't break any invariants. Additionally, this insertion can be done using link-exposed .
Proof. As no vertices are selected in either of the SPQR-trees, we know that and have no child groups and thus the insertion of a dashed edge does not break any invariants in either.
Lemma 4.13. Given a pre-split -exposed SPQR-tree without selected vertices. Then deleting the edge does not violate the pre-split invariants and can be done using cut-exposed( ) and at most 1 merge operation.
Proof. By first exposing , then using cut-exposed on , we delete the edge in question, but now the solid degree has changed and thus (I-2) and (I-3) might be violated. By merging we restore (I-2) and (I-3). The solid degree of all other nodes is unchanged, and thus the other invariants are preserved.
Lemma 4.14. In a pre-split SPQR tree with root r and no selected vertices, reverse(r) does not violate the pre-split invariants.
Proof. (I-1) is unaffected, as reversing a path does not affect the child groups. By (I-2), every node along the root path is primary, and thus the first part of (I-2) is also preserved. Every internal node of the root path both gains and loses a solid child. The root loses a solid child, and the other endpoint of the root path gains one. In all cases, the number of solid children is the same after the reversal. The number of secondary children of all nodes is also unchanged. Thus, we preserve (I-2). The splittability of the internal nodes is unaffected. As no nodes are selected, this is also the case for the endpoints. Thus (I-3) is preserved.
Before explaining how to insert edges in the SPQR-tree, we must first introduce a new operation on the heavy path decomposition.
contract(r): Where r is the root of a heavy path decomposition. Contract the heavy path containing the root into a single R-node.
Due to our choice of representation, the contraction of some heavy path amounts to adding 1 to the value of every edge on the path. This operation can be supported by lazily propagating a token down the search tree storing the heavy path see e.g. [ST83; Als+05].
Observation 4.15. contract(r) can be implemented in .
As contract makes every P and S-node along the heavy root path into a single R-node, we might have invariant violations at each dashed child. In particular all the secondary children of the path are now primary.
Lemma 4.16. contract does not violate the pre-split invariants
Proof. All secondary children of primary nodes on the root path are now themselves primary nodes, which are children of the new R-node. This does not cause any violations of (I-3). (I-1) and (I-2) are both preserved trivially.
4.3 Representing the Pre-split SPQR-tree
With the technical description of the data structure done, we can describe the details of representing the nodes of the pre-split SPQR-tree.
As discussed in Section 2.1, a node of any heavy path decomposition needs to store at least its parent edge and a data structure which keeps track of set of dashed children. The child set should support fast retrieval of heavy children and insertion/deletion in for an instance with total weight W and child c. A P-node has no inherent ordering of the edges and as such, the 'default' representation by way of a weight-ordered biased search tree is sufficient for storing the child set. An S-node on the other hand must keep track of the cyclical ordering of the dashed children imposed by the virtual edges of the skeleton. Let e be the heavy child of some S-node s. e and divides the virutal edges of the skeleton into two paths. We store these in two separate biased binary search tree in the correct cyclical ordering, splitting and concatenating as needed when s changes solid children. With this representation we obtain
Lemma 4.17. We can determine if any node has an adjacent non-zero value in constant time.
Proof. Any node has a parent and at most 1 additional solid incident edge. These can be checked in constant time. All other edges are part of the child set, which is a biased search tree of the edges. By letting every internal node of the search tree keep a bit indicating the presence of a 0-edge in its subtree we can maintain the required information in the root. The bit of any internal node is easily maintained during Insert and Delete.
Lemma 4.18. We can maintain the child groups of S and P-nodes under splice, slice, reverse, link-exposed and cut-exposed without additional asymptotic cost.
Proof. The representation of P-nodes is unchanged, hence we only consider S-nodes. When splicing and slicing the node , its dashed and solid children don't change. This is not the case for . Suppose that we are splicing and has a heavy then. Then do a 3-way concatenate between the left half, and the right half in
Afterwards split this by in
If does not have a heavy child, forego the first step. This is clearly an
extension to splice. The situation is symmetric for slice. To implement reverse, we only need to describe how to reflect the propagation of the lazy reverse bit. This swaps the parent and heavy child of . The child lists of , however, already reflect the split of the dashed edges between these; only the order needs to be swapped. We do this by swapping the two lists and reversing both. link-exposed and cut-exposed simply add or remove a dashed child from the child list. Doing this might require a split followed by a merge, however, only once. This is no slower than linking and cutting in the previous representation, thus the run time is unchanged.
With this, we can analyse merge and split
Lemma 4.19. Merge and split are .
Proof. As the child lists are maintained in splice and slice, merging and splitting become easy. To split a P or S-node , split off each side of the child lists and assign them to new nodes. This also implicitly changes the parent pointer of all dashed children, as they point to an item in the dashed child list of . Then check if the newly created secondary children have a heavy child of their own, if they do add the secondary node to the heavy path and remove the heavy child from the child set. Let c be a secondary child with heavy child h then the running time becomes
Which is constant as h is a heavy child.
We can now move on to the representation of R-nodes. As mentioned previously, these are represented by connected components of edges with positive value. Fortunately, the pre-splitting system does not require R-nodes to transform during splice and slice. However, there are still implementation details to discuss. We will denote an S or P-node with a positive edge as obsolete. The representation of a relaxed SPQR-tree will then only consist of S-nodes, P-nodes, and obsolete nodes. As contract( ) only operates on solid paths, it becomes easy to see that the degree of any obsolete note is at most 4. Thus, an R-node is represented by a network of obsolete nodes of low ( ) degree. The vertices of the R-node will thus be the union of the skeletons of all the obsolete nodes, which poses the question of where to place new adjacent edges to the R-node when e.g. subdividing an edge. We do the following: for each vertex v of G, pick consistently a node of whose skeleton contains the vertex; we call this node the representative of v. This is stored in a simple deterministic logarithmic-access-time dictionary over all vertices, and the representative is picked in an arbitrary but consistent way, say e.g. as the first node to contain the vertex. Consider then the representatives and of the nodes u and v and consider the path . Let be the node containing v closest to and define symmetrically. We call and the -poles of . Note that the path must intersect the critical path for any vertex pair. Note also that through varying potential choices of representative for u and v, if u and v do not share an SPQR-node, then the -poles remain unique.
Now, the 0-valued neighbours of any R-node will either be left over from a contraction in the form of former secondary children attached to some previously split obsolete node or attached later. Observe first that
Observation 4.20. No SPQR-tree operation subdivides a positive edge.
Thus, once both poles are contained in the same R-node, they never change again. Consequently, if we are attaching a new SPQR edge to an R-node, then it must be the only node to contain the marking of the new edge. Thus, the pole-path must be entirely contained in an R-node and these then form a natural placement of the new edge in the R-node. As the skeleton of obsolete nodes is bounded in size by a constant, their total degree is still bounded by a constant, even with these 'extra' edges.
We have now seen that all SPQR-tree operations will rely on the ability to expose the critical path, which we will now show how to find given this representation.
4.4 Finding critical paths
Now to find the critical path of a pair of vertices, we can use the fact that the -poles intersect the path. In particular, if there are nodes shared by u and v, one is guaranteed to be a pole, and if they do not share a node, the poles are exactly the endpoints of the critical path. However, in the first case there might be a neighbouring node also containing u and v that is not on the path between their representatives. This node will be needed in order to distinguish between critical paths of length 1 to 3. The goal of this section will be to enable a heavy path decomposition of our pre-split SPQR-tree to also find such an off-path critical-path edge.
We will use a well-known technique from dynamic trees and use the search tree representation of solid paths and dashed children. As explained in [ST83], we can view each biased search tree as a binary tree over the edges. In particular we can view the biased search tree over a path as a binary tree where each internal node represents the paths of its right and left children, connected an edge which resides in the internal node. By storing auxiliary information in each internal node, such as e.g. the minimum edge on the path, we allow logarithmic time queries about entire paths.
Before computing the actual critical path of some pair of nodes, we first need some definitions.
Definition 4.21. Let be some path of an SPQR-tree . We define the following:
: The number of 0-valued edges on .
: The maximal subpath of starting at the upper endpoint of using only edges marked by
: The maximal subpath of starting at the lower endpoint of using only edges marked by .
We call an obsolete node -relevant if it has a 0-valued -marked child. (Note that any R-node has at most one such node.) For and where consists only of positive edges, we define
: Any -relevant node connected to a node on using only positive -marked edges.
To aid in the computation of we also need relevant extenders, which are defined as follows: Let and be the first and last edges of respectively with markings , and , . Then let
: Any -relevant node connected to using only positive edges.
: Any -relevant node connected to using only positive edges.
Note that for any path , and are empty for all except two vertices of .
Lemma 4.22. It is possible to extend the data structure of Theorem 2.9 to, in each internal node I of the biased search tree, store the following information about the subpath it represents:
• , , , and
• For of non-zero length: , , its lowest 0-valued edge and its endpoints.
• For of non-zero length: , , its highest 0-valued edge and its endpoints.
This information can also be maintained while adding a positive to the entire path.
Proof. If the node is a leaf it does not represent a subpath and the information is trivial to compute. If the node is internal with upper child X, lower child Y and assigned edge e then
and
If e is marked by x then
with this and are easily computed. To find the lowest 0-valued edge of , first check whether the low endpoint of if it is not, the lowest 0-value edge of is inherited from X. Otherwise if is marked by , then the path extends across and into . If then the lowest 0-valued edge is and otherwise it is inherited from Y. The endpoint of is computed in a similar manner. is found symmetrically.
To compute we consider X. If has value 0 or if is positive but does not have the same marking as the first edge, we inherit the value of X. Otherwise check and , if there is no suitable relevant extender, only the endpoints of need to be checked and since both endpoints are obsolete, only a constant number of edges needs to be inspected. will then either be a 0-valued child with a marking matching the first edge of X or the relevant extender of an equally marked positively valued child. is computed symmetrically.
To find we first let and be longest. Then if and , there is a suitable path using only positive edges. We find any relevant nodes connected to it by checking , together with the endpoints of . Now maintain this information under reverse, it is enough to simply swap and , and and . To add a positive to the path we must do a bit of work. The length of paths are unchanged and the number of zeroes on each of them simply becomes zero. If was 0-valued previously, must be recomputed with the same technique as before. If was on then it is no longer relevant, luckily if another 0-valued -marked neighbour exists, it is a neighbour of the former which we can check in constant time. The same is true for .
With this we have enough information at hand to find the critical path of some vertex pair
Lemma 4.23. Let and and . The if has root and is -exposed we can find the endpoints by applying Lemma 4.22 to the heavy paths of
Proof. Let and let and be the lowest and highest endpoints of and respectively. We then have three main cases which can be distinguished by comparing the lengths of and :
(A) is above .
(B) .
(C) is below .
We can now determine the endpoints of the heavy path using Lemma 4.22.
(A) If is above then is empty. This leaves two possibilities, either there is a 0-valued edge on , in which case the endpoints of the critical path is the extremal vertices of the to and closest 0-valued edges. If there are no such 0-valued edges, then the endpoints of and are the -poles and thus either the R-node is the critical path or an off-path 0-valued edge is adopted to one of them and can be found constant time.
(B) If and is not obsolete, then either it has a 0-valued neighbour which also contains u and v and either is the edge between them, the neighbour, or depending on the type of nodes involved. If is obsolete, then it is part of some R-node and R will point to the relevant node containing a 0-valued u, v-edge. If it is not obsolete, then it must be an S-node and thus can only be the -marked neighbour or the edge between them.
(C) If is below there is some subpath of only marked by and . This subpath can contain up to two 0-valued edges, both of which can be found the highest 0-valued edges of and . The endpoints of these determine . If no 0-valued edges exist, this case is identical to the previous case as and are in the same R-node and in this case stores the relevant edge if it exists.
This concludes our proof.
4.5 Implementing SPQR-tree operation
We now show how to implement the operations on our representation of the relaxed SPQR-tree of some graph.
Lemma 4.24. Given a vertices u and v with representatives and and a pre-split SPQR-tree rooted at , we can find and provide a heavy path representing in a constant number of heavy path operations
Proof. The desired result can be achieved by first exposing and then applying Lemma 4.23 to find the endpoint of . If is off-path, conceal and expose instead. This makes a subpath with either or as the lower endpoint. Slicing at the upper and lower endpoints of gives a heavy path with the desired properties.
Lemma 4.25. Given a vertices u and v with representatives and and a pre-split SPQR-tree rooted at , we can support Triconnected(u, v) queries in a constant number of heavy path operations
Proof. We find the critical path and consider the endpoints. If we answer negatively. Otherwise, we check if any node is a P or R-node, in which case we answer positively. Correctness is a direct consequence of Lemma 3.9
Lemma 4.26. Given a a pre-split SPQR-tree, we can support Subdivide(u, v) in a constant number of heavy path operations.
Proof. First, we find . As the edge exists in G, there must be some node that contains both u and v. We go case by case with respect to Definition 3.8. Let be a new S-node with the cycle as its skeleton.
-
If is exactly one vertex, then is solid in . Use the necessary expose and conceals to connect and with link-exposed.
-
If consists of exactly two nodes, then the edge between them is marked by the cut . Remove this edge using cut-vertex and create a new P-node with as the skeleton. Link , , and .
-
If is a single P-node, connect it to using link-exposed and the necessary expose and conceal operations.
We let the representative of x be . The running time is evident as we only use a constant amount of heavy path operations.
We can now describe the insertion of an edge.
Lemma 4.27. Given a vertices u and v with representatives and v and a pre-split SPQR-tree rooted at v, we can support InsertEdge(u, v) in a constant number of heavy path operations.
Proof. This is essentially a direct implementation of the procedure form Section 3. First find , then
-
If is an S-node, select on and relabel the node with a P. The secondary children of are now primary which completes the insertion. If is an R-node, the search for has exposed the relevant obsolete node or the -poles. In the first case, insert the edge here. In the latter case, contract the path by adding 1 to the value of the pole-path.
-
If is a P-node insert in the skeleton.
-
If has exactly two nodes split the heavy path, create a new P-node with as its skeleton, and insert the P-node in between. This takes constant time as the heavy path has only 3 elements.
-
If , make u and v selected, then use contract on the endpoints.
After the insertion use conceal on the lowest endpoint of the heavy path. The first three cases essentially implement the original insertion procedure. That the last case is correct warrants an argument. We go through the procedure and argue that each step is completed.
-
All the edges of are removed as part of contract. The P-nodes have been split in such a way that their secondary children contain all the edges that aren't on the path
-
All of the R-nodes have no child groups and can thus be merged into the new R-node.
-
All internal S-nodes have child groups corresponding to the split between their neighbours, and thus their secondary children correspond (almost) exactly to the result of a split. In the endpoints of the root path, the child groups also correspond to splitting by the path neighbour and u or v. The only mismatch between the proper child groups and the result of a split is the possibility of children with k < 3 edges, as these are by definition not proper. These are treated in case 5.
-
The S-nodes and P-nodes in question exist as dashed secondary children of the path and are thus, after contraction, already connected to .
-
This step would correspond to merging all child groups with fewer than 3 edges. By categorically excluding child groups with this property, we ensure that this has, in a sense, already happened.
The running time is evident as we use a constant amount of heavy path operations.
By letting all vertices have unit-weight, we obtain
Theorem 1. There is a data structure, which maintains a biconnected graph G in linear space, while supporting the operations InsertVertex and InsertEdge in deterministic worst-case time and answers Triconnected in deterministic worst-case time.
In addition to this, we have the following extensions
Lemma 4.28. Given a relaxed SPQR-tree, where some edge has just been inserted, we can remove said edge in time.
Proof. As the insertion of an edge only creates changes, we can simply store a log of the memory operations used to insert the edge, which can then be used to bring the data structure back to the previous state when required.
Lemma 4.29. It is possible to maintain an SPQR-tree, rooted at an S-node which supports split, merge and insert in time.
Proof. The representation of the child set of an S-node directly allows this.
We can now use the construction by Holm and Rotenberg (see [HR20] Section 5) to maintain a block-cut tree of a general graph G, which supports all operations worst-case calls to the SPQR-tree operations above. This construction uses the same building blocks as the pre-split SPQR-tree, and represents each block of the block-cut tree as an SPQR-tree. Every heavy path then simulates an edge between the extremal blocks, which allows fast insertion of such an edge once the blocks of its endpoints have been exposed. This yields
Corollary 2. There is a data structure, which maintains a graph on vertices in linear space, while supporting the operations InsertVertex and InsertEdge in deterministic worst-case time and answers Triconnected in deterministic worst-case time.
5 Conclusion and Open Problems
We have described a data structure which maintains a biconnected graph while supporting triconnectivity queries, edge insertion and subdivision in worst-case time. The data structure does this by maintaining a representation of the SPQR-tree of the underlying graph, which is at all times ready to insert an edge with only a logarithmic number of changes to the tree. Plugging our result into the construction of Holm and Rotenberg [HR20] then gives an algorithm for incremental triconnectivity in general graphs in worst-case time per query and operation, improving the previous upper bound to .
Our result for biconnected graphs comes within a factor of the cell-probe incremental connectivity lower bound [FS89], and thus, a natural open problem is whether there exists an algorithm which matches this lower bound for biconnected graphs. Another open problem is the existence of an algorithm for triconnectivity in general graphs analogous to the upper bound for biconnectivity [PW98]. In the fully dynamic setting, there is still no known data structure with polylogarithmic update- and query time, that can answer triconnectivity queries between vertex pairs.
6 Declaration of AI Usage
All ideas, proofs and text were written by the authors without the use of AI. Claude Opus 5.5 has been used throughout this final manuscript for minor editing and phrasing tasks.
References
[Ade+26] Felix Adena, Monika Henzinger, Christoph Kern and Daniel Rutschmann. 'Incremental Exact Vertex Connectivity'. In: CoRR (2026).
[ABR99] Stephen Alstrup, Amir M. Ben-Amram and Theis Rauhe. 'Worst-Case and Amortised Optimality in Union-Find (Extended Abstract)'. In: Proceedings of the Thirty-First Annual ACM Symposium on Theory of Computing, May 1-4, 1999, Atlanta, Georgia, USA. Ed. by Jeffrey S. Vitter, Lawrence L. Larmore and Frank T. Leighton. ACM, 1999, pp. 499–506. doi: 10.1145/301250.301383.
[Als+05] Stephen Alstrup, Jacob Holm, Kristian de Lichtenberg and Mikkel Thorup. 'Maintaining information in fully dynamic trees with top trees'. In: ACM Trans. Algorithms 1.2 (2005), pp. 243–264. doi: 10.1145/1103963.1103966.
[BT96] G. Battista and R. Tamassia. 'On-line maintenance of triconnected components with SPQR-trees'. In: Algorithmica 15.4 (Apr. 1996), pp. 302–318. doi: 10.1007/BF01961541.
[BST85] Samuel W. Bent, Daniel D. Sleator and Robert E. Tarjan. 'Biased Search Trees'. In: SIAM Journal on Computing 14.3 (Aug. 1985), pp. 545–568. doi: 10.1137/0214037.
[Blu86] Norbert Blum. 'On the Single-Operation Worst-Case Time Complexity of the Disjoint Set Union Problem'. In: SIAM J. Comput. 15.4 (1986), pp. 1021–1024. doi: 10.1137/0215072.
[BP25] Romain Bourneuf and Tim Planken. 'A Structural Linear-Time Algorithm for Computing the Tutte Decomposition'. In: CoRR abs/2508.06212 (2025). doi: 10.48550/ARXIV.2508.06212. arXiv: 2508.06212.
[Chu+20] Julia Chuzhoy, Yu Gao, Jason Li, Danupon Nanongkai, Richard Peng and Thatchaphol Saranurak. 'A Deterministic Algorithm for Balanced Cut with Applications to Dynamic Connectivity, Flows, and Beyond'. In: 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020. Ed. by Sandy Irani. IEEE, 2020, pp. 1158–1167. doi: 10.1109/FOCS46700.2020.00111.
[Epp03] David Eppstein. 'Dynamic Generators of Topologically Embedded Graphs'. In: Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms. SODA '03. Baltimore, Maryland: Society for Industrial and Applied Mathematics, 2003, pp. 599–608.
[Epp+97] David Eppstein, Zvi Galil, Giuseppe F. Italiano and Amnon Nissenzweig. 'Sparsification—A Technique For Speeding Up Dynamic Graph Algorithms'. In: Journal of the ACM 44.5 (Sept. 1997), pp. 669–696. doi: 10.1145/265910.265914.
[Epp+99] David Eppstein, Zvi Galil, Giuseppe F. Italiano and Thomas H. Spencer. 'Separator-Based Sparsification II: Edge and Vertex Connectivity'. In: SIAM Journal on Computing 28.1 (Feb. 1999), pp. 341–381. doi: 10.1137/S0097539794269072.
[Fre85] Greg N. Frederickson. 'Data Structures for On-Line Updating of Minimum Spanning Trees, with Applications'. In: SIAM Journal on Computing 14.4 (1985), pp. 781–798. doi: 10.1137/0214055.
[Fre97] Greg N. Frederickson. 'Ambivalent Data Structures for Dynamic 2-Edge-Connectivity and k Smallest Spanning Trees'. In: SIAM Journal on Computing 26.2 (1997), pp. 484–538. doi: 10.1137/S0097539792226825.
[FS89] Michael L. Fredman and Michael E. Saks. 'The Cell Probe Complexity of Dynamic Data Structures'. In: Proceedings of the 21st Annual ACM Symposium on Theory of Computing, May 14-17, 1989, Seattle, Washington, USA. Ed. by David S. Johnson. ACM, 1989, pp. 345–354. doi: 10.1145/73007.73040.
[GM00] Carsten Gutwenger and Petra Mutzel. 'A Linear Time Implementation of SPQR-Trees'. In: Graph Drawing, 8th International Symposium, GD 2000, Colonial Williamsburg, VA, USA, September 20-23, 2000, Proceedings. Ed. by Joe Marks. Vol. 1984. Lecture Notes in Computer Science. Springer, 2000, pp. 77–90. doi: 10.1007/3-540-44541-2_8.
[HK99] Monika R. Henzinger and Valerie King. 'Randomized Fully Dynamic Graph Algorithms with Polylogarithmic Time per Operation'. In: J. ACM 46.4 (1999), pp. 502–516. doi: 10.1145/320211.320215.
[HL95] Monika R. Henzinger and Han La Poutré. 'Certificates and fast algorithms for biconnectivity in fully-dynamic graphs'. In: Algorithms — ESA '95. Ed. by Paul Spirakis. Berlin, Heidelberg: Springer Berlin Heidelberg, 1995, pp. 171–184.
[Hen95] Monika Rauch Henzinger. 'Fully Dynamic Biconnectivity in Graphs'. In: Algorithmica 13.6 (1995), pp. 503–538. doi: 10.1007/BF01189067.
[Hen00] Monika Rauch Henzinger. 'Improved Data Structures for Fully Dynamic Biconnectivity'. In: SIAM J. Comput. 29.6 (2000), pp. 1761–1815. doi: 10.1137/S0097539794263907.
[HK97] Monika Rauch Henzinger and Valerie King. Fully Dynamic 2-Edge Connectivity Algorithm in Polylogarithmic Time per Operation. 1997.
[HT97] Monika Rauch Henzinger and Mikkel Thorup. 'Sampling to provide or to bound: With applications to fully dynamic graph algorithms'. In: Random Struct. Algorithms 11.4 (1997), pp. 369–379. doi: 10.1002/(SICI)1098-2418(199712)11:4<369::AID-RSA5>3.0.CO;2-X.
[Hol+18] Jacob Holm, Giuseppe F. Italiano, Adam Karczmarz, Jakub Lacki and Eva Rotenberg. 'Decremental SPQR-trees for planar graphs'. In: 26th European Symposium on Algorithms, ESA 2018. Leibniz International Proceedings in Informatics, LIPIcs. Aug. 2018. doi: 10.4230/LIPIcs.ESA.2018.46.
[HLT01] Jacob Holm, Kristian de Lichtenberg and Mikkel Thorup. 'Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity'. In: J. ACM 48.4 (2001), pp. 723–760. doi: 10.1145/502090.502095.
[HR20] Jacob Holm and Eva Rotenberg. 'Worst-Case Polylog Incremental SPQR-trees: Embeddings, Planarity, and Triconnectivity'. In: Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms, SODA 2020, Salt Lake City, UT, USA, January 5-8, 2020. Ed. by Shuchi Chawla. SIAM, 2020, pp. 2378–2397. doi: 10.1137/1.9781611975994.146.
[HR21] Jacob Holm and Eva Rotenberg. 'Good r-Divisions Imply Optimal Amortized Decremental Biconnectivity'. In: 38th International Symposium on Theoretical Aspects of Computer Science, STACS 2021, March 16-19, 2021, Saarbrücken, Germany (Virtual Conference). Ed. by Markus Bläser and Benjamin Monmege. Vol. 187. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021, 42:1–42:18. doi: 10.4230/LIPIcs.STACS.2021.42.
[HR24] Jacob Holm and Eva Rotenberg. 'Good r-divisions Imply Optimal Amortized Decremental Biconnectivity'. In: Theory Comput. Syst. 68.4 (2024), pp. 1014–1048. doi: 10.1007/S00224-024-10181-Z.
[HRT18] Jacob Holm, Eva Rotenberg and Mikkel Thorup. 'Dynamic Bridge-Finding in Amortized Time'. In: Proceedings of the 2018 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM, 2018, pp. 35–52. doi: 10.1137/1.9781611975031.3.
[HvR23] Jacob Holm, Ivor van der Hoog and Eva Rotenberg. 'Worst-Case Deterministic Fully-Dynamic Biconnectivity in Changeable Planar Embeddings'. In: 39th International Symposium on Computational Geometry, SoCG 2023, June 12-15, 2023, Dallas, Texas, USA. Ed. by Erin W. Chambers and Joachim Gudmundsson. Vol. 258. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023, 40:1–40:18. doi: 10.4230/LIPICS.SOCG.2023.40.
[HT73] John E. Hopcroft and Robert Endre Tarjan. 'Dividing a Graph into Triconnected Components'. In: SIAM J. Comput. 2 (1973), pp. 135–158.
[Hua+17] Shang-En Huang, Dawei Huang, Tsvi Kopelowitz and Seth Pettie. 'Fully Dynamic Connectivity in Amortized Expected Time'. In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19. 2017, pp. 510–520. doi: 10.1137/1.9781611974782.32.
[KKM13] Bruce M. Kapron, Valerie King and Ben Mountjoy. 'Dynamic Graph Connectivity in Polylogarithmic Worst Case Time'. In: Proceedings of the Twenty-fourth Annual ACM-SIAM Symposium on Discrete Algorithms. SODA '13. New Orleans, Louisiana: Society for Industrial and Applied Mathematics, 2013, pp. 1131–1142.
[Mac37] Saunders Mac Lane. ‘A structural characterization of planar combinatorial graphs’. In: Duke Math. J. 3.3 (Sept. 1937), pp. 460–472. DOI: 10.1215/S0012-7094-37-00336-3.
[Men27] Karl Menger. ‘Zur allgemeinen Kurventheorie’. ger. In: Fundamenta Mathematicae 10.1 (1927), pp. 96–115. DOI: 10.4064/FM-10-1-96-115.
[PD06] Mihai Pătrașcu and Erik D. Demaine. ‘Logarithmic lower bounds in the cell-probe model’. In: SIAM Journal on Computing 35.4 (2006), pp. 932–963.
[PW98] Johannes A. La Poutré and Jeffery R. Westbrook. 'Dynamic 2-Connectivity with Backtracking'. In: SIAM J. Comput. 28.1 (1998), pp. 10–26. DOI: 10.1137/S0097539794272582.
[Rau92] Monika Rauch. 'Fully Dynamic Biconnectivity in Graphs'. In: 33rd Annual Symposium on Foundations of Computer Science, Pittsburgh, Pennsylvania, USA, October 24-27, 1992. IEEE Computer Society, 1992, pp. 50–59. DOI: 10.1109/SFCS.1992.267819.
[Rau94] Monika Rauch. 'Improved data structures for fully dynamic biconnectivity'. In: Proceedings of the Twenty-Sixth Annual ACM Symposium on Theory of Computing, 23-25 May 1994, Montréal, Québec, Canada. Ed. by Frank Thomson Leighton and Michael T. Goodrich. ACM, 1994, pp. 686–695. DOI: 10.1145/195058.195434.
[ST83] Daniel D. Sleator and Robert E. Tarjan. 'A Data Structure for Dynamic Trees'. In: Journal of Computer and System Sciences 26.3 (1983), pp. 362–391. DOI: 10.1016/0022-0000(83)90006-5.
[ST85] Daniel D. Sleator and Robert E. Tarjan. 'Self-Adjusting Binary Search Trees'. In: J. ACM 32.3 (1985), pp. 652–686. DOI: 10.1145/3828.3835.
[Tar75] Robert E. Tarjan. 'Efficiency of a Good But Not Linear Set Union Algorithm'. In: Journal of the ACM 22.2 (Apr. 1975), pp. 215–225. DOI: 10.1145/321879.321884.
[Tar79] Robert Endre Tarjan. 'A Class of Algorithms which Require Nonlinear Time to Maintain Disjoint Sets'. In: J. Comput. Syst. Sci. 18.2 (1979), pp. 110–127. DOI: 10.1016/0022-0000(79)90042-4.
[Tho00] Mikkel Thorup. 'Near-optimal fully-dynamic graph connectivity'. In: Proceedings of the Thirty-Second Annual ACM Symposium on Theory of Computing, May 21-23, 2000, Portland, OR, USA. Ed. by F. Frances Yao and Eugene M. Luks. ACM, 2000, pp. 343–350. DOI: 10.1145/335305.335345.
[Tut66] William T. Tutte. Connectivity in Graphs. University of Toronto Press, 1966.
[WT92] Jeffery R. Westbrook and Robert Endre Tarjan. 'Maintaining Bridge-Connected and Biconnected Components On-Line'. In: Algorithmica 7.5&6 (1992), pp. 433–464. DOI: 10.1007/BF01758773.
[Whi32] Hassler Whitney. 'Non-separable and planar graphs'. In: Transactions of the American Mathematical Society 34.2 (1932), pp. 339–362. DOI: 10.1090/S0002-9947-1932-1501641-2.
[Wul16] Christian Wulff-Nilsen. 'Faster Deterministic Fully-Dynamic Graph Connectivity'. In: Encyclopedia of Algorithms. Berlin, Heidelberg: Springer Berlin Heidelberg, 2016, pp. 738–741.