Your assignment is to do questions 15.17, 15.19, and 15.20 from the text book. You are also to find one other logic puzzle and to create a solution to that one also. You are to submit the verbage of this puzzle and a reference to its source (if this is a puzzle that you recall years ago, just inform us of this: "This is one that I remember an uncle telling me when I was younger"). Here is a link for some more logic puzzles: http://www.allstarpuzzles.com/logic/index.html
All four of these are logic puzzles are to solved using Prolog.
Use Prolog to find all (zero or more) solutions to the following word puzzle: Mason, Alex, Steve, and Simon are standing in a police lineup. One of them is blond, handsome, and unscarred. Tow of then who are not blond are stadning on either side of Mason. Alex is the only one standing next two exactly one handsome man. Steve is the only one not standing next to exactly one scarred man. Who is blond, handsome, and unscarred?
Write a Prolog program that solves the following problem:
Mr. and Mrs. Astor, Mr. and Mrs. Blake, Mr. and Mrs. Crane, and Mr. and Mrs. Davis were seated around a circular table. Mrs. Astor was insulted by Mr. Blake, who sat next to her on her left. Mr. Blake was insulted by Mrs. Crane, who sat opposite him across the center of the table. Mrs. Crane was insulted by the hostess, Mrs. Davis. The hostess was the only person to sit between each of a married couple. The hostess was insulted by the only person to sit between two men. Who insulted the hosted?Also print the seating order starting with the hostess.
Write a Prolog program that solves the problem below. As part of the solution is should print out all the crossings, with the paddler listed first.
Tom, Elliot, Bill, and Vic had to cross a river using a canoe that held only two persons. In each of the three crossings from the left to the right bank, the canoe had two persons, and in each of the two crossings from the right to the left bank, the canoe had one person. Tom as unable to paddle when someone else was in the canoe with him. Elliot was unable to paddle when anyone else but Bill was in the canoe with him. Each person paddles for at least one crossing. Who paddled twice?
turnin -c cs476 -p hw4 hw4.pl README
You may work on this project by yourself or in a group of two. If you work on this with another member of the class, only submit your project once using turnin. Be sure that you clearly state in your README file the names and NETIDs of both members in the group.