Abstract: Many combinatorial problems deal with preferences and violations, the goal of which is to find solutions with the minimum cost. Weighted constraint satisfaction is a framework for modeling such problems, which consists of a set of cost functions to measure the degree of violation or preferences of different combinations of variable assignments. Typical solution methods for weighted constraint satisfaction problems (WCSPs) are based on branch-and-bound search, which are made practical through the use of powerful consistency techniques such as AC, FDAC, EDAC to deduce hidden cost information and value pruning during search. These techniques, however, are designed to be efficient only on binary and ternary cost functions which are represented in table form. In tackling many real-life problems, high arity (or global) cost functions are required. We investigate efficient representation scheme and algorithms to bring the benefits of the consistency techniques to also high arity cost functions, which are often derived from hard global constraints from classical constraint satisfaction. The literature suggests some global cost functions can be represented as flow networks, and the minimum cost flow algorithm can be used to compute the minimum costs of such networks in polynomial time. We show that naive adoption of this flow-based algorithmic method for global cost functions can result in a stronger form of null-inverse consistency. We further show how the method can be modified to handle cost projections and extensions to maintain generalized versions of AC and FDAC for cost functions with more than two variables. Similar generalization for the stronger EDAC is less straightforward. We reveal the oscillation problem when enforcing EDAC on cost functions sharing more than one variable. To avoid oscillation, we propose a weak version of EDAC and generalize it to weak EDGAC* for non-binary cost functions. Using various benchmarks involving the soft variants of hard global constraints ALLDIFFERENT, GCC, SAME, and REGULAR, empirical results demonstrate that our proposal gives improvements of up to an order of magnitude when compared with the traditional constraint optimization approach, both in terms of time and pruning.
Introduction
Weighted Constraint Satisfaction Problems (WCSPs) provide a robust framework for modeling combinatorial problems where the goal is to minimize total cost based on preferences and violations. While researchers have developed powerful consistency techniques like AC, FDAC, and EDAC* to prune search spaces by redistributing costs, these methods were historically optimized for low-arity (binary or ternary) constraints stored in tables.
Real-world problems often involve "global" constraints spanning many variables, such as scheduling dozens of tasks. Representing these as tables leads to exponential memory growth. This paper bridges the gap by representing global cost functions as flow networks, allowing sophisticated consistency techniques to run in polynomial time.
Flow-Based Global Cost Functions
The core innovation involves leveraging the fact that many global constraints can be modeled as flow networks. In this view, finding the minimum cost of a constraint is equivalent to finding the minimum cost flow in a graph.
Simply using a flow algorithm to find the minimum cost only provides a weak form of consistency. To truly prune the search space, costs must be moved between the global constraint and individual variables. The authors identify a property called projection-safety (the FB property), which ensures that "projecting" costs to variables and "extending" them back does not destroy the graph structure required for flow algorithms.
Addressing the Oscillation Problem
Consistency algorithms often move costs between constraints. However, the strongest standard technique, EDAC*, suffers from an "oscillation problem" where costs bounce back and forth infinitely when constraints share multiple variables. This is particularly problematic for high-arity constraints.
To solve this, the authors propose weak EDGAC* (Existential Directional Generalized Arc Consistency). By using "cost-providing partitions," this method restricts how costs are distributed, ensuring the algorithm terminates while providing significantly more pruning than simpler methods.
Empirical Results
The approach was evaluated using benchmarks such as All-Interval Series, Latin Squares, and Nurse Rostering. The proposed techniques (GAC, FDGAC, and weak EDGAC*) demonstrated substantial performance gains:
- Pruning Power: The techniques reduced the number of nodes in the search tree by 10 to 100 times compared to binary decompositions.
- Runtime Efficiency: Despite the overhead of running flow algorithms, the massive reduction in search space led to overall speedups of up to an order of magnitude over traditional approaches.
Conclusion
By introducing flow-based projection-safety and weak EDGAC*, this work enables the efficient application of high-level consistency techniques to global constraints. This framework allows solvers to handle complex, real-world optimization problems with significantly improved performance and pruning capabilities.
Summary updated