Question: #2. Design and implement a prolog clp program (puzzple2.pl), to output all the solutions as a result (not one solution after the other as a

#2. Design and implement a prolog clp program (puzzple2.pl), to output all the solutions as a result (not one solution after the other as a part of query by typing a semicolon).

Your program should print a heading stating the total number of the solutions found.

[Note. You may like to use findall/3 here or you may solve the problem case by case to collect each the solution, then to be output.]

You may use the sample code (as your base code) provided in Weekly Activity for CLP (and/or a few sample codes discussed in the class).

Test Cases for puzzle2

puzzle2([A,M]+[P,M]=[D,A,Y]).

puzzle2([S,E,N,D]+[M,O,R,E]=[M,O,N,E,Y]).

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 Databases Questions!