PDA

View Full Version : Puzzle of the week



linuxdude
06-28-2004, 10:44 PM
I found this in an algebra II book. They have a puzzle at the end of every chapter. If I can remember I will try and post one a week until I run out. I don't think this one is too hard at all. Took me about 5 minutes.
Five friends, Luis, Bill, Jan, Omar, and Judy, are sitting in one row of seats. Neither Luis nor Bill is sitting next to Omar. Neither Luis nor Bill is sitting next to Jan. Neither Omar nor Bill is sitting next to Judy. Judy is sitting just to the right of Jan.

Find the seating arrangement from left to right.

XSquared
06-28-2004, 10:49 PM
Omar-Jan-Judy-Luis-Bill

linuxdude
06-29-2004, 02:48 PM
yeah. Next week's one took me a little while. It will be a little harder.

Perspective
06-29-2004, 04:50 PM
why not make this a little more challenging? write a program that will solve the problem with a specified number of objects and a set of rules. in this example, the people were the objects and the rules were things like, A left of B, A not beside C, etc...

hint: look up "Constraint propogation" a very usefull tool in AI.

Jeremy G
06-29-2004, 05:56 PM
why not make this a little more challenging? write a program that will solve the problem with a specified number of objects and a set of rules. in this example, the people were the objects and the rules were things like, A left of B, A not beside C, etc...

hint: look up "Constraint propogation" a very usefull tool in AI.
Or, a simpler method would be to write a bunch of facts in prolog, and write a goal to find the answer.