Previous Up Next

14.2  Background: Constraint Satisfaction Problems

There is a large body of scientific work and literature about Constraint Satisfaction Problems, or CSPs. CSPs are a restricted class of constraint problems with the following properties

The restriction to binary constraints is not really limiting since every CSP can be transformed into a binary CSP. However, this is often not necessary since many algorithms can be generalised to n-ary constraints.

A CSP network is the graph formed by considering the variables as nodes and the constraints as arcs between them. In such a network, several levels of consistency can be defined:

Node consistency
vDi : ci(v) (not very interesting). It means that all unary constraints are reflected in the domains
Arc consistency
vDiwDj : cij(v,w) (most practically relevant). It means that for every value in the domain of one variable, there is a compatible value in the domain of the other variable in the constraint. In practice, constraints are symmetric, so the reverse property also holds.
Path consistency
vDiwDjuDk : cik(v,u), ckj(u,w) (usually too expensive). One can show that this property extends to whole paths, i.e. on any path of constraints between variables i and j the variables have domain values which are compatible with any domain values for i and j.

Note that neither of these conditions is sufficient for the problem to be satisfiable. It is still necessary to search for solutions. Computing networks with these consistency levels can however be a useful intermediate step to finding a solution to the CSP.

Consequently, a complete CSP solver needs the following design decisions:

In practice, the most relevant consistency level is arc-consistency. Consequently, a number of algorithms have been proposed for the purpose of establishing arc-consistency. The algorithms used in ECLiPSe are mostly variants of AC-3 [16] and AC-5 [10].

Previous Up Next