Abstract
The disjoint-set data structure is used to maintain a collection of non-overlapping sets of elements from a finite universe. Algorithms that operate on this data structure are often referred to as Union-Find algorithms. They are used in numerous practical applications and are also available in several software libraries. This paper presents an extensive experimental study comparing the time required to execute 55 variations of Union-Find algorithms. The study includes all the classical algorithms, several recently suggested enhancements, and also different combinations and optimizations of these. Our results clearly show that a somewhat forgotten simple algorithm developed by Rem in 1976 is the fastest, in spite of the fact that its worst-case time complexity is inferior to that of the commonly accepted “best” algorithms.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bader, D.A., Madduri, K.: GTGraph: A synthetic graph generator suite (2006), http://www.cc.gatech.edu/~kamesh/GTgraph
Banachowski, L.: A complement to Tarjan’s result about the lower bound on the complexity of the set union problem. Inf. Proc. Letters 11, 59–65 (1980)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
Davis, T.A.: University of Florida sparse matrix collection. Submitted to ACM Transactions on Mathematical Software
Dawes, B., Abrahams, D.: The Boost C++ libraries (2009), www.boost.org
Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)
Galil, Z., Italiano, G.F.: Data structures and algorithms for disjoint set union problems. ACM Comput. Surv. 23(3), 319–344 (1991)
Gilbert, J.R., Ng, E.G., Peyton, B.W.: An efficient algorithm to compute row and column counts for sparse Cholesky factorization. SIAM J. Matrix Anal. Appl. 15(4), 1075–1091 (1994)
Hynes, R.: A new class of set union algorithms. Master’s thesis, Department of Computer Science, University of Toronto, Canada (1998)
Liu, J.W.H.: The role of elimination trees in sparse factorization. SIAM J. Matrix Anal. Appl. 11, 134–172 (1990)
Manne, F., Patwary, M.M.A.: A scalable parallel union-find algorithm for distributed memory computers. To appear in proc. PPAM 2009. LNCS. Springer, Heidelberg (2009)
Melhorn, K., Näher, S.: LEDA, A Platform for Combinatorial Geometric Computing. Cambridge University Press, Cambridge (1999)
Osipov, V., Sanders, P., Singler, J.: The filter-Kruskal minimum spanning tree algorithm. In: ALENEX, pp. 52–61 (2009)
Patwary, M.M.A., Blair, J., Manne, F.: Efficient Union-Find implementations. Tech. Report 393, Dept. Computer Science, University of Bergen (2010), http://www.uib.no/ii/forskning/reports-in-informatics/reports-in-informatics-2010-2019
Poutré, J.A.L.: Lower bounds for the union-find and the split-find problem on pointer machines. J. Comput. Syst. Sci. 52, 87–99 (1996)
Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM 22, 215–225 (1975)
Tarjan, R.E.: A class of algorithms which require nonlinear time to maintain disjoint sets. J. Comput. Syst. Sci. 18, 110–127 (1979)
Tarjan, R.E., van Leeuwen, J.: Worst-case analysis of set union algorithms. J. ACM 31, 245–281 (1984)
Wassenberg, J., Bulatov, D., Middelmann, W., Sanders, P.: Determination of maximally stable extremal regions in large images. In: Proc. of Signal Processing, Pattern Recognition, and Applications (SPPRA). Acta Press (2008)
Wu, K., Otoo, E., Suzuki, K.: Optimizing two-pass connected-component labeling algorithms. Pattern Anal. Appl. 12, 117–135 (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Patwary, M.M.A., Blair, J., Manne, F. (2010). Experiments on Union-Find Algorithms for the Disjoint-Set Data Structure. In: Festa, P. (eds) Experimental Algorithms. SEA 2010. Lecture Notes in Computer Science, vol 6049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13193-6_35
Download citation
DOI: https://doi.org/10.1007/978-3-642-13193-6_35
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-13192-9
Online ISBN: 978-3-642-13193-6
eBook Packages: Computer ScienceComputer Science (R0)