The Logic Behind Weighted CSP

Carlos Ansótegui, Maria Luisa Bonet, Jordi Levy, Felip ManyàIJCAI 2007

Abstract

This paper establishes a formal logical foundation for Weighted Constraint Satisfaction Problems (WCSP) by bridging them with the world of Satisfiability (SAT) through a novel "signed encoding." By transforming WCSPs into Signed Max-SAT problems, the authors demonstrate that standard optimization techniques, such as soft arc consistency, are specific instances of a new, complete resolution calculus. This unification provides a rigorous theoretical framework for disparate heuristics in automated reasoning, proving that enforcing local consistency is equivalent to performing logical resolution.

Introduction

In the field of automated reasoning, two prominent communities—Constraint Programming (CP) and Satisfiability (SAT)—often tackle identical optimization challenges from different perspectives. Weighted Constraint Satisfaction Problems (WCSPs) are a cornerstone of CP, used to model "over-constrained" scenarios like complex scheduling or resource allocation where constraints have associated costs. The objective is to minimize the total cost of violated constraints.

While researchers have developed highly effective algorithms for WCSP, such as Branch and Bound or Bucket Elimination, these methods frequently rely on "local consistency" properties that can appear as a collection of specialized heuristics. This paper addresses the lack of a unified underlying logic for WCSP, showing that these disparate techniques are actually components of a single, rigorous logical framework based on Signed Max-SAT.

Methods: The Logical Bridge

The authors propose three key components to build this bridge between CP and SAT:

1. Signed Encoding

They define a method to translate any WCSP instance into a "Signed Max-SAT" formula. Unlike standard Boolean SAT, which uses binary variables, "signed" logic allows variables to take multiple values from a discrete domain (e.g., $x \in \{a, b, c\}$). This is significantly more natural for CSPs, as it avoids the "variable explosion" typically encountered when binarizing multi-valued problems. A literal in this logic represents a set of possible values for a variable, denoted as $S:x$.

An illustrative example of a 3-variable WCSP and its corresponding signed encoding into clauses.

2. Signed Max-SAT Resolution

The core of the framework is a novel resolution-style inference rule. In standard SAT, resolution is used to find contradictions. In the context of Signed Max-SAT, the rule is designed to "move" costs between clauses while preserving the total minimum cost of the formula. The authors formally prove that this calculus is both sound (it preserves the optimal solution) and complete (it is capable of finding the optimal solution through iterative application).

Fundamental resolution rules (Rule 1 and Rule 2) introduced to manipulate costs within the Signed Max-SAT framework.

3. Derived Rules for Local Consistency

By defining specific "shortcut" rules derived from their general resolution calculus, the authors demonstrate that well-known CSP techniques—such as Node Consistency (NC), Arc Consistency (AC), and Directional Arc Consistency (DAC*)—are not just heuristics but formal logical inferences. This mapping provides a theoretical justification for why these properties are so effective in solving optimization problems.

Key Insights and Results

The primary contribution of this work is the unification of two previously distinct fields. The realization that soft local consistency in CSPs is a form of logical inference allows for a deeper understanding of optimization algorithms.

Key results include:

  • Formal Soundness and Completeness: The paper provides the first formal proof for a resolution calculus tailored specifically for Signed Max-SAT.
  • Algorithmic Framework: An exact algorithm for solving WCSPs is extracted directly from the completeness proof of the resolution calculus, suggesting that resolution-based solvers could compute joint operations incrementally and potentially more efficiently than traditional bucket elimination.
  • Theoretical Mapping: The successful mapping of major CSP consistency properties (NC, AC, DAC, and FAC) to specific logical inference rules provides a "first principles" explanation for their utility.

Limitations and Future Directions

Despite the elegance of the logic, the exact algorithm still faces exponential worst-case complexity, a characteristic inherent to NP-hard optimization problems. Furthermore, while the signed encoding naturally handles n-ary constraints, much of the current mapping to local consistency focuses on binary constraints.

Future work involves investigating new derived rules that could be applied in polynomial time to enforce even stronger forms of soft local consistency than those currently utilized in the CSP community. The authors are also exploring how this incremental resolution approach can be scaled to larger, real-world datasets.

Summary updated

BibTeX
@inproceedings{ansotegui2007logic,
  author = {Carlos Ansótegui and Maria Luisa Bonet and Jordi Levy and Felip Manyà},
  title = {{The Logic Behind Weighted CSP}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2007},
}
Figure