Zebra puzzle

from Wikipedia, the free encyclopedia

The zebra puzzle is an often reproduced puzzle from the group of logicals , which can therefore be solved by logical conclusions.

Often the riddle is also published as Einstein's riddle with the remark, allegedly from Albert Einstein , that only 2% of the world's population could solve this riddle. In fact, however, there is no reference to the author, in particular not to Einstein's involvement. Marketed in this way, it is probably the most famous logical of all, although it has no outstanding features compared to other logicals.

The riddle

There are several versions of this logelei . The original puzzle version was first reprinted in Life International Magazine on December 17, 1962. Only on March 25 of the following year was the solution in the same place, with the announcement of the names of several hundred correct solvers from all over the world. The riddle itself is as follows in the translation of the original:

  1. There are five houses.
  2. The Englishman lives in the red house.
  3. The Spaniard has a dog.
  4. Coffee is drunk in the green house.
  5. The Ukrainian drinks tea.
  6. The green house is directly to the right of the white house.
  7. Old-gold cigarette smokers keep snails as pets.
  8. Kools brand cigarettes are smoked in the yellow house.
  9. Milk is drunk in the middle house.
  10. The Norwegian lives in the first house.
  11. The man who smokes Chesterfields lives next to the man with the fox.
  12. The Kools brand is smoked in the house next to the house with the horse.
  13. The Lucky Strike smoker prefers to drink orange juice.
  14. The Japanese smokes Parliaments cigarettes.
  15. The Norwegian lives next to the blue house.

Who drinks water Who does the zebra belong to?

For the sake of clarification, it should be added that each of the houses is painted a different color and each resident has a different nationality, has a different pet, drinks a different drink and smokes a different type of American cigarette. One more thing: In Note 6, right means that the house is on the right as viewed from the viewer.

solution

The solution is:

"The Norwegian drinks water and the Japanese has a zebra."

The properties are distributed as follows:

House 1 2 3 4th 5
colour yellow blue red White green
nationality Norwegian Ukrainians English people Spaniards Japanese
drink WATER tea milk Orange juice coffee
Cigarettes Kools Chesterfield Old gold Lucky Strike Parliament
domestic animal Fox horse Snails dog ZEBRA

When solving, it is also possible to change the order of the houses: The first house can also be the house on the far right instead of the house on the far left , as assumed above . The solution leads to the same answer.

The properties are distributed as follows:

House 5 4th 3 2 1
colour White green red blue yellow
nationality Spaniards Japanese English people Ukrainians Norwegian
drink Orange juice coffee milk tea WATER
Cigarettes Lucky Strike Parliament Old gold Chesterfield Kools
domestic animal dog ZEBRA Snails horse Fox

The puzzle leaves out important details in the formulation. Because it is not assumed that the remaining pet is a zebra and the remaining drink is water, the questions can also be answered with “Nobody has a zebra” and “Nobody drinks water”.

See also

Wikibooks: Algorithm Collection  - Solutions in various programming languages

Web links

Individual evidence

  1. Logicals on edugroup
  2. ^ Translated from Life International Magazine on December 17, 1962.