Title: Maintaining%20Arc%20Consistency
1Maintaining Arc Consistency
We have a constraint graph G of variables
X1,...Xn, and constraint relations Xi ?Xj,
and each Xi has a value set V(Xi ). An arc from
Xi to Xj is consistent if ?v ? V(Xi ) ?w ? V(Xj)
? v,w is consistent Conversely, an arc is
inconsistent if ? v ? V(Xi ) ? w ? V(Xj) ? v,w
is inconsistent. The arc can be made consistent
by removing v.
Q1
Q2
Q3
Q4
2Arc Consistency (4 queens problem) Example 1
Remove a value v of Qx if there is a variable
Qy such that v is inconsistent with all remaining
values of Qy
- 5 9
- 4 8
- 2 7
1 3 6
4 3 2 1
Numbers indicate sequence of values that are
deleted.
Q1 Q2 Q3 Q4
Starting with Q11, arc consistency check proves
this inconsistent without trying any more
assignments.
3Arc Consistency (4 queens problem)Example 2
Remove a value v of Qx if there is a variable
Qy such that v is inconsistent with all remaining
values of Qy
- 6 9
- 3 5
2 4 8
- 1 7
4 3 2 1
Numbers indicate sequence of values that are
deleted.
Q1 Q2 Q3 Q4
Starting with Q12, arc consistency check finds a
solution without trying any more assignments.