Skip to main content
QUICK REVIEW

[Paper Review] The alldifferent Constraint: A Survey

Willem Jan van Hoeve|ArXiv.org|May 8, 2001
Constraint Satisfaction and OptimizationComputer Science57 references91 citations
TL;DR

This paper provides a comprehensive survey of filtering algorithms for the alldifferent constraint in constraint programming, comparing techniques ranging from bound consistency to hyper-arc consistency. It presents an efficient algorithm based on maximum matching in a value graph that achieves hyper-arc consistency in O(√n ⋅ m) time, significantly improving upon previous general methods.

ABSTRACT

The constraint of difference is known to the constraint programming community since Lauriere introduced Alice in 1978. Since then, several solving strategies have been designed for this constraint. In this paper we give both a practical overview and an abstract comparison of these different strategies.

Motivation & Objective

  • To provide a practical and theoretical overview of filtering techniques for the alldifferent constraint in constraint satisfaction problems.
  • To compare different levels of local consistency—bound, range, arc, and hyper-arc consistency—within the context of the alldifferent constraint.
  • To present and analyze an efficient algorithm for achieving hyper-arc consistency using maximum matching in a value graph.
  • To establish a time complexity comparison between general filtering methods and the proposed matching-based approach.
  • To identify gaps and suggest future research directions in alldifferent constraint filtering, including reduced cost methods and symmetric/dynamic variants.

Proposed method

  • Construct a value graph where variables are on one side and domain values on the other, with edges representing allowed assignments.
  • Compute a maximum matching in the value graph using the Hopcroft-Karp algorithm, which runs in O(√n ⋅ m) time.
  • Apply Berge’s theorem to identify edges that belong to any maximum matching by analyzing even alternating paths and cycles starting from free nodes.
  • Remove all edges not in any maximum matching to enforce hyper-arc consistency, ensuring no value in a domain is infeasible.
  • Use Tarjan’s algorithm to compute strongly connected components in the residual graph to efficiently identify non-matching edges.
  • Validate the solution by checking if the size of the maximum matching equals the number of variables; if not, no solution exists.

Experimental results

Research questions

  • RQ1What are the different levels of local consistency applicable to the alldifferent constraint, and how do they differ in strength and computational cost?
  • RQ2How can hyper-arc consistency be efficiently achieved for the alldifferent constraint using graph-theoretic techniques?
  • RQ3What is the time complexity of the proposed hyper-arc consistency algorithm compared to general-purpose filtering methods?
  • RQ4Can maximum matching in a value graph be used to identify and remove all infeasible values from variable domains under the alldifferent constraint?
  • RQ5What are the limitations and potential extensions of the current filtering techniques for the alldifferent constraint, including symmetric and dynamic variants?

Key findings

  • The proposed algorithm achieves hyper-arc consistency for the alldifferent constraint in O(√n ⋅ m) time, where n is the number of variables and m is the number of edges in the value graph.
  • The time complexity of the proposed method is O(dn√n) for variable domains bounded by d, which is significantly better than the O(d!/(d−n)!) complexity of the general hyper-arc consistency algorithm.
  • The algorithm correctly detects infeasibility when no maximum matching saturates all variable nodes, which occurs when |M(GV)| < |XC|.
  • Edges not part of any maximum matching are removed using Berge’s theorem, which characterizes such edges via even alternating paths and cycles from free nodes.
  • The filtering process results in a pruned value graph where only values that can be part of a valid assignment remain, ensuring correctness and completeness.
  • The use of strongly connected components via Tarjan’s algorithm enables efficient identification of non-matching edges, contributing to the overall efficiency of the filtering step.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.