Worst-case Analysis of Set Union Algorithms
Journal of the ACM (JACM)
On the single-operation worst-case time complexity of the disjoint set union problem
SIAM Journal on Computing
Fibonacci heaps and their uses in improved network optimization algorithms
Journal of the ACM (JACM)
The cell probe complexity of dynamic data structures
STOC '89 Proceedings of the twenty-first annual ACM symposium on Theory of computing
The design and analysis of algorithms
The design and analysis of algorithms
Efficiency of a Good But Not Linear Set Union Algorithm
Journal of the ACM (JACM)
Meldable heaps and boolean union-find
STOC '02 Proceedings of the thiry-fourth annual ACM symposium on Theory of computing
Meldable RAM priority queues and minimum directed spanning trees
SODA '04 Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms
Recursive data structure profiling
Proceedings of the 2005 workshop on Memory system performance
ACM Transactions on Algorithms (TALG)
Compiling with continuations, continued
ICFP '07 Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
Note: A simple and efficient Union-Find-Delete algorithm
Theoretical Computer Science
Don't rush into a union: take time to find your roots
Proceedings of the forty-third annual ACM symposium on Theory of computing
Union-find with constant time deletions
ICALP'05 Proceedings of the 32nd international conference on Automata, Languages and Programming
Hi-index | 0.00 |
In the classical union-find problem we maintain a partition of a universe of n elements into disjoint sets subject to the operations union and find. The operation union(A, B, C) replaces sets A and B in the partition by their union, given the name C. The operation find(x) returns the name of the set containing the element x. In this paper we revisit the union-find problem in a context where the underlying partitioned universe is not fixed. Specifically, we allow a delete(x) operation which removes the element x from the set containing it. We consider both worst-case performance and amortized performance. In both settings the challenge is to dynamically keep the size of the structure representing each set proportional to the number of elements in the set which may now decrease as a result of deletions.For any fixed k, we describe a data structure that supports find and delete in O(logkn) worst-case time and union in O(k) worst-case time. This matches the best possible worst-case bounds for find and union in the classical setting. Furthermore, using an incremental global rebuilding technique we obtain a reduction converting any union-find data structure to a union-find with deletions data structure. Our reduction is such that the time bounds for find and union change only by a constant factor. The time it takes to delete an element x is the same as the time it takes to find the set containing x plus the time it takes to unite a singleton set with this set.In an amortized setting a classical data structure of Tarjan supports a sequence of m finds and at most n unions on a universe of n elements in O(n + mα(m + n, n, log n)) time where α(m, n, l) = min{k | Ak(⌊m/n⌋) l} and Ai(j) is Ackermann's function as described in [6]. We refine the analysis of this data structure and show that in fact the cost of each find is proportional to the size of the corresponding set. Specifically, we show that one can pay for a sequence of union and find operations by charging a constant to each participating element and O(α(m, n, log(l))) for a find of an element in a set of size l. We also show how keep these amortized costs for each find and each participating element while allowing deletions. The amortized cost of deleting an element from a set of l elements is the same as the amortized cost of finding the element; namely, O(α(m, n, log(l))).