A persistent union-find data structure

  • Authors:
  • Sylvain Conchon;Jean-Christophe Filliâtre

  • Affiliations:
  • Université Paris-Sud, Orsay, France;CNRS, Orsay, France

  • Venue:
  • ML '07 Proceedings of the 2007 workshop on Workshop on ML
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

The problem of disjoint sets, also known as union-find, consists in maintaining a partition of a finite set within a data structure. This structure provides two operations: a function find returning the class of an element and a function union merging two classes. An optimal and imperative solution is known since 1975. However, the imperative nature of this data structure may be a drawback when it is used in a backtracking algorithm. This paper details the implementation of a persistent union-find data structure as efficient as its imperative counterpart. To achieve this result, our solution makes heavy use of imperative features and thus it is a significant example of a data structure whose side effects are safely hidden behind a persistent interface. To strengthen this last claim, we also detail a formalization using the Coq proof assistant which shows both the correctness of our solution and its observational persistence.