m5 CSP
m5 CSP
Problems
Chapter 5
Section 1 – 3
Variables: F T U W
R O X1 X2 X 3
Domains: {0,1,2,3,4,5,6,7,8,9}
Constraints: Alldiff (F,T,U,W,R,O)
X2 + T + T = O + 10 · X3
X3 = F, T ≠ 0, F ≠ 0
O + O = R + 10 · X1
X1 + W + W = U + 10 · X2
03/28/24 CS 3243 - Constraint Satisfaction 9
Real-world CSPs
Assignment problems
e.g., who teaches what class
Timetabling problems
e.g., which class is offered when and where?
Transportation scheduling
Factory scheduling
Notice that many real-world problems involve real-
valued variables
03/28/24 CS 3243 - Constraint Satisfaction 18
Most constrained variable
Most constrained variable:
choose the variable with the fewest legal values
03/28/24 CS 3243 - Constraint Satisfaction 29
Arc consistency
Simplest form of propagation makes each arc consistent
X Y is consistent iff
for every value x of X there is some allowed y
03/28/24 CS 3243 - Constraint Satisfaction 33
Summary
CSPs are a special kind of problem:
states defined by values of a fixed set of variables
goal test defined by constraints on variable values
03/28/24 CS 3243 - Constraint Satisfaction 34