Boolean Equi-propagation for Concise and Efficient SAT Encodings of Combinatorial Problems

Amit Metodi, Michael Codish, Peter J. StuckeyJAIR 2013 · DOI

Abstract

We present an approach to propagation-based SAT encoding of combinatorial problems, Boolean equi-propagation, where constraints are modeled as Boolean functions which propagate information about equalities between Boolean literals. This information is then applied to simplify the CNF encoding of the constraints. A key factor is that considering only a small fragment of a constraint model at one time enables us to apply stronger, and even complete, reasoning to detect equivalent literals in that fragment. Once detected, equivalences apply to simplify the entire constraint model and facilitate further reasoning on other fragments. Equi-propagation in combination with partial evaluation and constraint simplification provide the foundation for a powerful approach to SAT-based finite domain constraint solving. We introduce a tool called BEE (Ben-Gurion Equi-propagation Encoder) based on these ideas and demonstrate for a variety of benchmarks that our approach leads to a considerable reduction in the size of CNF encodings and subsequent speed-ups in SAT solving times.

Introduction

Modern Boolean Satisfiability (SAT) solvers are incredibly powerful, but their performance often depends heavily on how a problem is "encoded" into the standard Conjunctive Normal Form (CNF). When translating high-level combinatorial problems—such as scheduling or puzzles—into SAT, the process typically involves "bit-blasting" integer constraints into millions of simple Boolean clauses. This often discards high-level structural information.

Existing CNF simplification techniques, like unit propagation, are usually applied to the entire formula. Due to the massive size of these formulas, such simplifications must be computationally inexpensive, which limits their depth. Metodi, Codish, and Stuckey propose Boolean Equi-propagation (BEP), a technique that maintains constraint structure to apply stronger reasoning to small fragments of the model, identifying equalities between variables that standard tools would miss.

Methodology: The BEE Framework

The core contribution is the Ben-Gurion Equi-propagation Encoder (BEE), a tool implemented in Prolog that compiles high-level models into simplified CNF. Instead of merely identifying literals that must be true or false (unit propagation), BEP identifies literals that must be equal (e.g., $x_1 = x_2$ or $x_1 = \neg x_2$).

Core Components

  1. Portioning: The model is partitioned into small sub-formulae based on original constraints.
  2. Equi-propagators: Reasoning is applied to each portion to infer equalities. Implementation styles include SAT-based (solving the fragment), BDD-based (extracting implications from a Binary Decision Diagram), and ad-hoc rules for common constraints like addition or "all-different."
  3. Partial Evaluation: When an equality is found, the system replaces variables globally and simplifies remaining constraints (e.g., $x + y = 10$ with $x=y$ becomes $2x = 10$).
  4. Order Encoding: BEE utilizes order encoding for integers, where an integer $X$ is represented by a bit vector where the $i$-th bit signifies $X \ge i$. This representation is highly synergistic with equi-propagation.
A Kakuro puzzle represented with variables $I_1, \dots, I_7$.
The BEE model constraints for the Kakuro puzzle instance.

Evaluation and Key Insights

The authors evaluated BEE on several difficult combinatorial benchmarks, including Kakuro puzzles, Quasigroup Completion Problems (QCP), DNA Word Design, Vertex Magic Total Labeling (VMTL), and Balanced Incomplete Block Designs (BIBD).

Key Results

  • Efficiency: On QCP benchmarks, BEE was 38 times faster and produced 20 times fewer clauses on average compared to standard order encoding without equi-propagation.
  • Scalability: BEE solved "interesting" instances of the VMTL problem that were previously unsolvable.
  • Size Reduction: Across all benchmarks, BEE reduced the number of variables and clauses by approximately 50-60%.

Insights

  • The Power of Locality: Reasoning that is NP-hard globally becomes feasible when applied to tiny fragments. These local insights then propagate to simplify the entire model.
  • Superiority over Unit Propagation: Complete equi-propagation is strictly stronger than unit propagation, finding all implications that unit propagation would, plus additional equalities.
  • Structural Preservation: By keeping the "intent" of constraints alive during simplification, BEE drives more aggressive optimizations than post-hoc CNF simplifiers.

Conclusion and Future Work

While BEE is highly effective for small to medium integer domains, its reliance on unary order encoding can lead to memory issues for very large domains (e.g., 32-bit integers). Future work aims to extend BEE to support binary or mixed-radix encodings and to integrate more global constraints into the equi-propagation framework. Overall, Boolean equi-propagation provides a powerful foundation for efficient SAT-based finite domain constraint solving.

Summary updated

BibTeX
@article{metodi2013boolean,
  author = {Amit Metodi and Michael Codish and Peter J. Stuckey},
  title = {{Boolean Equi-propagation for Concise and Efficient SAT Encodings of Combinatorial Problems}},
  journal = {J. Artif. Intell. Res.},
  year = {2013},
  doi = {10.1613/jair.3809},
}
Figure