@MISC{Frühwirth06derivingquasi-linear-time, author = {Thom Frühwirth}, title = {Deriving Quasi-Linear-Time Algorithms from Union-Find in CHR (Extended Abstract)}, year = {2006} }
Share
OpenURL
Abstract
The union-find algorithm can be seen as solving simple equations between variables or constants. With a few lines of code change, we generalise its implementation in CHR from equality to arbitrary binary relations. By choosing the appropriate relations, we can derive fast algorithms for solving certain propositional logic (SAT) problems as well as certain polynomial equations in two variables. While linear-time algorithms are known to check satisfiability and to exhibit certain solutions of these problems, our algorithms are simple instances of the generic algorithm and have additional properties that make them suitable for incorporation into constraint solvers: From classical union-find, they inherit simplicity and quasi-linear time and space. By nature of CHR, they are anytime and online algorithms. They can be parallelised. They solve and simplify the constraints in the problem, and can test them for entailment, even when the constraints arrive incrementally, one after the other. We show that instances where relations are bijective functions yield precise and correct algorithm instances of our generalised union-find.