Solving Set Constraint Satisfaction Problems using ROBDDs

Peter Hawkins, Vitaly Lagoon, Peter J. Stuckey · DOI

Abstract

Traditional constraint solvers for set variables often rely on "set bounds" approximations, which can lead to weak propagation and excessive backtracking. This paper presents a framework that represents set domains and constraints using Reduced Ordered Binary Decision Diagrams (ROBDDs). By leveraging the canonical and compact nature of ROBDDs, the proposed method achieves full domain consistency and provides significant modeling flexibility. Experimental results on combinatorial benchmarks demonstrate that this approach often outperforms established solvers like ECLiPSe and Mozart, particularly on problems with high degrees of symmetry.

Introduction

In constraint programming, set variables represent variables whose values are subsets of a finite universe $\{1, \dots, n\}$. The primary challenge in handling these variables is the combinatorial explosion: a universe of size $N$ results in $2^N$ possible values for a single set variable. Conventional solvers typically manage this by maintaining lower and upper bounds (the "subset bound" representation). While computationally efficient, this approach is a "crude approximation" that fails to capture disjunctive information, leading to weak pruning during search.

Methodology: ROBDD-Based Set Domains

The core innovation of this work is the use of Reduced Ordered Binary Decision Diagrams (ROBDDs) to represent the entire domain of a set variable rather than just its bounds.

Boolean Modeling and Representation

A set is represented by its characteristic function—a bit vector where the $i$-th bit is true if element $i$ is included in the set. An ROBDD then represents the set of all valid bit vectors (the domain). ROBDDs are particularly well-suited for this task because they are canonical and can exploit structural symmetries to represent large sets of values compactly.

ROBDD representations of set domains and constraints. (a) shows a simple domain, while (b) and (c) illustrate more complex structures.

Constraint Propagation

Constraints (e.g., $u \subseteq v$) are themselves represented as ROBDDs. Propagation is achieved by conjoining the constraint's ROBDD with the current domain ROBDDs. The solver then uses existential quantification (projection) to derive updated domains for each variable. To maintain efficiency, the authors implement several optimizations:

  • And-Abstraction: A specialized operation that combines conjunction and quantification to prevent intermediate ROBDD size explosions.
  • Divide and Conquer: An algorithm for propagating $n$-variable constraints in $O(n \log n)$ operations.
  • Hybrid Consistency: A mechanism to fall back to cardinality or lexicographic bounds when full domain propagation becomes computationally prohibitive.

Experimental Evaluation

The ROBDD-based solver was evaluated against industry standards ECLiPSe and Mozart across several benchmarks:

  • Steiner Systems: Finding subset collections with specific intersection properties.
  • Social Golfers Problem: A scheduling problem involving group meetings over multiple weeks.
  • Weighted Hamming Codes: Finding bit-strings with specific distance and weight constraints.
  • Balanced Academic Curricula (BAC): Course scheduling with prerequisite and load constraints.

Key Insights

The ROBDD framework offers two major advantages:

  1. Modeling Flexibility: Unlike traditional solvers that require custom C++ propagators for new global constraints, the ROBDD approach allows users to define complex constraints by conjoining primitives. The ROBDD machinery automatically handles the generation of an efficient propagator.
  2. Symmetry Exploitation: ROBDDs naturally collapse identical sub-structures, which is highly effective for set problems that are inherently riddled with symmetry.

Results and Discussion

The ROBDD solver consistently required orders of magnitude fewer backtracking steps ("fails") than traditional solvers. On problems like Social Golfers and Hamming Codes, it frequently achieved the fastest solution times, solving instances in seconds that caused other solvers to timeout. By merging constraints into single ROBDDs, the search space was significantly reduced compared to the "split" models required by conventional solvers.

However, the approach is not without limitations. Certain constraints, such as the atmost constraint in Steiner Triple Systems, can lead to exponential ROBDD growth. Additionally, the memory overhead of maintaining the ROBDD unique table and cache can be significant.

Conclusion

Representing set domains with ROBDDs provides a powerful alternative to traditional bounds-based solvers. It offers superior propagation and modeling ease, particularly for problems where disjunctive information and symmetry are prevalent. Future work involves developing a robust general solver that can dynamically adjust the level of consistency based on ROBDD growth during search.

Summary updated

BibTeX
@article{hawkins2005solving,
  author = {Peter Hawkins and Vitaly Lagoon and Peter J. Stuckey},
  title = {{Solving Set Constraint Satisfaction Problems using ROBDDs}},
  journal = {J. Artif. Intell. Res.},
  year = {2005},
  doi = {10.1613/jair.1638},
}
Figure