Puzzle of the week

This is a discussion on Puzzle of the week within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I found this in an algebra II book. They have a puzzle at the end of every chapter. If I ...

  1. #1
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926

    Puzzle of the week

    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.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Omar-Jan-Judy-Luis-Bill
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    yeah. Next week's one took me a little while. It will be a little harder.

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    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.

  5. #5
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    Quote Originally Posted by Perspective
    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.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 06-06-2008, 06:26 PM
  2. structural fault any ideas
    By kaijuu in forum C Programming
    Replies: 17
    Last Post: 04-17-2007, 03:43 PM
  3. Crossword Puzzle Program
    By Loctan in forum C++ Programming
    Replies: 2
    Last Post: 08-01-2006, 12:08 AM
  4. Force end
    By Redattack34 in forum C++ Programming
    Replies: 9
    Last Post: 09-07-2005, 12:16 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21