Question: Exercise 3 ( 1 0 points ) . Consider a CSP over variables X 1 , . . . , X 8 , each over

Exercise 3(10 points). Consider a CSP over variables X1,..., X8, each over the domain {0,1,2,3,4,5} and with the following binary constraints:
X1< X2; X5!= X6; X2< X6; X6= X71; X7= X4; X7 X83; X7+ X33
1.(1 points) Draw the constraint graph. Is it a tree? (PLEASE DRAW IT OUT)
2.(9 points) Solve the CSP (i.e., find a solution if one exists) by using the tree CSP algorithm (fig.6.11). Be explicit about every step in the algorithm (indicate how you construct the topological sort, how the domain of each variable evolves, how you pick a value for each variable, etc.). If needed to break ties within any step, use the order of the variables.
For Question 2, use the following psuedo-code and rewrite it using the answer from Question 1.
function TREE-CSP-SOLVER(csp) returns a solution, or failure
inputs: csp, a CSP with components X, D, C
nnumber of variables in X
assignmentan empty assignment
rootany variable in X
XTOPOLOGICALSORT(X,root)
for j = n down to 2 do
MAKE-ARC-CONSISTENT(PARENT(Xj),Xj)
if it cannot be made consistent then return failure
for i =1 to n do
assignment[Xi]any consistent value from Di
if there is no consistent value then return failure
return assignment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!