Skip to main content

Experiments on Union-Find Algorithms for the Disjoint-Set Data Structure

  • Conference paper
Experimental Algorithms (SEA 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6049))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bader, D.A., Madduri, K.: GTGraph: A synthetic graph generator suite (2006), http://www.cc.gatech.edu/~kamesh/GTgraph

  2. 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)

    Article  MATH  MathSciNet  Google Scholar 

  3. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  4. Davis, T.A.: University of Florida sparse matrix collection. Submitted to ACM Transactions on Mathematical Software

    Google Scholar 

  5. Dawes, B., Abrahams, D.: The Boost C++ libraries (2009), www.boost.org

  6. Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)

    MATH  Google Scholar 

  7. Galil, Z., Italiano, G.F.: Data structures and algorithms for disjoint set union problems. ACM Comput. Surv. 23(3), 319–344 (1991)

    Article  Google Scholar 

  8. 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)

    Article  MATH  MathSciNet  Google Scholar 

  9. Hynes, R.: A new class of set union algorithms. Master’s thesis, Department of Computer Science, University of Toronto, Canada (1998)

    Google Scholar 

  10. Liu, J.W.H.: The role of elimination trees in sparse factorization. SIAM J. Matrix Anal. Appl. 11, 134–172 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  11. 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)

    Google Scholar 

  12. Melhorn, K., Näher, S.: LEDA, A Platform for Combinatorial Geometric Computing. Cambridge University Press, Cambridge (1999)

    Google Scholar 

  13. Osipov, V., Sanders, P., Singler, J.: The filter-Kruskal minimum spanning tree algorithm. In: ALENEX, pp. 52–61 (2009)

    Google Scholar 

  14. 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

  15. 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)

    Article  MATH  Google Scholar 

  16. Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM 22, 215–225 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  17. Tarjan, R.E.: A class of algorithms which require nonlinear time to maintain disjoint sets. J. Comput. Syst. Sci. 18, 110–127 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  18. Tarjan, R.E., van Leeuwen, J.: Worst-case analysis of set union algorithms. J. ACM 31, 245–281 (1984)

    Article  MATH  Google Scholar 

  19. 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)

    Google Scholar 

  20. Wu, K., Otoo, E., Suzuki, K.: Optimizing two-pass connected-component labeling algorithms. Pattern Anal. Appl. 12, 117–135 (2009)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics