Optimal Union-Find in Constraint Handling Rules
Programming Languages
2007-05-23 v1 Computational Complexity
Data Structures and Algorithms
Performance
Abstract
Constraint Handling Rules (CHR) is a committed-choice rule-based language that was originally intended for writing constraint solvers. In this paper we show that it is also possible to write the classic union-find algorithm and variants in CHR. The programs neither compromise in declarativeness nor efficiency. We study the time complexity of our programs: they match the almost-linear complexity of the best known imperative implementations. This fact is illustrated with experimental results.
Cite
@article{arxiv.cs/0501073,
title = {Optimal Union-Find in Constraint Handling Rules},
author = {Tom Schrijvers and Thom Fruehwirth},
journal= {arXiv preprint arXiv:cs/0501073},
year = {2007}
}
Comments
12 pages, 3 figures, to appear in Theory and Practice of Logic Programming (TPLP)