Fast Decremental Tree Sums in Forests
Abstract
We study two fundamental decremental dynamic graph problems. In both problems, we need to maintain a vertex-weighted forest of size under edge deletions, weight updates, and a certain information-retrieval query. Both problems can be solved in time per update/query using standard dynamic forest data structures like top trees – even if additionally edge insertions are allowed. We investigate whether the deletion-only problem can be solved faster.
First, we consider tree-sum queries, where we ask for the sum of vertex weights in one of the connected components (i.e., trees) in the forest. We give a data structure with preprocessing time and time per operation, based on a micro-macro tree decomposition (Alstrup et al., 1997). If the forest is unweighted (i.e., all weights are 1 and cannot be changed), then the operation time can be improved to .
Additionally, we give an asymptotically universally optimal algorithm. More specifically, our algorithm works in the group model, and processes operations on an initial forest in running time . Here is the number of weight additions and subtractions that a best possible algorithm performs to handle a worst-case instance for a fixed initial forest and a fixed number of operations. We achieve this with a combination of the aforementioned decomposition technique, precomputation of optimal data structures for very small instances, and some insights into the behavior of . Note that even the worst-case complexity of this algorithm remains unknown to us.
Second, we consider subtree-sum queries. Here, the forest is rooted, and a query returns the sum of weights in the subtree rooted at . An easy reduction from the well-known prefix sum problem shows that the general, weighted version of the problem requires time for operations. Interestingly, we prove that the complexity lower bound still holds even if weight updates are disallowed. On the other hand, we show that the unweighted version can be solved with time per operation, and this is tight.
Keywords and phrases:
dynamic graphs, connectivity, group model, universal optimalityCategory:
Track A: Algorithms, Complexity and GamesCopyright and License:
2012 ACM Subject Classification:
Theory of computation Dynamic graph algorithmsEditors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Maintaining connectivity in dynamic graphs is one of the fundamental problems in the design of algorithms, with a plethora of major results in the area throughout the decades. An efficient data structure maintaining connectivity in dynamic forests was given by Sleator and Tarjan [31]: Their link/cut trees support connectivity queries under edge insertions and removals in an -vertex forest in time. They also show that their data structure supports weights of vertices and various queries related to these weights in the same time complexity, such as the sum of weights of vertices in a tree component containing a given vertex, or the sum of weights of vertices in a subtree rooted at a specified vertex. The optimality of this data structure – even in the unweighted setting – was only shown much later by Pătraşcu and Demaine [28]. In the more general setting of arbitrary dynamic graphs, the asymptotic behavior of an optimal data structure is still not fully understood, with the currently best algorithm of Huang et al. [23] being a factor of away from the logarithmic lower bound.
Aiming to break through the logarithmic operation lower bound, we may decide to restrict the space of possible updates to the graph. The incremental setting, in which edges may only be inserted to the graph, is precisely the disjoint set union problem, which was already studied by Galler and Fischer [18] and subsequently improved: Hopcroft and Ullman gave a data structure supporting insertions and connectivity queries in time per operation [22], with the complexity analysis later refined by Tarjan to per operation [32]. Here, and denote two very slow-growing functions, namely the iterated logarithm and the inverse Ackermann function. Again, the presented data structures can be easily adapted to support weights of vertices and report aggregate information on the connected components of the graphs. The bound of was later shown to be optimal in various computational models by Tarjan [33] and Fredman and Saks [14], even under the promise that the graph always remains a forest.
In this work, we focus on the decremental setting, where a data structure is given an initial graph and edges may only be removed from the graph. This restriction has also received considerable attention over the years, and the decremental connectivity problem has been solved optimally: A data structure processing operations in an -vertex forest in total time was given by Alstrup, Secher and Spork [4], with the result later strengthened to planar graphs by Łącki and Sankowski [25]. However, interestingly, even the decremental forest data structure employs various bit-optimization tricks to achieve the optimal time complexity, which renders it unable to handle weights of vertices efficiently. This suggests a natural question: How efficiently could we implement a data structure for weighted decremental forests that can also report summaries of tree components – such as the sum of the weights of the vertices in the component – dynamically? And can such a data structure also handle more complex queries, such as the sum of the weights of the vertices in a rooted subtree of a specified tree component?
Setting.
We now formally introduce the problem. The task is to maintain a vertex-weighted rooted forest , where weights come from some commutative group , under some or all of the following operations:
-
: Delete the edge between and its parent (we assert that this edge exists).
-
: Set .
-
: Return the sum of weights in the tree containing .
-
: Return the sum of weights in the subtree rooted at .
We are mostly interested in the group model of computation, where the weights of the vertices are considered to be opaque objects. The implementation of a data structure may manipulate the weights (elements of the group) by adding them together or subtracting one from another, but no other operations – such as comparisons or the extraction of the representation of the weight in memory – are allowed.
All operations listed above can be implemented in worst-case time in the group model with well-known efficient fully dynamic forest data structures such as aforementioned link/cut trees [31] or top trees [2], so any sequence of operations can be processed in time. The question remains: Can (some or all) of the operations above be implemented more efficiently, knowing that the edges may only be removed from the forest?
1.1 Results and techniques
In the following, we formally present our results and give basic ideas on how to prove them. In the informal discussion following each result, we will assume for convenience that the number of operations is roughly equal to the number of vertices in the input forest. Thus the running times in the discussion will always be the total of the initialization time and the time required to process all operations. We will also assume the forest given initially is a tree.
Tree-sums with recursive cluster decompositions.
Our first result concerns the basic tree-sum problem.
Theorem 1.1.
There is a data structure that maintains a weighted rooted forest on vertices under cut, update-weight, and tree-sum, with running time for operations.
We prove Theorem 1.1 in Section 3 using the well-known technique of micro-macro decomposition (defined in [4], though similar ideas already exist in [17]), although we adapt it to our purposes and call it cluster decomposition. Here, we define this decomposition for rooted trees, which simplifies the presentation considerably. The basic idea is to partition the input tree into clusters, each of size , and contract each of these parts into either a single vertex or two vertices connected by an edge to obtain a cluster tree of size .
Recall a basic algorithm; call it . An algorithm can be obtained as follows: Construct the cluster tree in linear time, run on this cluster tree, and the same algorithm on each cluster. The running time for the cluster tree algorithm is , and the running time for each cluster with vertices is , for a total of . This approach can be iterated: an algorithm is implemented the same way, only that is used for each of the clusters. Iterating this approach times gives an algorithm with “levels”, each of which takes time in total; thus, the total running time of is .
Of course, the above presentation is heavily simplified. We will note one interesting detail. Performing a cut within a cluster may affect the weights stored in the cluster tree, necessitating an update-weight operation on the cluster tree. Hence, the number of operations in the cluster tree can be , instead of , as we assumed above. The solution to this is to use an algorithm where each update-weight operation takes only time (whereas cuts each take amortized time). Note that standard dynamic tree solutions require per operation, and thus are not suitable for this purpose. Instead, we design a simple decremental-only algorithm with this property.
Unweighted and 0-1-weighted tree-sums.
For unweighted forests, we can improve the above algorithm (Section 4). In fact, our solution works when the weight function only takes values zero and one.111The underlying group is the set of integers, so if all weights are one, we recover the unweighted tree-sum problem.
Theorem 1.2.
There is a data structure in the Word RAM model of computation that maintains a 0-1-weighted rooted forest with vertices under cut, update-weight and tree-sum operations, in time for operations.
We describe the algorithm for the unweighted case. The idea is to apply the cluster decomposition above only twice; then the bottom-level clusters form a decomposition of the input tree into small trees of size at most . Note that the number of distinct (labeled) trees of size at most is no more than . Thus, we can essentially precompute all answers for every possible such tree, and then do a lookup for each cluster.
This technique is commonly used in algorithm design [5, 10, 6, 7]. For a data structure this is not quite as straightforward, since the queries are not known at the beginning. Still, we can compute something akin to a state graph that stores all necessary information, and can be navigated efficiently.
An optimal weighted tree-sum algorithm.
We can take the idea of precomputation even further (Section 5), based on a technique of precomputing decision trees used by Pettie and Ramachandran [29] (also see e.g. [26, 27] for different applications of this approach). Perform the cluster decomposition three times, obtaining trees of size at most . For these very small trees, we can precompute the optimal data structure in time . If is the optimal total running time for operations on a forest with vertices, then our algorithm has running time
where is the number of vertices in the th cluster, and is the number of operations applied to that cluster. Note that and .
With some effort (Section 5.1), we can argue that the above formula is upper bounded by , since the function satisfies a weak, asymptotic form of super-additivity: for any pair of positive integer sequences , . Interestingly, even this weak variant of super-additivity is quite challenging to prove. The proof proceeds via a series of reductions involving data structures for tree-sum that are initialized with forests with zero weights. The rationale is that – the function denoting the optimal total running time for operations on a zero-initialized forest with vertices – can be directly shown to be super-additive, i.e., .
We finally obtain
Theorem 1.3.
There exists a data structure with running time for any forest on vertices and any sequence of operations.
Note that our data structure is as fast (up to constant) as any other data structure, even if the latter has and hard-coded into it. It turns out we can prove something even stronger: Our data structure is optimal even compared to other data structures with a hard-coded initial forest . For such data structures, the only non-hard-coded parts of the input are the initial weights and the sequence of operations. This is precisely the notion of universal optimality, popularized by works of Haeupler, Wajc, and Zuzic [21] and Haeupler, Hladík, Rozhon, Tarjan, and Tetek [20], and we adopt it here as well. Universally optimal algorithms have been recently studied for various static problems, such as Single-Source Shortest Paths [21, 20, 36], planar convex hull [1, 34] and sorting [19, 35]. A recent work of the first author presents a universally optimal data structure for the related tree-min problem [9].
We now discuss some details of Theorem 1.3, in particular in comparison with Pettie and Ramachandran’s famous optimal minimum spanning tree (MST) algorithm [29]. They similarly reduce a large instance to many smaller instances, though their reduction is much more complex. On the other hand, for them, computing the optimal algorithm for small instances is quite straightforward, since every MST algorithm in the comparison model can be represented as a decision tree. Thus, they only need to enumerate all decision trees for the given small graph, and choose the best correct one.
In contrast, the tree-sum problem is an online problem in the group model, which presents some interesting challenges. For example, testing correctness of a decision tree computing the MST of a static -vertex graph is easy (just check all possible graphs, and for each graph, all possible input weight orders), but testing correctness of an algorithm (or a data structure) in the group model is harder. Another interesting problem is that the number operations applied to a single cluster is initially unknown, and can be much larger than the size of the cluster. Dealing with these problems requires some new insights.222In a different paper, Pettie and Ramachandran also give a provably optimal algorithm for an online data structure problem [30, Appendix B]. This is in the comparison model, so some of our challenges do not apply. Additionally, there appears to be an error in that paper that hides some of the complexity; see the full paper for a discussion.
Finally, Pettie and Ramachandran note that an explicit provably optimal algorithm for MST was actually known before. An argument of Jones [24] transforms any optimal verification algorithm for a computational problem (which is known for MST) into an optimal algorithm. Interestingly, Jones’s argument does not work for the online data structure problems like ours. Thus, our optimality result in itself is novel. In any case, this approach yields massive constants in the running time and does not imply anything about the decision tree complexity of MST. In contrast, the running time of Pettie and Ramachandran’s algorithm matches the decision tree complexity. Theorem 1.3 similarly matches the optimal number of additions and subtractions, up to constant factors. That means that any algorithm that only performs a linear number of additions and subtractions in total (with arbitrary running time) implies a data structure with linear total running time.
Subtree-sums.
Finally, we consider the harder subtree-sum problem. In its full generality, with support for subtree-sum, update-weight, and cut, it is a generalization of the well-known partial-sum problem [8, 11, 13, 15, 14, 37]. In the partial-sum problem, we are tasked to maintain an array of weights under the operations of computing the sum of a prefix and changing an entry. Clearly, we can interpret the array as a degenerate path-like rooted tree. Then partial sums are subtree-sum operations and entry changes are update-weight operations (cut operations are not used). For the partial-sum problem, an lower bound was shown by Pătraşcu and Demaine [28], so we have:
Observation 1.4.
Each data structure that maintains a weighted forest with vertices under the operations subtree-sum and update-weight requires time for operations, even in the Word RAM model of computation and assuming .
Much more interesting is the case where we do not allow update-weight operations, only subtree-sum and cut. In Section 6, we show a randomized reduction from the lower bound of [28], asserting the lower bound in this restricted setting:
Theorem 1.5.
Each data structure that maintains a weighted forest with vertices under the operations subtree-sum and cut requires time for operations in the Word RAM model of computation and assuming .
On a high level, we design a hard instance for the problem as follows. We show that the lower bound of Pătraşcu and Demaine also holds under the assumption that the underlying array contains integers ranging from to , with each element of the array updated times. The weighted forest in our proof consists then of a spine of vertices – each representing an element of the array – with leaves of various weights attached to each vertex of the spine, so that a partial sum of initial elements of the array can be inferred from the subtree-sum of the subtree rooted at the th vertex of the spine. We also show a Las Vegas randomized subroutine that efficiently translates an update of the th element of the array to a sequence of cuts of leaves that are still attached to the th vertex of the spine. This way, any sequence of operations in a partial-sum data structure is interpreted as a sequence of operations in the subtree-sum structure, and the lower bound for the former implies the same lower bound for the latter.
With ˜1.4 and 1.5 in mind, we study the unweighted variant of the problem (or, more precisely, the 0-1-weighted variant with no weight updates). Here, we are able to obtain an improved (amortized) running time of per operation (Section 7.2). Again, we state the slightly more general case of 0-1 weights:
Theorem 1.6.
There is a data structure in the Word RAM model maintaining a 0-1-weighted forest with vertices under the operations subtree-sum and cut, with total time for operations.
Theorem 1.6 again uses recursive cluster decompositions, but with larger clusters: Instead of clusters of size , we use roughly clusters of size . Recursively applying this decomposition until clusters have constant size yields a decomposition of depth . Each cluster tree obtained in this process has size at most , which notably implies that it can be encoded with bits, which fits into a single word. This allows us to combine a delayed-updating technique of Dietz [11] with some precomputation to obtain a fast data structure for these very small cluster trees.
Note that the paper of Dietz [11] cited above solves a variant of our problem where the initial tree is a 0-1-weighted path updated by update-weight rather than cut, with the same total time; this data structure is known to be optimal due to Fredman and Saks [14]. On the other hand, the path variant of Theorem 1.6 (reporting subtree-sums in an unweighted or 0-1-weighted path with vertices updated by cut) is much easier – it can be solved in time, e.g. via a reduction to the marked ancestor problem [3]. In contrast, we show in Section 7.1 that for general forests, our problem is as hard as the path variant with weight updates.
Theorem 1.7.
Each data structure in the Word RAM model that maintains an unweighted forest with vertices under the operations subtree-sum and cut requires time for operations.
In other words, the data structure of Theorem 1.6 is asymptotically optimal.
1.2 Outlook to the offline setting
We can consider the decremental tree-sum problem in an offline setting, where the entire sequence of operations is provided to the algorithm together with the initial weighted -vertex forest at the time of initialization. It turns out that the offline variant of the problem can be solved in time: Simulating the sequence of operations backwards, we reduce tree-sum to the incremental variant – that is, the disjoint set union problem – where the merge forest (the forest containing an edge for every merge of sets containing vertices and ) is known in advance. This simplified variant of the problem is solvable in linear time in the Word RAM model by a data structure of Gabow and Tarjan [17]. Moreover, reporting tree-sums requires additionally only operations in the group : Whenever two sets (i.e., vertex sets of two tree components of a forest) are merged, the tree sum of the resulting tree components is simply the sum of the tree sums of the components being merged.
This discussion unveils an interesting phenomenon: In the online incremental setting of tree-sum, it is the maintenance of connected tree components that is strictly more computationally expensive (requiring on average time per edge insertion) than the additional bookkeeping of the tree sums ( time per insertion). However, the opposite appears to be the case in the decremental setting: The tree components can be maintained in amortized constant time per edge removal, but it is not clear at all whether tree sums can be tracked this efficiently.
2 Preliminaries
For , define . All logarithms in this work are binary, unless specified otherwise. For convenience, assume that for all . Then for , we define the -fold logarithmic function : and for . Finally, the iterated logarithm, , is defined as the smallest such that .
All trees and forests in this work are rooted. In a tree and vertices and , we say that is an ancestor of if lies on the unique path from the root of to . In this case, we also say that is a descendant of . Strict ancestors and descendants are defined analogously, only that we additionally require that . For a tree and its vertex , we denote by the subtree of rooted at , i.e., the subtree induced by all descendants of . The depth of a vertex , denoted by , is its distance to the root (0 for the root itself), and the height of is the maximum depth of a vertex.
We assume the standard Word RAM model of computation with memory cells (words or registers) of size [16]. Formally, the memory is represented by an array of -bit integers, with access to standard arithmetic and bitwise operations, as well as comparisons and indirect accesses (of the form ). Each such access takes constant time.
Most of the algorithms in this paper work in the group model. In this model, some memory cells may contain – instead of a -bit integer – an element of a commutative group . The elements of can be manipulated in constant time via addition and subtraction, and the comparisons between the elements of (including the zero-comparisons of the elements of ) are disallowed. In particular, it is forbidden to examine or modify the memory representation of any memory cell containing an element of . The weights of vertices of come from the group . For convenience, we will denote by the memory cell occupied by the current weight of a vertex .
If is a forest with a weight function , then for we define . Similarly, if is a (sub)tree of , then . If , then we denote by the subgraph of induced by , and by the restriction of the weight function to the vertices in .
Decremental connectivity.
Our data structures rely heavily on the Word RAM data structures supporting connectivity queries in decremental forests. Such a data structure, when initialized with a forest , supports the following updates and queries:
-
: Delete the edge between and its parent (we assert that this edge exists).
-
: Return the root of the tree containing .
-
: Indicate whether and are in the same component of .
-
: Indicate whether is an ancestor of in (which implies they are connected).
As mentioned before, in the Word RAM model, there exists a linear-time data structure for decremental connectivity of forests supporting cut and root [4]. It is easily adapted to our needs (see the full version for a proof).
Lemma 2.1 ([4]).
There is a Word RAM data structure that maintains a forest with vertices, and supports cut, root, connected, and ancestor in time for operations.
Binarization and auxiliary vertices.
In our algorithms, it will be convenient to transform the input trees into binary trees, in which each vertex has at most two children. It is well-known that this can be done by transforming high-degree vertices into binary trees, which introduces a linear number of additional vertices. For most applications, the fact that the number of vertices increases by only a constant factor is sufficient to retain desired running times. However, for our optimal algorithm in Section 5, inserting additional vertices causes technical problems. To address this, we introduce the concept of auxiliary vertices.
Let be the input forest for one of our data structures. If a vertex in is marked as auxiliary, then no operations may be applied to (e.g., and are illegal). Moreover, if a weight function is associated to , then . In the interest of brevity, we still write just for a forest with auxiliary vertices; it will be made clear at the start of each relevant section whether algorithms allow auxiliary vertices or not.
Using auxiliary vertices, we can transform any forest into a binary forest that is equivalent for our data structure problems.
Theorem 2.2.
Let be a weighted forest. Then, in linear time, we can compute a binary weighted forest , such that , , every sequence of operations cut, update-weight, tree-sum, and subtree-sum is legal in if and only if it is legal in , and every such sequence yields the same results on and .
Moreover, for each and for each .
Proof.
For every vertex with children, we replace with a rooted path consisting of a root and auxiliary vertices of weight . Each child of then becomes a child of a different vertex in . This transformation can be done in linear time, and it clearly satisfies all requirements of the theorem.
2.1 The cluster decomposition
We now formally describe a decomposition of a binary tree into small disjoint well-structured subgraphs of , which we call the cluster decomposition of . The decomposition is inspired by the work of Alstrup et al. [4], however our variant of the decomposition will be particularly convenient to use in the upcoming data structures.
Let be a tree, and let induce a connected subtree of . A vertex is called an upper boundary vertex if the parent of is not contained in , or is the root of . Note that each connected set has precisely one upper boundary vertex, which we denote by . A vertex in is called a lower boundary vertex if it has at least one child that is not contained in . We call a cluster if it has at most one lower boundary vertex, and moreover, no child of the lower boundary vertex is in . Let denote the lower boundary vertex of a cluster , if it exists, or let otherwise. Note that a single vertex is always a valid cluster.
A cluster decomposition (see Figure 1) of a tree is a partition of into a set of disjoint clusters. The cluster tree of is a tree where are all boundary vertices of the clusters in . A vertex is a child of if one of the following is true:
-
There is a cluster with and , or
-
and are in different clusters and is a child of in (then must be an upper boundary vertex and must be a lower boundary vertex).
Note that every vertex in has a parent, except the root of . Thus, the cluster tree is indeed a (rooted) tree. Note that the cluster tree contains no auxiliary vertices, regardless of whether contains auxiliary vertices or not.
Lemma 2.3.
Let be a binary tree with vertices, and let . Then, in linear time, we can compute a cluster decomposition of into at most clusters, each of size at most , along with the corresponding cluster tree.
A proof of Lemma 2.3 is found in the full version of the paper.
Both of our main algorithms use a cluster decomposition of the input tree. The decomposition itself is never modified, even when clusters become disconnected. However, we will modify the cluster tree by removing edges; for this, the following definition will be useful.
Let be a tree, let be a cluster decomposition of , and let be the corresponding cluster tree. For every forest obtained by removing some set of edges from , we define the cluster forest induced by as the forest with , such that is a child of in if:
-
There is a cluster with and , and are connected in , or
-
and are in distinct clusters and is a child of in .
Note that can be obtained from by removing edges. More specifically, consider a sequence of edge removals within that produces . To construct , we do the following: Whenever an edge between the boundary vertices of two clusters is removed, the corresponding two vertices in are likewise disconnected. Whenever an edge within a cluster is removed, if this disconnects and , the corresponding edge in is deleted. Since connectivity can be maintained in constant time per operation (Lemma 2.1), it is easy to construct the following data structure:
Lemma 2.4.
Suppose we are given a tree on vertices, and a cluster decomposition of . There is a data structure that maintains the induced cluster forest under (up to ) edge deletions in total time.
3 Tree sums in time
In this section, we prove:
Theorem 1.1. [Restated, see original statement.]
There is a data structure that maintains a weighted rooted forest on vertices under cut, update-weight, and tree-sum, with running time for operations.
We start with a simple -time data structure (Section 3.1), which we then iterate using cluster decompositions (Section 3.2).
For technical reasons, our data structures need to support a slightly modified cut operation: performs a , but additionally returns the results of and , where is the (former) parent of . This will be useful to avoid extra calls to tree-sum that complicate the running time analysis.
In this section, let a tree-sum data structure refer to a data structure that maintains a binary weighted forest, potentially with auxiliary vertices, under tree-sum, update-weight, and cut-report. By Theorem 2.2, this also implies an analogous data structure for general weighted forests.
3.1 A simple algorithm with constant-time queries and weight updates
As mentioned in the introduction, well-known dynamic forest data structures can solve the tree-sum problem with time per operation. The data structure presented next takes (amortized) time per cut, but only time for tree-sum and update-weight, which is crucial to prove Theorem 1.1. The data structure is a straightforward adaptation of [12, Section 2]. We provide a proof in the full version of the paper.
Lemma 3.1.
There is a tree-sum data structure with the following running times for vertices: for initialization, for each tree-sum and update-weight, and in total for all cut-report operations.
3.2 Iterating the algorithm
We now show how to build data structures with running times of roughly , , etc. per operation. The following reduction using cluster decompositions is the main necessary ingredient.
Lemma 3.2.
Suppose there is a tree-sum data structure with total running time for vertices and operations. Then, there exists a tree-sum data structure with the following property. For each number of operations and number of vertices , there exists an integer and integers , for with , , and for all , such that the total running time on any instance with vertices and operations is at most
The numbers in Lemma 3.2 refer to the cluster sizes, and to the number of operations applied to a particular cluster. The lemma then essentially states that each operation is delegated to a single cluster, with overall linear overhead.
In the remainder of this section, we prove Lemma 3.2. For simplicity, we assume the initial forest is a tree; otherwise, if the forest is disconnected, we can apply the data structure separately for each connected component, and use Lemma 2.1 to find the proper data structure to query or modify.
Let be the initial weighted binary tree. We first use Lemma 2.3 with the maximum cluster size to compute a cluster decomposition of with cluster tree . We maintain the induced cluster forest as described by Lemma 2.4.
We also maintain a weight function on the vertices in the cluster forest , as follows. Suppose is the current weighted forest. Let be some cluster, and let . Then is defined as the sum of weights of all vertices in that are connected to . On the other hand, if exists, then is defined as the sum of weights of all vertices in that are connected to , but not to . In particular, note that as long as is connected to .
Observation 3.3.
Let be a boundary vertex of some cluster, let be the tree in containing , and let be the tree in containing . Then .
In the following, let denote the current forest, and let denote the cluster forest induced by . Let denote the current weight function on , and let denote the weight function on defined as above. Our data structure maintains and explicitly (with child and parent pointers), and additionally:
-
A data structure for connected queries in (Lemma 2.1).
-
An instance of the data structure from Lemma 3.1 on .
-
A cluster object for each cluster , which stores and .
-
For each cluster , an instance of the given data structure (defined in Lemma 2.3) on the induced subforest , with the weight function restricted to .
-
For each vertex, a pointer to the cluster object containing it.
Initialization works as follows. First compute and using Lemma 2.3, with . Create the cluster objects and point each vertex towards its cluster. Then initialize , , and all instances . Finally, compute by summing the weights of each cluster and assigning this sum to the upper boundary vertex (recall that all clusters are still connected). We now describe the three operations.
-
Consider an operation . We first try to find a boundary vertex that is connected to , by determining its cluster , and then checking connectivity between and , resp. , using . If is not connected to either, then the component of containing is entirely within . Thus, we can return . Otherwise, if is connected to some , then we can return by ˜3.3.
-
Consider . Say is the weight before the operation. We again first determine the cluster containing , and call . Further, the change to may affect for either or . We again check connectivity between and the two boundary vertices. If is connected to , then we increase by . Otherwise, if is connected to , we increase by . If neither is true, does not change for any vertex.
-
Consider . Let be the parent of (before the operation). Suppose first that and are in distinct clusters. Then is a lower boundary vertex and is an upper boundary vertex. Thus, we can simply call and pass along the two returned values. No cluster is changed, so and do not need to be touched.
Second, suppose that and are both contained in a single cluster . This still may remove an edge from ; we check this as in Lemma 2.4 and call if necessary. We then call , which returns the sums and of weights of vertices in connected to , resp. . Now could have changed for or , and we need to update it in . Recalling the definition of , it is straightforward to determine and by checking connectivity between , , , and , and then using or if necessary. If changes, we call appropriately.
Finally, we need to return the results for and . This is again straightforward to compute: If connected to or , we can use ; if not, we can use or , respectively.
Note that we never call operations on auxiliary vertices in , since by assumption we are never given an auxiliary vertex as parameter .
We now bound the running time. Initialization, aside from the instances , takes time . Besides calls to and , each operation performs a constant amount of work, for a total of across operations. By Lemma 3.1, the time spent in is .
Finally, consider the time spent in a single instance . By definition, this is , where is the number of operations called on , and . It remains to show that the stated conditions on and are true. Clearly, the total size of all clusters is , so . Also, each cluster has size at most , so . Further, observe that each operation (in the data structure we just described) results in at most one call to an operation of . Thus, we have . This concludes the proof of Lemma 3.2.
Corollary 3.4.
There is a tree-sum data structure, parameterized with , with total running time for operations and vertices.
Proof.
Use Lemma 3.1 for the case . For , use Lemma 3.2 and the data structure constructed for . By induction, the running time of the latter is, up to an absolute multiplicative constant, bounded by for operations and vertices. The running time of the new data structure then is, up to an absolute multiplicative constant, at most
using that , , and .
With , Corollary 3.4 implies Theorem 1.1.
4 Tree sizes in linear time
In this section, we prove:
Theorem 1.2. [Restated, see original statement.]
There is a data structure in the Word RAM model of computation that maintains a 0-1-weighted rooted forest with vertices under cut, update-weight and tree-sum operations, in time for operations.
Let a tree-size data structure be a data structure as in Theorem 1.2, which supports auxiliary vertices in the input. The following lemma is the centerpiece of the data structure. See the full version of the paper for a proof.
Lemma 4.1.
Fix a machine word size and some . There is a tree-size data structure that maintains a 0-1-weighted forest on up to vertices, with initialization time and time per operation.
The data structure requires a global table, only depending on , that can be precomputed in time .
We can now combine Lemma 4.1 with Lemma 3.2 to prove Theorem 1.2. The only additional observation necessary is that the reduction of Lemma 3.2 preserves the property that is a 0-1 weight function. Internally, the more general weight function is used only for the data structure (which uses Lemma 3.1), not for the data structures .
Proof of Theorem 1.2..
Start by precomputing the global table of Lemma 4.1, with . This takes time. We now have a data structure with running time for operations and vertices, but only if . Applying Lemma 3.2 gives us a data structure with running time for all forests with vertices, and applying it the second time yields the claim.
5 Tree sums in optimal time
We now present an explicit data structure with unknown, but optimal running time. In this section, let a tree-sum data structure support operations cut, tree-sum, and update-weight; auxiliary vertices are again allowed. Unlike in Section 3, we are not restricted to binary input trees, and do not require support for cut-report.
Let be a tree-sum data structure and let be a forest. Let be the maximum number of additions and subtractions that performs when executing a legal sequence of operations with the initial forest . The maximum is thus taken over the operation sequences and the initial weights. Let be the minimum over all data structures . Note that the quantity defined in the introduction is the maximum over all forests on vertices.333In the introduction, we did not allow auxiliary vertices; however, it is easy to see that marking a vertex as auxiliary cannot make the problem easier. The main result of this section is:
Theorem 5.1.
There exists a single data structure with running time for any forest on vertices and any sequence of operations. Note that the data structure does not know , , or upfront.
This means that our data structure performs asymptotically as good as even the data structures that have the number of operations and the initial forest hard-coded. In particular, Theorem 5.1 implies Theorem 1.3.
As stated in the introduction, the main idea is to precompute an optimal data structure for very small trees.
Lemma 5.2.
Given a forest with vertices, in time , we can precompute a tree-sum data structure that performs operations with the initial forest (and arbitrary initial weights) in time .
Lemma 5.2 is shown in the full version of the paper. Our data structure (for large trees) works as follows. First, for each (ordered) binary tree on at most vertices, compute an optimal data structure for with Lemma 5.2. As is well known, there are no more than such trees. We can combine them into a single data structure with optimal running time (with linear overhead) for all binary trees of size at most .444When given an initial binary tree , the combined data structure can identify the respective in time, using a table containing each .
Now take the components of the input forest . Binarize each of them using Theorem 2.2, obtaining binary trees . As usual, we build the helper data structure of Lemma 2.1 to identify the affected tree when performing an operation on the overall forest. For each , apply Lemma 3.2 three times, using as the data structure for small trees. Note that Lemma 3.2 requires to support cut-report, which we simulate with one cut and two tree-sum operations.
The running time for operations on one of the trees is as follows, for some , some partition of into (cluster) subtrees , and some with :
The factor 3 in is due to the fact that each cut-report operation results in three actual operations on .
We now need the following lemma, which we will show in a moment in Section 5.1.
Lemma 5.3.
Let be a forest, and let be the trees induced by a partition of into connected subsets. Further let . Then:
This bounds the running time for operations on by . Now observe that , since by Theorem 2.2, all operation sequences return exactly the same results on and . Applying Lemma 5.3 again on the components yields the running time for operations on . Thus, we have shown Theorem 1.3.
5.1 Weak super-additivity of
In this section, we prove Lemma 5.3. We need the following definitions. An initial-zero tree-sum data structure is a tree-sum data structure that only accepts initial forests where all weights are zero. (Thus, weights need to be changed before obtaining anything useful from tree-sum queries). Define in the same way as , but for initial-zero tree-sum data structures. It turns out that is easier to work with than . Indeed, we can show that is super-additive.
In the following statement, we say that is convex if for each , if and are connected in , then they are also connected in . In other words, includes from each tree of either a connected subgraph of , or nothing at all. In the initial-zero setting, this in particular implies that any sequence of operations in an instance that is legal in yields the same results in both instances.
Lemma 5.4.
Let be a forest, be a partition of into convex subsets, and let . Then .
Proof.
Let , let , and let . Let be an optimal initial-zero tree-sum data structure for , that is, the maximum number of additions and subtractions performs when handling any operations with the initial forest and zero weights is precisely . We now give two data structures and for the forests and , respectively, and then show that they perform at most additions and subtractions in total when presented with and operations, respectively.
First, is the same as . In particular, behaves as if initialized with the original forest , although it only accepts , or if . Now take an operation sequence of length on such that the number of additions and subtractions performs to execute is maximized. Run with , and capture the final state of the data structure. Hard-code this state into the data structure , except set the weights of all vertices in and all group elements stored by the data structure to zero. When presented with an operation sequence on (one operation at the time), continues the execution of from that final state.555This formulation assumes that data structures have access to the zero element of the weight group. However, note that we can easily simulate additions with zero instead of actually storing zeroes.
The correctness of is easy to see: Suppose is a sequence of operations on . Consider a query in (possibly after some cuts). In , the query returns the sum of weights of some set . In , it returns the sum of weights of some superset . However, since and induce connected subgraphs of , and is convex, we have . Moreover, weights in are zero at the start and never changed by . Thus, the query returns the same result in both cases.
We can show correctness of in a similar, but slightly more complicated way. Consider a query from applied to , assuming and all previous queries in have been applied already. The return value of this query is computed by a series of additions and subtractions involving (previous or current) weights from and . By ignoring all such additions and subtractions performed during the execution of , we get that is a linear combination of (1) weights from and , all read during the execution of , and (2) values stored in the data structure directly after execution of . Now recall that sets all those stored values to zero, and also sets all weights in to zero. Thus, what returns is the reduced linear combination with only the weights from . As above, by convexity, this is precisely the correct result.
Having shown correctness, we now argue the stated running times. Let and be some operation sequences on and , respectively. Recall that is the maximum number of additions and subtractions that a data structure performs when executing operations with an initial forest . For convenience, let also be the number of additions and subtractions that performs when executing a specific sequence of operations on . Note that is the maximum of over all sequences of length .
By construction, we have , and moreover , and further . These three inequalities imply that
Since this is true for any pair of sequences and , we have
as desired.
We will now generalize Lemma 5.4 to normal tree-sum data structures without the initial-zero assumption. We need two technical lemmas about and . Note that both are far from trivial to show; see the full version of the paper for proofs.
Lemma 5.5.
We have for each forest on vertices and .
Lemma 5.6.
Let be a forest. For each constant , there is another constant such that for all .
With this, we are finally ready to prove:
Lemma 5.3. [Restated, see original statement.]
Let be a forest, and let be the trees induced by a partition of into connected subsets. Further let . Then:
Proof.
We have
| (Lemma 5.5) | |||||
| (Lemma 5.4) | |||||
| (obvious) | |||||
| (Lemma 5.6) | |||||
Observe that, unsurprisingly, the constant in Lemma 5.3 can be replaced by an arbitrary constant. We believe that the function is properly super-additive. That is, we make the following conjecture:
Conjecture 5.7.
Let be a forest, be a partition of into convex subsets, and let . Then .
6 Hardness of weighted subtree-sum
In this section we prove Theorem 1.5, restated here for convenience. See 1.5
We remark that the lower bound holds even in the more general cell-probe model of computation, where the time complexity of an operation is only measured in the number of memory accesses (probes) it makes, regardless of the computation performed between probes. Moreover, we allow for Las Vegas randomization. Auxiliary vertices are not allowed in this section.
In our hardness proof, we invoke the Pătraşcu and Demaine’s lower bound for the partial-sum problem [28]. Recall that in this problem, we maintain an array of length with values from to for some , supporting operations of the form (set ) and (return ). We will say that a sequence of operations performed on is epoch-based if all operations can be partitioned into some epochs, such that within each epoch, each element of is updated exactly once and the sum of each prefix is queried exactly once. We will use the following version of the lower bound:
Theorem 6.1.
Consider any cell-probe data structure for the partial-sum problem on an array of length and values from to that may use Las Vegas randomization. Let . The data structure requires time to process operations, even if we assume that the sequence of operations is epoch-based and comprises epochs.
We remark that Theorem 6.1 is not explicitly stated in [28], but it can be derived from their techniques; we provide a proof in the full version of the paper.
Towards Theorem 1.5, assume we have a data structure supporting subtree-sum and cut. Using , we will construct a data structure for partial-sum from Theorem 6.1, as follows. Suppose is initialized with an array of length containing integers from to . Let . We construct a weighted forest comprising two trees: on vertices and on vertices. contains a path of vertices, where each has weight . For each , we create additional vertices, denoted , where has weight . We connect each and with an edge. is constructed similarly, with a path of vertices of weight , and for each , additional vertices of weight connected to . We root at and at , so that (respectively, ) returns the sum of weights of all vertices (resp., ) with . We remark that contains no auxiliary vertices. The data structure is initialized with and the given weights.
We will now show how to use to process an epoch-based sequence of operations on comprising epochs, with a total of operations. Suppose an update is performed on during the th epoch, replacing with a new value from range and thus increasing by some . Then performs three cuts: it cuts and from , where and are chosen such that and both and are still connected to , and it cuts from . Later we will show that such and always exist and can be found by a randomized algorithm in expected constant time. Observe that after these cuts, the value of the expression
remains unchanged for , and increases by for . Thus, given suitable preprocessing, we can compute any partial sum of in constant time using two subtree-sum queries – one in each of and . The details follow.
At the time of the initialization, we construct a table of size , so that
| (1) |
Note that initially, and for all , so can be computed in time. The invariant (1) will be maintained throughout the execution of the data structure. We will also preserve the following invariant: after updates to the value of , exactly vertices have been cut from , and exactly vertices for have been cut from .
Consider now an operation during the th epoch. A partial-sum query for some can be answered by computing the right-hand side of (1), which requires two subtree-sum queries and a constant amount of additional work. Now consider an update changing by , and define .
Lemma 6.2.
There exist such that and both and are still connected to . Furthermore, such and can be found by a Las Vegas randomized algorithm in expected constant time.
Proof.
Consider the pairs of integers for . Since , all integers in these pairs are distinct and belong to . Since , by the invariant at most of these integers correspond to vertices that have already been cut from . Therefore, at least pairs remain such that both and are still connected to . Thus, the sought pair exists, and it can be found by randomly sampling pairs as above until a valid one is found, which takes expected constant time.
After finding such and , performs , , and . This preserves all the invariants, as argued above, completing the description of the data structure . However, by Theorem 6.1, requires time to process epochs of operations. manages to perform the entire sequence of operations via operations on and a total of additional work (for maintaining and finding ). Thus, must require time to process the operations, proving Theorem 1.5.
We also observe that this proof can be rewritten to also apply in the group model setting:
Corollary 6.3.
Each data structure that maintains a weighted forest under vertices under the operations subtree-sum and cut requires time for operations in the group model of computation.
Proof.
Let be such that the weights of the vertices in the forest above are strictly smaller than , and let be the considered data structure in the group model of computation. Since works correctly in any commutative group, it can report the correct subtree sums in the group of integers modulo ; these are equal in value to the subtree sums in , as all subtree sums are strictly smaller than . Meanwhile, all operations in can be simulated by a Word RAM machine in constant time; therefore there exists a data structure in the Word RAM model of computation with the same complexity guarantees that maintains under subtree-sum and cut. Theorem 1.5 applied to finishes the proof.
7 Subtree sizes
In this section, we consider the subtree-sum problem on unweighted and 0-1-weighted forests, where update-weight is not available and returns the number of vertices (resp., the number of vertices with weight ) in the subtree rooted at . Our algorithms (Section 7.2) support auxiliary vertices. We determine the complexity of the problem to be for operations.
7.1 Lower bound
We prove the lower bound (Theorem 1.7) below:
Theorem 1.7. [Restated, see original statement.]
Each data structure in the Word RAM model that maintains an unweighted forest with vertices under the operations subtree-sum and cut requires time for operations.
Similarly to Theorem 1.5, we reduce from the partial-sum problem; however, we find it more convenient to invoke a result from an earlier work by Fredman and Saks [14] that concerns the partial-sum-parity problem. In partial-sum-parity, we are given an array of length with values from , and we should support two operations: update (flipping the value of ) and partial-sum-parity (returning the parity of the sum of the first values of ).
Theorem 7.1 ([14, Theorem 3]).
Consider any cell-probe data structure for the problem of partial-sum-parity on an array of length that may use amortization and Las Vegas randomization. The data structure requires time to process operations, even if each element of the array is updated at most once.
Proof of Theorem 1.7.
Let be a data structure for subtree-sum on unweighted forests. Using , we will construct a data structure for partial-sum-parity on an array of length . On initialization of with an array , we construct a tree of size as follows. Let be a path of vertices. For each , if , we create one additional vertex connected to ; if , we create two additional vertices and connected to . We root at . This construction ensures the following invariant: For each , the parities of and are the same. The data structure is initialized with . Then, to process an update of flipping the parity of , we simply invoke ; this is legal (since each element of is updated at most once) and preserves the invariant. Therefore, a partial-sum-parity query for some can be answered by simply invoking and returning its parity.
By Theorem 7.1, requires time to process operations. On the other hand, our implementation of performs operations on and a total of additional work. Since , this finishes the proof.
7.2 Upper bound
We start with a data structure for forests that are very small relative to the size of a machine word, which we denote by . This is somewhat similar to Lemma 4.1. However, here we actually need to maintain small weighted forests, which means that we need a different approach. The weights are assumed to fit in one word each, i.e., to be an integer in . We only allow a very limited way of changing weights: the operation , which decreases the weight of by one (only allowed if ). Note that this data structure is merely used as a subroutine; in the end, we give a data structure for unweighted forests of size . The proof can be thought of as an adaptation of Dietz’s data structure for Subset Rank [11] – essentially, partial sums of 0-1-arrays – to forests.
Lemma 7.2.
Fix a word size , and let be a power of two. There is a data structure maintaining a weighted forest with vertices under the operations subtree-sum, cut, and decrement-weight, provided that all weights are non-negative integers, and the sum of all weights in the initial forest is at most .
The data structure requires a certain global table only depending on , which can be computed in time . After precomputing that table, initialization takes time, each subtree-sum operation takes constant time, each cut operation takes time, and all decrement-weight operations together take time.
Proof.
Let denote the current weighted forest, and say .
We follow Dietz [11] in using two arrays and of length . stores the actual subtree-sum for each vertex in , but is only updated every operations (such an update is called a flush). stores for each vertex the number of decrements since the last flush. Since this number can be no more than , the entire array fits in bits, so it fits into a single machine word.
To adapt the Dietz’s idea to trees with cuts, we need the following two extra data structures. First, we want to store, for each vertex , the set of vertices in the subtree rooted at (i.e., the ones whose weights count towards ). We store the mapping in an array . Each is represented as a bitstring, so has size and fits into a single machine word.
Second, to actually obtain the sum , we need the global table mentioned in the statement of the lemma. We denote it by and it maps a pair to an integer. Here is an array of length , storing numbers in (as above), and is a subset of , stored as a bitstring. Both and fit into single machine words. The value is . Note that has entries, each entry fits into a machine word, and can be computed in time . Observe that only depends on , as required.
We now show how to implement the operations. We maintain the invariant that is correct for a previous point in time (the last flush), and since then at most decrement-weight and no cut operations have been performed. In turn, is the number of operations since the last flush.
-
Initially, we compute and in a bottom-up fashion, in time. We initialize as an all-zero vector, and assume has been already precomputed.
-
To answer a query, we calculate , in constant time.
-
To perform , we first increment . Then, if decrement-weight operations have been performed since the last flush, we perform a flush as follows. For each , set , and then reset to the all-zero array. The amortized time for the flushes is clearly constant per decrement-weight operation. Since we can perform no more than decrement-weight operations, the total time is at most .
-
To perform , we first perform a flush, then recover all vertex weights from , then delete the edge from to its parent and recompute and . This requires time, as desired.
We now show how to iterate Lemma 7.2, again using a cluster decomposition (though with different cluster size than before).
We introduce a new operation that simplifies the analysis. When maintaining a weighted forest which is initially a tree, the parameterless operation returns the sum of weights of vertices still connected to the root of the initial tree. Note that root-sum can and will be implemented with a single call , where is the initial tree root (which can be stored at the beginning).
We present a sequence of data structures , which support increasingly larger inputs, but also have successively worse running time. For now, we assume the input is a binary tree. For technical reasons related to binarization (Theorem 2.2), we consider 0-1-weighted forests instead of unweighted forest. Below, big- notation only hides constants not depending on the values , , or .
Lemma 7.3.
Fix a word size and let be a power of two with . For each parameter , there is a data structure maintaining an 0-1-weighted binary forest, initially a tree, with vertices under the operations cut and subtree-sum.
The data structure requires a certain global table only depending on , which can be computed in time . After precomputing that table, the initialization takes time, each subtree-sum operation takes time, each root-sum operation takes time, and all cut operations together take time.
As described in the introduction, the proof again uses cluster decompositions, but with a different cluster size. The proof is found in the full version of the paper.
With Lemma 7.3, we are ready to prove:
Theorem 1.6. [Restated, see original statement.]
There is a data structure in the Word RAM model maintaining a 0-1-weighted forest with vertices under the operations subtree-sum and cut, with total time for operations.
Proof.
We assume the machine word size is at least .666The assumption that is standard, and if it is a constant factor less than necessary, we use the usual simulation of -bit-word operations with a constant number of words. Let . As usual, we can assume the initial weighted forest is a tree . First, binarize the tree with Theorem 2.2 to obtain . Now use Lemma 7.3 with parameters and . Note that and , so the conditions for Lemma 7.3 are satisfied. The total running time is . Observe that . Moreover, we have by an easy calculation. The statement follows.
References
- [1] Peyman Afshani, Jérémy Barbay, and Timothy M. Chan. Instance-optimal geometric algorithms. J. ACM, 64(1):3:1–3:38, 2017. doi:10.1145/3046673.
- [2] Stephen Alstrup, Jacob Holm, Kristian de Lichtenberg, and Mikkel Thorup. Maintaining information in fully dynamic trees with top trees. ACM Trans. Algorithms, 1(2):243–264, 2005. doi:10.1145/1103963.1103966.
- [3] Stephen Alstrup, Thore Husfeldt, and Theis Rauhe. Marked ancestor problems. In 39th Annual Symposium on Foundations of Computer Science, FOCS 1998, Palo Alto, California, USA, November 8-11, 1998, pages 534–544. IEEE Computer Society, 1998. doi:10.1109/SFCS.1998.743504.
- [4] Stephen Alstrup, Jens P. Secher, and Maz Spork. Optimal on-line decremental connectivity in trees. Inf. Process. Lett., 64(4):161–164, 1997. doi:10.1016/S0020-0190(97)00170-1.
- [5] V. L. Arlazarov, E. A. Dinic, M. A. Kronrod, and I. A. Faradžev. On economical construction of the transitive closure of a directed graph. Doklady Akademii Nauk SSSR, 194(3):1209–1210, 1970. Russian.
- [6] Michael A. Bender and Martin Farach-Colton. The LCA problem revisited. In Gaston H. Gonnet, Daniel Panario, and Alfredo Viola, editors, LATIN 2000: Theoretical Informatics, 4th Latin American Symposium, Punta del Este, Uruguay, April 10-14, 2000, Proceedings, volume 1776 of Lecture Notes in Computer Science, pages 88–94. Springer, 2000. doi:10.1007/10719839_9.
- [7] Michael A. Bender and Martin Farach-Colton. The level ancestor problem simplified. Theor. Comput. Sci., 321(1):5–12, 2004. doi:10.1016/J.TCS.2003.05.002.
- [8] Jon Louis Bentley and Hermann A. Maurer. Efficient worst-case data structures for range searching. Acta Informatica, 13:155–168, 1980. doi:10.1007/BF00263991.
- [9] Benjamin Aram Berendsohn. Universally optimal decremental tree minima, 2026. doi:10.48550/arXiv.2602.15977.
- [10] Omer Berkman and Uzi Vishkin. Finding level-ancestors in trees. J. Comput. Syst. Sci., 48(2):214–230, 1994. doi:10.1016/S0022-0000(05)80002-9.
- [11] Paul F. Dietz. Optimal algorithms for list indexing and subset rank. In Frank K. H. A. Dehne, Jörg-Rüdiger Sack, and Nicola Santoro, editors, Algorithms and Data Structures, Workshop WADS ’89, Ottawa, Canada, August 17-19, 1989, Proceedings, volume 382 of Lecture Notes in Computer Science, pages 39–46. Springer, 1989. doi:10.1007/3-540-51542-9_5.
- [12] Shimon Even and Yossi Shiloach. An on-line edge-deletion problem. J. ACM, 28(1):1–4, 1981. doi:10.1145/322234.322235.
- [13] Peter M. Fenwick. A new data structure for cumulative frequency tables. Softw. Pract. Exp., 24(3):327–336, 1994. doi:10.1002/SPE.4380240306.
- [14] M. Fredman and M. Saks. The Cell Probe Complexity of Dynamic Data Structures. In Proceedings of the Twenty-First Annual ACM Symposium on Theory of Computing, STOC ’89, pages 345–354, New York, NY, USA, 1989. Association for Computing Machinery. doi:10.1145/73007.73040.
- [15] Michael L. Fredman. The complexity of maintaining an array and computing its partial sums. J. ACM, 29(1):250–260, 1982. doi:10.1145/322290.322305.
- [16] Michael L. Fredman and Dan E. Willard. BLASTING through the information theoretic barrier with FUSION TREES. In Harriet Ortiz, editor, Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, May 13-17, 1990, Baltimore, Maryland, USA, pages 1–7. ACM, 1990. doi:10.1145/100216.100217.
- [17] Harold N. Gabow and Robert Endre Tarjan. A linear-time algorithm for a special case of Disjoint Set Union. J. Comput. Syst. Sci., 30(2):209–221, 1985. doi:10.1016/0022-0000(85)90014-5.
- [18] Bernard A. Galler and Michael J. Fischer. An improved equivalence algorithm. Commun. ACM, 7(5):301–303, 1964. doi:10.1145/364099.364331.
- [19] Bernhard Haeupler, Richard Hladík, John Iacono, Václav Rozhon, Robert E. Tarjan, and Jakub Tetek. Fast and simple sorting using partial information. In Yossi Azar and Debmalya Panigrahi, editors, Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 3953–3973. SIAM, 2025. doi:10.1137/1.9781611978322.134.
- [20] Bernhard Haeupler, Richard Hladík, Václav Rozhon, Robert E. Tarjan, and Jakub Tetek. Universal optimality of Dijkstra via beyond-worst-case heaps. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, Chicago, IL, USA, October 27-30, 2024, pages 2099–2130. IEEE, 2024. doi:10.1109/FOCS61266.2024.00125.
- [21] Bernhard Haeupler, David Wajc, and Goran Zuzic. Universally-optimal distributed algorithms for known topologies. In Samir Khuller and Virginia Vassilevska Williams, editors, STOC ’21: 53rd Annual ACM SIGACT Symposium on Theory of Computing, Virtual Event, Italy, June 21-25, 2021, pages 1166–1179. ACM, 2021. doi:10.1145/3406325.3451081.
- [22] John E. Hopcroft and Jeffrey D. Ullman. Set merging algorithms. SIAM J. Comput., 2(4):294–303, 1973. doi:10.1137/0202024.
- [23] Shang-En Huang, Dawei Huang, Tsvi Kopelowitz, Seth Pettie, and Mikkel Thorup. Fully dynamic connectivity in amortized expected time. TheoretiCS, 2, 2023. doi:10.46298/THEORETICS.23.6.
- [24] Neil D. Jones. Computability and complexity - from a programming perspective. Foundations of computing series. MIT Press, 1997.
- [25] Jakub Łącki and Piotr Sankowski. Optimal decremental connectivity in planar graphs. Theory Comput. Syst., 61(4):1037–1053, 2017. doi:10.1007/S00224-016-9709-X.
- [26] Lawrence L. Larmore. An optimal algorithm with unknown time complexity for convex matrix searching. Inf. Process. Lett., 36(3):147–151, 1990. doi:10.1016/0020-0190(90)90084-B.
- [27] Jirí Matousek. Range searching with efficient hierarchical cuttings. In David Avis, editor, Proceedings of the Eighth Annual Symposium on Computational Geometry, Berlin, Germany, June 10-12, 1992, pages 276–285. ACM, 1992. doi:10.1145/142675.142732.
- [28] Mihai Pătraşcu and Erik D. Demaine. Logarithmic lower bounds in the cell-probe model. SIAM J. Comput., 35(4):932–963, 2006. doi:10.1137/S0097539705447256.
- [29] Seth Pettie and Vijaya Ramachandran. An Optimal Minimum Spanning Tree Algorithm. J. ACM, 49(1):16–34, January 2002. doi:10.1145/505241.505243.
- [30] Seth Pettie and Vijaya Ramachandran. A shortest path algorithm for real-weighted undirected graphs. SIAM J. Comput., 34(6):1398–1431, 2005. doi:10.1137/S0097539702419650.
- [31] Daniel Dominic Sleator and Robert Endre Tarjan. A data structure for dynamic trees. J. Comput. Syst. Sci., 26(3):362–391, 1983. doi:10.1016/0022-0000(83)90006-5.
- [32] Robert Endre Tarjan. Efficiency of a good but not linear set union algorithm. J. ACM, 22(2):215–225, 1975. doi:10.1145/321879.321884.
- [33] Robert Endre Tarjan. A class of algorithms which require nonlinear time to maintain disjoint sets. J. Comput. Syst. Sci., 18(2):110–127, 1979. doi:10.1016/0022-0000(79)90042-4.
- [34] Ivor van der Hoog, Eva Rotenberg, and Daniel Rutschmann. A combinatorial proof of universal optimality for computing a planar convex hull. 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 102:1–102:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.102.
- [35] Ivor van der Hoog, Eva Rotenberg, and Daniel Rutschmann. Simpler optimal sorting from a directed acyclic graph. In Ioana Oriana Bercea and Rasmus Pagh, editors, 2025 Symposium on Simplicity in Algorithms, SOSA 2025, New Orleans, LA, USA, January 13-15, 2025, pages 350–355. SIAM, 2025. doi:10.1137/1.9781611978315.26.
- [36] Ivor van der Hoog, Eva Rotenberg, and Daniel Rutschmann. Simpler universally optimal Dijkstra. 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 71:1–71:9. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.71.
- [37] Andrew Chi-Chih Yao. On the complexity of maintaining partial sums. SIAM J. Comput., 14(2):277–288, 1985. doi:10.1137/0214022.
