Question: Exercise 3 ( 1 0 points ) . Consider a CSP over variables X 1 , . . . , X 8 , each over
Exercise points Consider a CSP over variables X X each over the domain and with the following binary constraints:
X X; X X; X X; X X; X X; X X; X X
points Draw the constraint graph. Is it a tree? PLEASE DRAW IT OUT
points Solve the CSP ie find a solution if one exists by using the tree CSP algorithm fig 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 use the following psuedocode and rewrite it using the answer from Question
function TREECSPSOLVERcsp 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
XTOPOLOGICALSORTXroot
for j n down to do
MAKEARCCONSISTENTPARENTXjXj
if it cannot be made consistent then return failure
for i to n do
assignmentXiany 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
