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

Quiz 2

The document is a quiz for a course on constraint satisfaction problems (CSPs). It contains two questions - the first asks about properties of a less-than chain CSP and the second asks to layout buildings on a grid according to certain adjacency and non-adjacency constraints.

Uploaded by

meera8jameel
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)
37 views3 pages

Quiz 2

The document is a quiz for a course on constraint satisfaction problems (CSPs). It contains two questions - the first asks about properties of a less-than chain CSP and the second asks to layout buildings on a grid according to certain adjacency and non-adjacency constraints.

Uploaded by

meera8jameel
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

American University of Sharjah Instructor: Omar Arif

School of Engineering Office: ESB-2178


Department of Computer Engineering Phone: 971-6-515 4821
P. O. Box 26666 e-mail: [email protected]
Sharjah, UAE Semester: Spring 2023
Failure to put your name and ID will result in a
2-point deduction from you grade.

Name: ____________________
ID : ____________________

CMP333 – Quiz 2
Time: 30 minutes
Total Points: 10

Question 1 (3 points)
Consider the general less-than chain CSP below. Each of the N variables Xi has the domain
{1 . . . 𝑀}. The constraints between adjacent variables 𝑋! and 𝑋!"# require that 𝑋! < 𝑋!"#

For now, assume N = M = 5.


1. [1 pt] How many solutions does the CSP have?

Only one solution

2. [1 pt] What will the domain of 𝑋# be after enforcing the consistency of only the arc 𝑋# →
𝑋$ ?

Dom(X1) = {1,2,3,4}

3. [1 pt] What will the domain of 𝑋# be after enforcing the consistency of only the arcs
𝑋$ → 𝑋% then 𝑋# → 𝑋$ ?

Dom(X1) = {1,2,3}
Question 2 (7 points)

You are asked to determine the layout of a new, small college. The campus will have four
structures: an administration building (A), a bus stop (B), a classroom (C), and a dormitory (D).
Each building must be placed somewhere on the grid below. The following constraints must be
satisfied:
(i) The bust stop (B) must be adjacent to the road.
(ii) The administration building (A) and the classroom (C) must both be adjacent to the
bus stop (B).
(iii) The classroom (C) must be adjacent to the dormitory (D).
(iv) The administration building (A) must not be adjacent to the dormitory (D).
(v) The administration building (A) must not be on a hill.
(vi) The dormitory (D) must be on a hill or near the road.
(vii) All buildings must be in different grid squares.

Here, “adjacent” means that the buildings must share a grid edge, not just a corner.

1. [1 pts] Express the non-unary above constraints using constraint graph. Use sold line to
indicate adjacency constraint and dotted line to indicate non-adjacency constraint.
2. [4 pts] Cross out eliminated values to show the domains of all variables after unary
constraints and arc consistency has been applied in the following order:
𝑨 → 𝑩, 𝑩 → 𝑨, 𝑨 → 𝑫, 𝑫 → 𝑨, 𝑩 → 𝑪, 𝑪 → 𝑩, 𝑪 → 𝑫, 𝑫 → 𝑪

3. [2pts] Give a solution for this CSP or state that none exist. Draw the search tree. Use
Minimum remaining heuristic and degree heuristic. Break the ties using alphabetical
order.

You might also like