Question:
In five houses, each with a different color, live 5 persons of
different nationalities, each of whom prefer a different brand of
cigrette, a different drink, and a different pet. Given the following
facts, the question to answer "Where does the zebra live, and in which
house do they drink water?"
1) The Englishman lives in the red house.
2) The Spaniard owns the dog.
3) The Norwegian lives in the first house on the left.
4) Kools are smoked in the yellow house.
5) The man who smokes Chesterfields lives in the house next to the man
with the fox.
6) The Norwegian lives next to the blue house.
7) The Winston smoker owns snails.
8) The Lucky Strike smoker drinks orange juice.
9) The Ukrainian drinks tea.
10) The Japanese smokes Parliaments.
11) Kools are smoked in the house next to the house where the horse is kept.
12) Coffeee is drunk in the green house.
13) The green house is immediately to the right (Your right) of the ivory house.
14) Milk is drunk in the middle house.
Answer shoud be in this format. I filled the following table using
fact 3 and fact 14. Now it's your turn to fill up the remaining
entries.
House 1 | House 2 | House 3| House 4 | House 5
Color : | | |
|
Natioanlity: Norway | | | |
Cigarette : | | |
|
Drink : | | Milk |
|
Pet : | | |
|
All the best.
S. Karthikselvan
(P.S. I got the question from Artificial Intelligence A modern
approach by Sturat Russell and Peter Norvig.
the answer would be zebra lives in house5
and water is taken in house 1.
House 1 | House 2 | House 3 | House 4 | House 5
Color : Yellow , Blue , Red , Ivory , Green
Natioanlity : Norway , Ukarane , English , Spainard , Japanese
Cigarette : Kools , Chesterfields , Winston , Luckystrike , Parliaments
Drink : Water , tea , milk , orangejuice , Coffee
Pet : fox , horse , snail , dog , Zebra
For starting, like we can deduce that norwegian lives in yellow. According to fact 13,
(given that norwegian is leftmost) so he cant be in green house. and neither ivory as its right side house is blue(acc to fact 6).
so he can be in yellow or red, but red is of a englishman. So yellow.
After that one can find the way through by making two cases and one case crashes out.
-Naman