Question: 1 . [ 1 5 points ] Formulate the ( 5 times 5 ) Futoshiki puzzle as described below as a Constraint

1.[15 points] Formulate the \(5\times 5\) 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.)
\(5\times 5\) Futoshiki puzzle
- The game board consists of \(5\times 5\) 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 (1 to 5) 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 BACKTRACKING-SEARCH(CSp) returns solution or failure
return BACKTRACK({}, CSP)
function BACKTRACK(assignment, csp) returns a solution or failure
if assignment is complete then return assignment
var}\leftarrow\mathrm{ SELECT-UNASSIGNED-VARIABLE(csp)
for each value in ORDER-DOMAIN-VALUES(var, assignment, csp) do
if value is consistent with assignment then
add {var = value} to assignment
inferences \leftarrow INFERENCE(csp, var, value)
if inferences != failure then
add inferences to assignment
result & BACKTRACK(assignment, csp)
if result /= failure then
return result
remove {var=value} and inferences from assignment
return failure
```
1 . [ 1 5 points ] Formulate the \ ( 5 \ times 5

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!