Experiments on union-find algorithms for the disjoint-set data structure

  • Authors:
  • Md. Mostofa Ali Patwary;Jean Blair;Fredrik Manne

  • Affiliations:
  • Department of Informatics, University of Bergen, Bergen, Norway;Department of EE and CS, United States Military Academy, West Point, NY;Department of Informatics, University of Bergen, Bergen, Norway

  • Venue:
  • SEA'10 Proceedings of the 9th international conference on Experimental Algorithms
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

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.