Question: Constraint Satisfaction Problems 1 ( 5 points ) You are a customer and would like to exchange your $ 5 0 bill into smaller bills

Constraint Satisfaction Problems 1(5 points)
You are a customer and would like to exchange your $50 bill into smaller bills of $1,$2,$5,
and $10, denoted by the variables ONE, TWO, FIVE, and TEN, respectively. For the
exchange, you would like strictly more than two bills of $1. Further, you want the number of
$2 bills to be different from the number of $1 bills. The number of $5 bills is exactly four,
and the number of $10 bills is less than three. The domain for each variable is [1,4].
a. What are the unary constraints? (1 point)
b. What are the binary constraints? (1 point)
c. What are the n-ary (n>2) constraints? (1 point)
d. Draw a (hyper)graph of the constraint satisfaction problem. Indicate variable nodes
with circles and constraint nodes with squared nodes. (2 points)
(2nd image)
Program. Use Code Listing 1 as a basis and complete the lines below % ADD
DOMAINS and % ADD CONSTRAINTS. First, define the domain for the variables
using the 'ins' operator. Then add the constraints using the operators (#>, #>=, #=,
#=, #, #=) to define the inequalities and equalities. Write each constraint on a
separate line, ending in a comma (,), except for the last constraint which ends in a
dot '?' Finally, provide the solution of the CSP problem by running the query after '?-'
change(50,x), labeling([ff],x) in the box on the bottom right, and clicking "Run!".
Write the missing code and the solution for the variables below. (5 points)
DOMAINS =
CONSTRAINT 1=
CONSTRAINT 2=
CONSTRAINT 3=
CONSTRAINT 4=
CONSTRAINT 5=
Solution: ONE=
, TWO=
, FIVE =
, TEN=
Code Listing 1: Money Exchange Problem
Constraint Satisfaction Problems 1 ( 5 points )

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!