A persistent union-find data structure
Sylvain Conchon, Jean-Christophe Filliâtre · 2007
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.
Cited by 47 works. doi:10.1145/1292535.1292541
Authors
References
- Introduction to Algorithms
- Data Structures and Algorithms
- Efficiency of a Good But Not Linear Set Union Algorithm
- Data Structures and Algorithms
- The calculus of constructions
- Making data structures persistent
- Interactive Theorem Proving and Program Development
- Fast Decision Procedures Based on Congruence Closure
- Purely Functional Data Structures
- Deciding Combinations of Theories