The zebra puzzle is a well-known logic puzzle. Many versions of the puzzle exist, including a version published in Life International magazine on December 17, 1962. The March 25, 1963, issue of Life contained the solution and the names of several hundred solvers from around the world.
The puzzle is often called Einstein's Puzzle or Einstein's Riddle because it is said to have been invented by Albert Einstein as a boy; it is also sometimes attributed to Lewis Carroll. However, there is no known evidence for Einstein's or Carroll's authorship and the Life International version of the puzzle mentions brands of cigarette, such as Kools, that did not exist during Carroll's lifetime or Einstein's boyhood.
The following version of the puzzle appeared in Life International in 1962:
- There are five houses.
- The Englishman lives in the red house.
- The Spaniard owns the dog.
- Coffee is drunk in the green house.
- The Ukrainian drinks tea.
- The green house is immediately to the right of the ivory house.
- The Old Gold smoker owns snails.
- Kools are smoked in the yellow house.
- Milk is drunk in the middle house.
- The Norwegian lives in the first house.
- The man who smokes Chesterfields lives in the house next to the man with the fox.
- Kools are smoked in the house next to the house where the horse is kept.
- The Lucky Strike smoker drinks orange juice.
- The Japanese smokes Parliaments.
- The Norwegian lives next to the blue house.
Now, who drinks water? Who owns the zebra?
In the interest of clarity, it must be added that each of the five houses is painted a different color, and their inhabitants are of different national extractions, own different pets, drink different beverages and smoke different brands of American cigarets [sic]. One other thing: in statement 6, right means your right.— Life International, December 17, 1962
Assuming that one person drinks water and one owns a zebra, then it is possible not only to deduce the answers to the two questions, but to figure out a complete solution of who lives where, in what color house, keeping what pet, drinking what drink, and smoking what brand of cigarettes. By considering the clues a few at a time, it is possible to slowly build inferences that incrementally complete the puzzle's unique correct solution. For example, by clue 10, the Norwegian lives in house #1, and by clue 15, house #2 must be blue. The Norwegian's house therefore cannot be blue, nor can it be red, where the Englishman lives (clue 2), or green or ivory, which are next to each other (clue 6). It must therefore be yellow, which means the Norwegian also smokes Kools (clue 8).
Note that clue 10 mentions the "first" house, without specifying whether it is the house on the extreme left or extreme right if standing in front of them. However, selecting either side as the first house does not change the outcome as to who drinks the water and who has the zebra.
The March 25, 1963 issue of Life International contained the following solution, and the names of several hundred solvers from around the world.
|Smoke||Kools||Chesterfield||Old Gold||Lucky Strike||Parliament|
Other versions of the puzzle have one or more of the following differences to the Life International puzzle:
- Some colors, nationalities, cigarette brands, drinks, and pets are substituted for other ones and the clues are given in different order. These do not change the logic of the puzzle.
- One version of the puzzle indicates that the green house is on the left of the white house, instead of on the right of it. This results in swapping the two corresponding houses with all their properties, but makes the puzzle a bit easier. It is also important to note that the omission of the word immediately, as in immediately to the left/right of the white house, leads to multiple solutions to the puzzle.
- In versions where Blend replaces Chesterfields, the clue "The man who smokes Blend has a neighbor who drinks water" is not required to solve the puzzle, however it does make solving the puzzle easier. In the Life International version, this clue was only in form of the question "Who drinks water?"
- In other versions, the cigarettes are replaced by cars or sports.
- Einstein's Riddle, in a particular version, asks 'Who owns the fish?' as the overarching question.
- Stangroom, Jeremy (2009). Einstein's Riddle: Riddles, Paradoxes, and Conundrums to Stretch Your Mind. Bloomsbury USA. pp. 10–11. ISBN 978-1-59691-665-4.
- M.R.C. van Dongen. "How to Solve the Zebra Problem" (PDF). Retrieved 2013-11-06.
- James Little; Cormac Gebruers; Derek Bridge & Eugene Freuder. "Capturing Constraint Programming Experience: A Case-Based Approach" (PDF). Cork Constraint Computation Centre, University College, Cork, Ireland. Retrieved 2009-09-05.
- Karttunen, Lauri. "Einstein's Puzzle". Retrieved 1 November 2014.
- Antonick, Gary (12 March 2012). "Numberplay: Einstein’s Riddle". The New York Times. Retrieved 1 November 2014.