0% found this document useful (0 votes)
33 views3 pages

Sheet 5

The document outlines various constraint satisfaction problems (CSP) related to map coloring, class scheduling, and room assignments for characters from Pacman. It includes tasks such as applying forward checking, formulating problems with variables and constraints, and drawing constraint graphs. Each section requires the identification of values that can be eliminated based on given assignments and constraints.

Uploaded by

george.emil030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views3 pages

Sheet 5

The document outlines various constraint satisfaction problems (CSP) related to map coloring, class scheduling, and room assignments for characters from Pacman. It includes tasks such as applying forward checking, formulating problems with variables and constraints, and drawing constraint graphs. Each section requires the identification of values that can be eliminated based on given assignments and constraints.

Uploaded by

george.emil030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Sheet 5

1- You are a map-coloring robot assigned to color this Southwest USA map. Adjacent regions
must be colored in a different color (R=Red, G=Green, B=Blue). The constraint graph is
shown.

NV
CO
UT
CA

AZ NM

a. Cross out all values that would be eliminated by forward checking, after variable AZ
has just been assigned value R as shown:

CA NV AZ UT CO NM
RGB RGB R RGB RGB RGB

2- This problem asks about the Map Coloring Problem. Each region must be colored one of
Red (R), Green (G), or Blue (B).
Neighboring regions must be a different color. The map (left) and constraint graph (right) are
below.

Consider the partial assignment below. Variable B has been assigned value R as shown.
Cross out all values that would be eliminated by Forward Checking after the assignment to
variable B.

A B C D E F
RGB R RGB RGB RGB RGB
3- You are in charge of scheduling for computer science classes that meet Mondays,
Wednesdays and Fridays. There are 5 classes that meet on these days and 3 professors who
will be teaching these classes. You are constrained by the fact that each professor can only
teach one class at a time.

The classes are:


1. Class 1- Intro to Programming: meets from 8:00-9:00am
2. Class 2- Intro to Arti cial Intelligence: meets from 8:30-9:30am
3. Class 3- Natural Language Processing: meets from 9:00-10:00am
4. Class 4- Computer Vision: meets from 9:00-10:00am
5. Class 5- Machine Learning: meets from 10:30-11:30am

The professors are:

1. Professor A, who is qualified to teach Classes 1, 2, and 5.

2. Professor B, who is qualified to teach Classes 3, 4, and 5.

3. Professor C, who is qualified to teach Classes 1, 3, and 4.

a- Formulate this problem as a CSP problem in which there is one variable per class, stating
the domains, and constraints. Constraints should be specified formally and precisely but
may be implicit rather than explicit.

b- Draw the constraint graph associated with your CSP.

c- Cross out all Unary Constraints

C1 C2 C3 C4 C5
ABC ABC ABC ABC ABC

d- Apply forward checking after applying the unary constraints, assuming the first assigning
would be for C4 and has value to be B.
4- After years of struggling through mazes, Pacman has finally made peace with the ghosts,
Blinky, Pinky, Inky, and Clyde, and invited them to live with him and Ms. Pacman. The move
has forced Pacman to change the rooming assignments in his house, which has 6 rooms.
He has decided to figure out the new assignments with a CSP in which the variables are
Pacman (P), Ms. Pacman (M), Blinky (B), Pinky (K), Inky (I), and Clyde (C), the values are
which room they will stay in, from 1-6, and the constraints are:

i. No two agents can stay in the same room


ii. P > 3
iii. K is less than P
iv. M is either 5 or 6
v. P > M
vi. B is even
vii. I is not 1 or 6
viii. |I-C| = 1
ix. |P-B| = 2

a- Unary constraints on the grid below cross out the by enforcing unary constraints.

P 1 2 3 4 5 6
B 1 2 3 4 5 6
C 1 2 3 4 5 6
K 1 2 3 4 5 6
I 1 2 3 4 5 6
M 1 2 3 4 5 6

b- Forward Checking For the purpose of decoupling this problem from your solution to the
previous problem, assume we choose to assign P first, and assign it the value 6. What
are the resulting domains after enforcing unary constraints (from part i) and running
forward checking for this assignment?

P 6
B 1 2 3 4 5 6
C 1 2 3 4 5 6
K 1 2 3 4 5 6
I 1 2 3 4 5 6
M 1 2 3 4 5 6

You might also like