Constraint Propagation: Domain Reduction by Inference

Shrink a CSP before search by removing domain values that cannot satisfy a constraint. Covers support-based pruning, arc consistency, and propagation to a fixed point.

Step 1 of 157%

Tutorial

Pruning Unsupported Values

A constraint satisfaction problem assigns each variable a value from its domain so that all constraints hold. Before searching for a solution, we can shrink the problem by removing values that cannot participate in any solution.

Given a binary constraint C(X,Y)C(X, Y), a value vdom(X)v \in \text{dom}(X) has support in dom(Y)\text{dom}(Y) if there exists some wdom(Y)w \in \text{dom}(Y) such that C(v,w)C(v, w) is true. A value with no support cannot appear in any solution, so we may safely remove it from dom(X)\text{dom}(X). This pruning step is called domain reduction by inference.

To illustrate, let dom(X)={1,2,3,4,5,6}\text{dom}(X) = \{1, 2, 3, 4, 5, 6\} and dom(Y)={2,3}\text{dom}(Y) = \{2, 3\}, with constraint X<YX < Y. For each candidate xdom(X)x \in \text{dom}(X), we check whether some ydom(Y)y \in \text{dom}(Y) satisfies x<yx < y:

x=1: 1<2x=2: 2<3x=3: 3<2 and 3<3 both fail. Prune.x=4,5,6: no y{2,3} exceeds them. Prune.\begin{array}{l}x = 1{:}\ 1 < 2 \checkmark \\ x = 2{:}\ 2 < 3 \checkmark \\ x = 3{:}\ 3 < 2\text{ and }3 < 3\text{ both fail. Prune.} \\ x = 4, 5, 6{:}\ \text{no }y \in \{2,3\}\text{ exceeds them. Prune.}\end{array}

After pruning, dom(X)={1,2}\text{dom}(X) = \{1, 2\}.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle