Whose Fish? (logic puzzle)
Yesterday I stumbled across this logic puzzle.
What always drives me crazy about stuff like this is that no one ever discusses the answer. I’ve never liked the implied wink wink smarty-pants attitude (see here). I want to know how someone arrives at the answer. What fascinates me is thinking, not trivia or secrets.
Here’s how I found the answer.
I don’t recall ever seeing this puzzle before and did not google it until I’d proven the results to myself. The puzzle is difficult, but I’ve posted answer at the end of the post, so you’ve been warned. The three little dots (∴) is the “therefore” symbol.
First I set up a 6×5 matrix of attributes then started highlighting and crossing out relevant details.
Then I got stuck.
Intuitively, I knew it all came down the Norwegian. This because we know he has only one neighbor. Everyone else can have one or two neighbors. Eventually, it came down to coffee (consumed and in clue 5).
The Puzzle:
There are five houses in a row in different colors. In each house lives a person with a different nationality. The five owners drink a different drink, smoke a different brand of cigar and keep a different pet, one of which is a Walleye Pike.
Who owns the fish?
The 15 clues:
- The Brit lives in the red house.
- The Swede keeps dogs as pets and gets their products from http://petstop.com/ all the time.
- The Dane drinks tea.
- The green house is on the left of the white house.
- The green house owner drinks coffee.
- The person who smokes Pall Malls keeps birds.
- The owner of the yellow house smokes Dunhills.
- The man living in the house right in the center drinks milk.
- The man who smokes Blends lives next to the one who keeps cats.
- The Norwegian lives in the first house.
- The man who keeps horses lives next to the one who smokes Dunhills.
- The owner who smokes Bluemasters drinks beer.
- The German smokes Princes.
- The Norwegian lives next to the blue house.
- The man who smokes Blends has a neighbor who drinks water.
The end of this puzzle will have five units, each with 6 attributes: {address, house color, nationality, drink, pet and smokes}
The data seems to break down into two types: Definitive data, that which defines an attribute directly within one unit. And relational data, which defines an attribute relative to another unit. Relational data often acts as a negating definition as well, showing what isn’t in a unit by describing what’s nearby.
Now stepping through the clues, definitive data related to nationality first:
- 1. The Brit lives in the red house.
- Brit == red
- 2. The Swede keeps dogs as pets.
- Swede == dogs
- 3. The Dane drinks tea.
- Dane == tea
- 10. The Norwegian lives in the first house.
- Norwegian == 1st house
- 13. The German smokes Princes.
- German == Princes
Next comes the secondary definitions. These can be used to reveal data which eliminates possible units based on what is already known:
- 5. The green house owner drinks coffee.
- Coffee == Green ∴
Brit != coffee
Dane != Green
- 6. The person who smokes Pall Malls keeps birds.
- Pall Malls == birds ∴
German != birds
Swede != Pall Malls
- 7. The owner of the yellow house smokes Dunhills.
- Yellow == Dunhills ∴
German != Yellow
Brit != dunhills
- 8. The man living in the house right in the center drinks milk.
- Milk == 3rd House ∴
Norwegian != milk
Dane != 3rd House
- 12. The owner who smokes Bluemasters drinks beer.
- Bluemasters = beer ∴
German != beer
Dane != Bluemasters
Third | Fourth | Fifth | ||
Red | ||||
Brit | ||||
Beer | Milk | Water | ||
Birds | Cats | Fish | Horses | |
Blends | Bluemasters | Pall Malls |
Second | Third | Fourth | Fifth | |
Blue | Green | White | Yellow | |
Swede | ||||
Beer | Coffee | Milk | Water | |
Dogs | ||||
Blends | Bluemasters | Dunhills |
Second | Fourth | Fifth | ||
Blue | White | Yellow | ||
Dane | ||||
Beer | Coffee | Milk | Tea | Water |
Birds | Cats | Fish | Horses | |
Blends | Dunhills | Pall Malls |
First | ||||
Green | White | Yellow | ||
Norwegian | ||||
Beer | Coffee | Milk | Water | |
Birds | Cats | Fish | Horses | |
Blends | Bluemasters | Dunhills | Pall Malls |
Second | Third | Fourth | Fifth | |
Blue | Green | White | ||
German | ||||
Coffee | Milk | Water | ||
Cats | Fish | Horses | ||
Princes |
Many of the relational data clues reveal additional information about what a unit doesn’t have:
- 4. The green house is on the left of the white house.
- Green = White’s address – 1
- 9. The man who smokes Blends lives next to the one who keeps cats.
- Blends = Cat’s address ± 1 ∴
Blends != cats
- 11. The man who keeps horses lives next to the one who smokes Dunhills.
- Horses = Dunhills’ address ± 1 ∴
Dunhills != horses
Horses != Yellow
- 14. The Norwegian lives next to the blue house.
- Blue = 2nd house ∴
Brit != 2nd house
Norwegian != Blue
- 15. The man who smokes Blends has a neighbor who drinks water.
- Blends = Water’s address ± 1 ∴
Blends != water
The fourteenth clue is one of the most important. Since we know the Norwegian lives in the 1st house (clue 10), we know that the blue house is number 2. Number 4 is a tricky one, there is no reason to believe that the green house is the first house, all we know is that the white house is on it’s left. Also, clues 9 and 15 could be referring to one or two neighbors.
It’s interesting that the clues sort out into three quintuplets.
Here’s where it starts to get really hard. All that is known for certain is what was defined in questions 1-3, 10 and 13. There remain three or four unknowns for each unit. What I’m looking for is the first link in a causality chain. Of course it’s probably not so much a chain as a loop, so looking for an end is futile. How about an onramp?
After several minutes of staring, and re-reading the clues, I got the chills (really!)
WARNING: THE ANSWER IS REVEALED BELOW
The green house drinks coffee. The center house drinks milk. So the center house is not green. But the Green house is on the left of the white house. Since we know the second house is blue, we then know that the first house is not green either. So the only place the green house can be is fourth, making the 5th white. Now is the first yellow, or is the first red?
The elimination steps above provide the answer. We know the Norwegian is in the first house, and the Brit is in the Red house. That means the Brit is in the red house in the middle, drinking milk, and the Norwegian’s house is yellow and he smokes Dunhills.
Whoa, more chills.
At this point, the whole things starts to fall together.
Clue 11 puts horses in the blue house.
Clue 3 means the Dane is not in the green house
Clue 15 puts Blends in the second house, and, with clue 9, water and cats in the first house.
etc. etc.
The Answer
Here’s the final breakdown:
First | Second | Third | Fourth | Fifth |
Yellow | Blue | Red | Green | White |
Norwegian | Dane | Brit | German | Swede |
Water | Tea | Milk | Coffee | Beer |
Cats | Horses | Birds | FISH | Dogs |
Dunhills | Blends | Pall Malls | Princes | Bluemasters |
The German has the fish and drinks coffee in the green house, which is fourth on the block.
That was fun.
I hate puzzles.
Update: Here’s a programmatic solution to “Einstein’s Riddle” and another walkthrough by James Yates.