Tuesday, January 11, 2011

Union-Find Algorithms

Union-Find Algorithm is an algorithm used for systematically maintaining, joining or connecting different sets. Each set may have one or more elements and the set is represented by the value of its root. This algorithm performs two useful operations:
  • Find - it determines which set an element is in or by calling this function, returns the root of the set.
  • Union - it joins or merges two different sets into a single set.
This algorithm is also used to solve partitioning problems or deciding when to make partitions of a given multiset.

To show visually how union-find algorithm works, here is a link of an applet that implements the said algorithm.
http://research.cs.vt.edu/AVresearch/UF/