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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started