Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program which finds solution to the following 3 hierarchically organized constraint satisfaction problems, involving 1 3 variables { A , B , C

Write a program which finds solution to the following 3 hierarchically organized constraint satisfaction problems, involving 13 variables {A, B, C,..., M} which can take integer values in {1,...,120}; solutions can use the same integer for different variables.
a. Problem A: Find a solution to the constraint satisfaction problem involving the six variables A, B, C, D, E and F and constraints C1,..., C5:
(C1) A=B**2 C**2
(C2) E+F>B
(C3) D=B**2-3*A
(C4)(B-C)**2=E*F*C-1861
(C5) C+D+E+F<120
b. Problem B: Find a solution to the constraint satisfaction problem involving ten variables A,..., J which satisfy constrains C1,..., C12:
(C6)(G+I)**3=(H-A-1)**2
(C7) B*E*F=H*B-200
(C8)(C+I)**2=B*E*(G+1)
(C9) G+I180
(C11) J < H-C-G
(C12) J > B*G+D+E+G
c. Problem C: Find a solution to the constraint satisfaction problem involving 13 variables A,..., M which satisfy constrains C1,..., C17:
(C13) K*L*M=B*(B+5)
(C14) F**3=K*K*M*M*10+331
(C15) H*M*M=J*K-20
(C16) J+L=I*L
(C17) A+D+M=B*(F-2)
Remark: In the above equations the letter I was put into bold face to avoid being mistaken as the number 1. Moreover, the letter J looks somewhat similar to the letter I but to better distinguish the two letters J is never in bold face.
Your program should contain a counter nva (number of variable assignments) that counts the number of times an initial integer value is assigned to a variable or the assigned integer to the particular variable is changed; in addition to outputting the solution to the CSV also report the value of this variable at the end of the run, and develop an interface to call your program for CSP Problems A, B, or C. Your program should return a solution or no solution exists and the value of nva after the program terminates. Moreover, terminate the search as soon as you found a solutiondo not search for additional solutions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago

Question

Name is needed for identifying organisms ?

Answered: 1 week ago