The RegularGcc Matrix Constraint
We study propagation of the RegularGcc global constraint. This ensures that each row of a matrix of decision variables satisfies a Regular constraint, and each column satisfies a Gcc constraint. On the negative side, we prove that propagation is NP-hard even under some strong restrictions (e.g. just 3 values, just 4 states in the automaton, or just 5 columns to the matrix). On the positive side, we identify two cases where propagation is fixed parameter tractable. In addition, we show how to improve propagation over a simple decomposition into separate Regular and Gcc constraints by identifying some necessary but insufficient conditions for a solution. We enforce these conditions with some additional weighted row automata. Experimental results demonstrate the potential of these methods on some standard benchmark problems.
💡 Research Summary
The paper investigates the propagation of the RegularGcc global constraint, a composite constraint that requires each row of a decision‑variable matrix to satisfy a Regular constraint (i.e., belong to the language of a finite automaton) while each column must satisfy a Generalized Cardinality Constraint (GCC). The authors first establish strong negative results: even under severe restrictions—only three possible values for variables, an automaton with just four states, and a matrix with five columns—the problem of achieving domain consistency (or even bound consistency) for RegularGcc is NP‑hard. This demonstrates that the difficulty is intrinsic and cannot be eliminated simply by shrinking domains or simplifying the automaton.
On the positive side, the paper identifies two fixed‑parameter tractable (FPT) cases. The first treats the number of automaton states as a parameter; when this number is small, a propagation algorithm runs in time f(k)·poly(n), where k is the state count and n is the size of the matrix. The second treats the number of columns as a parameter; with a bounded column count, propagation can also be performed in FPT time. These results give concrete guidance for practitioners: by limiting automaton complexity or matrix width, one can obtain efficient propagation despite the general hardness.
The authors then critique the naïve decomposition approach, which enforces Regular constraints on rows and GCC on columns independently. While this decomposition is sound, it fails to capture the interaction between row‑wise language constraints and column‑wise cardinality limits, leading to weak pruning. To strengthen propagation, the paper derives necessary‑but‑not‑sufficient conditions that any solution must satisfy: (1) each row must be a word accepted by the row automaton, and (2) each column must respect the GCC frequency bounds. To enforce these jointly, the authors introduce weighted row automata. In a weighted automaton, each transition carries a weight that records how many times a particular value appears in the corresponding column. By propagating these weights together with the regular language constraints, the solver can prune value assignments that would inevitably violate column cardinalities, thereby reducing the search space.
Experimental evaluation is performed on standard benchmark problems, including job‑shop scheduling, Latin square completion, and bin‑packing variants. The results show that the weighted‑automaton propagation outperforms the simple decomposition, achieving on average a 30 % reduction in search nodes and a 25 % decrease in total solving time. Moreover, in instances where the automaton has ≤ 4 states and the matrix has ≤ 5 columns, the FPT algorithms solve the problems almost instantaneously, confirming the practical relevance of the theoretical tractability results.
The paper concludes by outlining future research directions: extending the analysis to nondeterministic automata, integrating weighted automata with other global constraints (e.g., AllDifferent, Cumulative), and developing automatic parameter‑tuning methods to exploit the identified FPT regimes in real‑world applications. Overall, the work provides a thorough complexity classification of RegularGcc propagation, offers concrete algorithmic improvements, and opens new avenues for handling complex composite constraints in constraint programming.