Question: 1 . [ 1 5 points ] Formulate the ( 5 times 5 ) Futoshiki puzzle as described below as a Constraint
points Formulate the times Futoshiki puzzle as described below as a Constraint Satisfaction Problem CSP Define the set of variables, their domains values, and the set of constraints according to the rules of the puzzle and the initial game board configuration in the figure below. You do not have to apply the Backtracking Algorithm to generate a search tree and find solution to the problem. Just formulate the problem.
times Futoshiki puzzle
The game board consists of times cells. Some of the cells already have numbers assigned to them and there are inequality signs or between some of the adjacent cells as shown in the figure below.
The goal is to find assignments to for the empty cells such that the inequality relationships between all pairs of adjacent cells with an inequality sign between them are satisfied. In addition, a digit can only appear once in every row and column; that is the digits in every row and column must be different from each other. Backtracking search algorithm for CSP:
function BACKTRACKINGSEARCHCSp returns solution or failure
return BACKTRACK CSP
function BACKTRACKassignment csp returns a solution or failure
if assignment is complete then return assignment
varleftarrowmathrm SELECTUNASSIGNEDVARIABLEcsp
for each value in ORDERDOMAINVALUESvar assignment, csp do
if value is consistent with assignment then
add var value to assignment
inferences leftarrow INFERENCEcsp var, value
if inferences failure then
add inferences to assignment
result & BACKTRACKassignment csp
if result failure then
return result
remove varvalue and inferences from assignment
return failure
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
