Lab 4
Lab 4
SYSTEM
LAB 4 “CSP”
Q1: What are the three
components of a constraint
satisfaction problem?
ANSWER:
Variables: {X1, . . . , Xn}
Domains (one for each variable): {D1, . . . ,
Dn}.
Each domain Di consists of a set of values:
{….}.
Constraints that specify allowable
combinations of values
Q2:What is a answer to a
constraint satisfaction problem?
ANSWER:
A complete, consistent assignment of
values to variables.
Complete: every variable is assigned a
value.
Consistent: no constraints are violated
by the assigned values
Q3: How many solutions are there for the map-
coloring problem in the following Figure ? How
many solutions if four colors are allowed? Two
colors?
Answer:
There are 18 solutions for coloring
Australia with three colors. Start with
SA, which can have any of three colors.
Then moving clockwise, WA can have
either of the other two colors, and
everything else is strictly determined;
that makes 6 possibilities for the
mainland, times 3 for Tasmania yields
18. (3*2*1*1*1*1*3=18)
With four colors, there are 768 solutions
(4*3*2*2*2*2*4).