Towards Efficient Consistency Enforcement for Global Constraints in Weighted Constraint Satisfaction

Jimmy Ho-Man Lee, Ka Lun LeungIJCAI 2009

Introduction

In the field of automated reasoning, Constraint Satisfaction Problems (CSPs) provide a framework for finding solutions that meet specific requirements. However, real-world problems are frequently over-constrained, meaning no assignment satisfies all constraints. Weighted CSPs (WCSPs) address this by assigning costs to constraint violations, transforming the task into an optimization problem: finding the assignment with the minimum total cost.

A cornerstone of solving WCSPs efficiently is consistency enforcement. These mathematical techniques prune impossible values from variable domains and provide lower-bound estimates for the total cost of a partial solution. While these methods are highly effective for constraints involving few variables, they have historically struggled with global constraints (e.g., allDifferent), which involve many variables simultaneously. Previous approaches were either too weak to provide significant pruning or too computationally expensive for practical use.

Flow-Based Consistency Enforcement

This paper introduces a framework that bridges the gap between WCSPs and global constraints by leveraging Minimum Cost Flow (MCF) algorithms. The authors demonstrate that complex operations like projecting costs from a global constraint to individual variables can be modeled as flow problems in a graph.

Flow network representation of a global constraint.

The core innovation lies in three key operations:

  1. Minimum Cost Computation: Finding the cheapest way to satisfy a global constraint.
  2. Projection: Moving costs from a global constraint to simpler, single-variable (unary) constraints.
  3. Extension: The reverse of projection—moving costs from unary constraints back into the global constraint.

By representing a global constraint as a network of nodes and edges, the authors show that these operations can be performed in polynomial time for a class of "projection-safe" constraints, including allDifferent, gcc, and same.

Consistency Levels and Search Space Pruning

The framework supports multiple levels of consistency, ranging from basic $\emptyset$IC to high-level FDGAC* (Full Directional Generalized Arc Consistency). Stronger consistency levels require more computation per node but result in a much smaller search tree.

Comparison of WCSPs before and after consistency enforcement.

Enforcing FDGAC* allows the solver to "look ahead" more effectively by shifting costs toward the root of the search tree. This proactive cost movement enables the solver to prune entire branches of the search space much earlier than basic methods.

Experimental Results

The authors evaluated their approach using a softened version of the all-interval series problem. The results demonstrate that the extra computational effort for stronger consistency pays off significantly:

  • Pruning Power: FDGAC removed up to 220 times more search nodes than basic methods and 18 times more than intermediate GAC methods.
  • Solving Speed: Despite the complexity of the flow-based propagators, the massive reduction in search nodes led to total solving times that were often an order of magnitude faster.
  • Scalability: As problem size increased, basic methods quickly reached time-out limits, while the flow-based FDGAC* approach continued to find solutions efficiently.

Conclusion

By adapting graph-based flow algorithms for WCSPs, this research provides a scalable way to handle global constraints in optimization problems. While currently limited to projection-safe constraints, the framework offers a significant performance boost for many common constraint types. Future work will focus on extending these techniques to a broader range of global constraints and optimizing implementation overhead in general-purpose solvers.

Summary updated

BibTeX
@inproceedings{lee2009towards,
  author = {Jimmy Ho-Man Lee and Ka Lun Leung},
  title = {{Towards Efficient Consistency Enforcement for Global Constraints in Weighted Constraint Satisfaction}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2009},
}
Figure