Saturday, August 06, 2005

Relative Logic

There are five houses in a row. Each house is a different color. In each house lives a person of a different nationality. The five owners each drink a different drink, smoke a different brand of tobacco and keep a different pet, one of which is a fish.

The question is: Who owns the fish?

1 The Brit lives in a red house
2 The Swede has a dog
3 The Dane drinks tea
4 The green house is on the left (adjacent) of the white house
5 The owner of the green house drinks coffee
6 The person who smokes Pall Mall has birds
7 The owner of the yellow house smokes Dunhills
8 The man living in the center house drinks milk
9 The Norwegian lives in the first house
10 The man who smokes Blends lives next to the one who has cats
11 The man who has horses lives next do the man who smokes Dunhills
12 The man who smokes Blue Master drinks beer
13 The German smokes Prince
14 The Norwegian lives next to the blue house
15 The man who smokes Blends has a neighbor who drinks water
Note: This particular puzzle is purportedly so difficult that only 2% of all persons who attempt it ever solve it. While I'm doubtful of such statistics, it's certainly more difficult than it first appears. I eventually gave up on using a traditional logic table and resorted to making mental notes as I filled/switched information in five boxes while repeatedly going through the 15 steps until I zeroed in on the answer. Although I eventually solved it, I'm upset that my methodology was so sloppy, and I'm curious if anyone out there can show me a more elegant way of sussing out the solution.

To reveal the solution, click here:

4 Comments:

Blogger Dædalux said...

Yeah - it's a famous puzzle, but it's apocryphal attributation to Albert Einstien, although widely claimed, is almost certainly untrue. Still it's a pretty good puzzle. I'll probably put the complete answer hidden in the original post soon.

I expected you of all persons to show me how better to solve this one! There's got to be a way, right? How would you write a software program to solve this type of problem? Hmmm, maybe that's a bad analogy since a computer could make a bazillion guesses and wouldn't need any intuition at all.

8/07/2005 8:29 AM  
Blogger Special Touch said...

I just used the traditional logic grid with the house position (first, second, third, fourth, fifth) as a header.

For others who are trying to solve it, in clue #9, assume the first house is the leftmost one.

8/10/2005 9:10 PM  
Anonymous Anonymous said...

hmmmm...

The only possible mistake that I found is messing up who drinks the water. (I did this the first time through).

The point about assuming the first house is the leftmost one is a good one, the setup should be more clear.

As far as elegant solutions go...

each rule defines a relation between objects

the execution of all 15 rules results in a specific placement of each object in a two dimensional matrix

writing code to do this particular problem is trivial, the code would do what we did... establish the relations and test until all the pieces fit and no rules are broken

what is NOT trivial is the ranking of the importance of the rules...(if rules are attempted to be processed out of optimal order then there might be more possibilities for error). Also, the ability to follow branches of possible solutions could get tricky (recursion can be tough).

what is also NOT trivial is coding something that could order an mxn matrix correctly, efficently and with any number of complex rules such as the ones given

or how about matrices greater than 2 dimensions?

this is why most database theory is concerned with manipulating the relations and not the actual placement of objects (and the physical moving of objects all the time would be very inefficent).

this was really thought provoking! and before anyone thinks that I am trying to sound smarter than I am... I solved this by:

* printing 2 empty 5x5 matrices

* cutting one of them into 25 objects

* labeling the objects

* using tape to mark definite and adjacent relations

* laying out indetermiate relations

* using visual inspection to dtermine what was/was not possible as I travesed the rules to identify the next one that indicated object placement

;-) yeah paper, pencil and scissors!

Last comment: Daedalux said, "There has got to be a better way".

This is not always true. In fact, it has been proven that there are some things that we just cannot know. I will try to get a post up on this, it is an important topic.

8/12/2005 9:01 AM  
Blogger The Grey Ghost said...

I categorized everything that I knew into 5 columns of 5 rows, then figured out the order of colored houses from left to right. Since I could only devise for certain that the Yellow and Blue houses were the first two, respectively, I ran a scenario in which the Red house was the middle house (and filled in the rest of the info based on the clues). Turns out, that was the right scenario.

1. Norwegian
2. Yellow house
3. Dunhills
4. Water
5. Cats

1. Dane
2. Blue house
3. Blends
4. Tea
5. Horses

1. Brit
2. Red house
3. Pall Mall
4. Milk
5. Birds

1. Swede
2. White house
3. Blue Master
4. Beer
5. Dog

1. German
2. Green house
3. Prince
4. Coffee
5. FISH

8/27/2005 1:17 PM  

Post a Comment

<< Home