Experimental Evaluation of Preprocessing Techniques in Constraint Satisfaction Problems

Rina Dechter, Itay Meiri

Abstract

This paper investigates the trade-off between preprocessing and search in Constraint Satisfaction Problems (CSPs). Through an experimental evaluation of directional consistency algorithms and variable ordering heuristics, the authors identify optimal strategies for solving hard binary CSPs. Results indicate that while heavy preprocessing like Adaptive-Consistency can eliminate backtracking, its computational overhead often exceeds its benefits. Instead, lightweight Directional Arc-Consistency (DAC) combined with Backjumping (BJ) and Max-Cardinality ordering provides the most efficient balance for practical problem-solving.

Introduction

Constraint Satisfaction Problems (CSPs)—such as scheduling, map coloring, and circuit design—are NP-complete, making them increasingly difficult to solve as they scale. The standard approach is backtracking, which assigns values to variables sequentially and retreats upon encountering a dead end. To enhance performance, researchers developed consistency-enforcing algorithms as preprocessing steps to prune the search space. While theoretically "cheap" (polynomial) compared to exponential search, the practical overhead of these techniques often negates their savings. This study by Dechter and Meiri seeks to identify the "sweet spot" where minimal preprocessing yields maximum search efficiency.

Methods

The authors evaluated two independent dimensions of CSP optimization:

  1. Directional Preprocessing: Three levels of consistency were tested:
  2. Directional Arc-Consistency (DAC): Ensures consistency between pairs of variables in a specific search order.
  3. Directional Path-Consistency (DPC): A more rigorous check involving triplets of variables.
  4. Adaptive-Consistency (ADAPT): A powerful version that guarantees a backtrack-free search but at a high computational cost.
  5. Variable Ordering Heuristics: The study compared fixed orderings (Min-width, Max-degree, Max-cardinality) and dynamic ordering, which re-evaluates variable selection during search.

These techniques were integrated with standard Backtracking (BTK) and Backjumping (BJ). The experiments utilized randomly generated binary CSPs, specifically filtering for "hard" instances with 10 to 15 variables to ensure a rigorous test of the preprocessing methods.

Key Results and Insights

The "Sweet Spot" of Preprocessing

A central finding is that more preprocessing is not inherently better. While ADAPT theoretically eliminates backtracking, the effort required to reach that state often exceeds the cost of managing dead ends with a smart search algorithm like Backjumping. As shown in Figure 5, the complexity of ADAPT grows exponentially with the "induced width" ($W^*$) of the problem, causing its performance to degrade significantly faster than simple backtracking or backjumping for complex instances.

Consistency checks for ADAPT, BJ, and BTK as a function of induced width (W*) for n=15.

DAC as the Optimal Strategy

Directional Arc-Consistency (DAC) emerged as the most efficient preprocessing technique. It provides sufficient constraint recording to assist search without the prohibitive time and memory overhead associated with DPC or ADAPT. Figure 6 demonstrates that DAC consistently requires fewer consistency checks than DPC or standard BJ as the problem complexity ($W^*$) increases.

Comparison of DAC, DPC, and BJ consistency checks for n=10.

Variable Ordering and Search Efficiency

Among fixed ordering heuristics, Max-Cardinality proved most effective by creating search structures that minimize problem width. While dynamic ordering was superior at pruning the search space, its high computational overhead often resulted in longer total runtimes. Furthermore, the combination of DAC + BJ consistently outperformed using Backjumping alone, highlighting the value of lightweight preprocessing.

Conclusion

The study concludes that heavy preprocessing like ADAPT is only justifiable when solving the same constraint network repeatedly, allowing the high initial cost to be amortized. For single-run problem solving, the lightweight combination of DAC, BJ, and Max-Cardinality ordering is superior. Future work should address the memory constraints of larger problems and the application of these techniques to non-binary, higher-order constraints.

Summary updated

BibTeX
@inproceedings{dechter1989experimental,
  author = {Rina Dechter and Itay Meiri},
  title = {{Experimental Evaluation of Preprocessing Techniques in Constraint Satisfaction Problems}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1989},
}
Figure