Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Einstein's Riddle

106 views
Skip to first unread message

Steve Graham

unread,
Mar 13, 2001, 7:14:54 AM3/13/01
to
Who would be interested in using his/her brain (and his computer) to solve
the following?


Steve Graham

===

Einstein's Riddle

Albert Einstein wrote this riddle this century [ed. 20th century]. He said
98% of the world could not solve it.

There are 5 houses in 5 different colors. In each house lives a person with
a different nationality. The 5 owners drink a certain type of beverage,
smoke a certain brand of cigar, and keep a certain pet. No owners
have the same pet, smoke the same brand of cigar or drink the same beverage.

The question is: "Who owns the fish?"

Hints:

The Brit lives in the red house.

The Sweed keeps dogs as pets.

The Dane drinks tea.

The green house is on the left of the white house.

The green house's owner drinks coffee.

The person who smokes Pall Mall rears birds.

The owner of the yellow house smokes Dunhill.

The man living in the center house drinks milk.

The Norwegian lives in the first house.

The man who smokes Blends lives next to the one who keeps cats.

The man who keeps the horse lives next to the man who smokes Dunhill.

The owner who smokes Bluemasters drinks beer.

The German smokes Prince.

The Norwegian lives next to the blue house.

The man who smokes Blends has a neighbor who drinks water.

Janis Dzerins

unread,
Mar 13, 2001, 8:53:54 AM3/13/01
to
"Steve Graham" <js.g...@home.com> writes:

> Einstein's Riddle
>
> Albert Einstein wrote this riddle this century [ed. 20th century]. He said
> 98% of the world could not solve it.
>
> There are 5 houses in 5 different colors. In each house lives a person with
> a different nationality. The 5 owners drink a certain type of beverage,
> smoke a certain brand of cigar, and keep a certain pet. No owners
> have the same pet, smoke the same brand of cigar or drink the same beverage.
>
> The question is: "Who owns the fish?"

In Peter Norvig's "Paradigms of Artificial Intelligence Programming:
Case Studies in Common Lisp" he calls this a "Zebra puzzle" (because
the questions was "who owns the zebra?" not fish). Along with the
solution in Prolog written in Common Lisp.

--
Janis Dzerins

If million people say a stupid thing it's still a stupid thing.

Ben Bishop

unread,
Mar 13, 2001, 11:33:34 AM3/13/01
to
Janis Dzerins <jo...@latnet.lv> writes:

>"Steve Graham" <js.g...@home.com> writes:

It also doesn't sound anything like the type of puzzle Albert Einstein
would have written or cared about, so I question the provenance to begin
with, but this seems like a normal negative-clue multi-dimensional puzzle
I remember being afflicted with in 8th grade.

From what I remember of Prolog (almost 15+ years ago at college) it
certainly would be my first choice for making an engine to solve this type
of puzzle.

Ben

Denver Braughler

unread,
Mar 13, 2001, 1:14:26 PM3/13/01
to
Steve Graham wrote:
> Who would be interested in using his/her brain (and his computer) to solve
> the following?
A brute force check of the conditions against the 15625 possible combinations would solve it.

William Tanksley

unread,
Mar 13, 2001, 1:43:51 PM3/13/01
to
On Tue, 13 Mar 2001 12:14:54 GMT, Steve Graham wrote:

>Albert Einstein wrote this riddle this century [ed. 20th century]. He said
>98% of the world could not solve it.

I know Lewis Carrol wrote a riddle or two like this. I don't recall him
saying anything about 98%.

--
-William "Billy" Tanksley

John Murray

unread,
Mar 13, 2001, 6:34:21 PM3/13/01
to
Is there some ambiguity in the puzzle as stated?

Assuming

a) the houses are in a row in front of me, with the left-most one being
denoted the first (where the Norwegian lives)
b) "on the left of" means immediately adjacent on the left side

then I deduce that the German owns the fish.

John Murray

"Steve Graham" <js.g...@home.com> wrote in message
news:2bor6.407527$ge4.14...@news2.rdc2.tx.home.com...

Andrew Makinson

unread,
Mar 13, 2001, 7:51:49 PM3/13/01
to
>
> then I deduce that the German owns the fish.
>
> John Murray

And now John it's time to tell all us mere mortals how you deduced that ...


guy....@sdp.be

unread,
Mar 14, 2001, 2:17:20 AM3/14/01
to
Even my kid, just 14, solved this problem in less than one hour.
Should I be proud now ?

Guy Thoon

Christian Lynbech

unread,
Mar 14, 2001, 6:24:19 AM3/14/01
to
There must be a serious mixup in the problem statement somehow.

Everybody knows that it is Sweedes that lives in red houses, Danes
that drink coffee and brits that drinks tea.

:-)


------------------------+-----------------------------------------------------
Christian Lynbech | Ericsson Telebit, Skanderborgvej 232, DK-8260 Viby J
Phone: +45 8938 5244 | email: christia...@ted.ericsson.dk
Fax: +45 8938 5101 | web: www.ericsson.com
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
- pet...@hal.com (Michael A. Petonic)

Eugene Zaikonnikov

unread,
Mar 14, 2001, 6:21:49 AM3/14/01
to
* "Andrew" == Andrew Makinson <dome...@rahrahrandel.fsnet.co.uk> writes:

>> then I deduce that the German owns the fish.
>>
>> John Murray

Andrew> And now John it's time to tell all us mere mortals how you
Andrew> deduced that ...

Take a sheet of paper, split it in five columns (each one
corresponding to a house), and then for each house write terms that
you know to be true, and terms that are known to be false. Use them
along with 'rules' to deduce missing facts.
Note that it doesn't have to be solved *this* way: it's just a
convenient domain representation, since many of the rules operate with
relative positions of items.
And John is right in that the ruleset is meaningful only for
'traditional' cultures who mostly enumerate objects from left to
right. It is very unlikely that Einstein was such a brain chauvinist.

--
Eugene

Bradford W. Miller

unread,
Mar 16, 2001, 11:37:44 AM3/16/01
to
On 3/16/01 8:21 AM, in article ¿y´RTICLE], "Kent M Pitman"
<pit...@world.std.com> wrote:

> [ replying to comp.lang.lisp only
> http://world.std.com/~pitman/pfaq/cross-posting.html ]
>
> Erik Naggum <er...@naggum.net> writes:
>
>>
>> * Boris Schaefer <bo...@uncommon-sense.net>
>>> Green Blue Red Yellow White


>>
>>>> The green house is on the left of the white house.
>>

>> I read this differently, that the green house would be next to the white
>> house, on the left.
>
> FWIW, my dialect would agree with Erik's reading, though a red flag would pop
> up asking me if the speaker was sufficiently familiar with my dialect to
> mean something so precise; I would probably raise my hand and ask a question.
>
> (I'm curious if other English speakers make this subtle distinction regarding
> "to" and "on", or particularly, if they don't.)

My answer was different, and again depends on the reading of the problem
statement. Since none of the constraints force any pet to be "fish", the
answer is "none of them keep fish." This is also much easier than having to
solve the constraint resolution problem.

Christophe Rhodes

unread,
Mar 16, 2001, 10:03:51 PM3/16/01
to
"Bradford W. Miller" <Bradford...@motorola.com> writes:

> On 3/16/01 8:21 AM, in article ¿y´RTICLE], "Kent M Pitman"
> <pit...@world.std.com> wrote:
> > Erik Naggum <er...@naggum.net> writes:
> >
> >>
> >> * Boris Schaefer <bo...@uncommon-sense.net>
> >>> Green Blue Red Yellow White
> >>
> >>>> The green house is on the left of the white house.
> >>
> >> I read this differently, that the green house would be next to the white
> >> house, on the left.
> >
> > FWIW, my dialect would agree with Erik's reading, though a red flag would pop
> > up asking me if the speaker was sufficiently familiar with my dialect to
> > mean something so precise; I would probably raise my hand and ask a question.
> >
> > (I'm curious if other English speakers make this subtle distinction regarding
> > "to" and "on", or particularly, if they don't.)

Well, I do, though I'm not exactly a native English speaker. Then
again, I'm not exactly not a native English speaker either. Hmm.

> My answer was different, and again depends on the reading of the problem
> statement. Since none of the constraints force any pet to be "fish", the
> answer is "none of them keep fish." This is also much easier than having to
> solve the constraint resolution problem.

But this, I have to take issue with. My reading of the problem is much
the same -- it's meant to challenge the hidden assumptions when
solving this kind of problem rather than the (relatively formulaic)
method of solution. And so you can't say that "none of them keep
fish." is even remotely the right answer, any more than the normal
constraint solution.

My answer would be "assuming that each house-owner owns one pet, and
that a fish is kept by one of the owners, then the German owns the
fish", showing both that I know how to solve the logic problem and
that I am aware of the assumptions that I have made. But maybe this
comes from trying to teach first-year undergraduate physics...

Christophe
--
Jesus College, Cambridge, CB5 8BL +44 1223 524 842
(FORMAT T "(~@{~w ~}~3:*'~@{~w~^ ~})" 'FORMAT T "(~@{~w ~}~3:*'~@{~w~^ ~})")

Boris Schaefer

unread,
Mar 15, 2001, 8:46:31 PM3/15/01
to
"Andrew Makinson" <dome...@rahrahrandel.fsnet.co.uk> writes:

It's also not correct, because at least the Dane and the German could
have the fish. Possibly others as well. (To be fair, John asked
whether there was some ambiguity in the puzzle and as far as I can
tell, there is.)

At first I tried to solve it by simply listing the facts about the
houses in 5 columns, but I found this unwieldy and so I made paper
cutouts that represented the hints. These cutouts could easily be
combined to construct the houses.

Here are two solutions:

1 2 3 4 5
Norwegian German Brit Dane Swede


Green Blue Red Yellow White

Coffee Water Milk Tea Beer
PallMall Prince Blends Dunhill BlueMaster
Birds Cats Horse Fish Dogs

or the last line could be:

Birds Fish Horse Cats Dogs

Below are the original hints so that you can easily see whether the
above is indeed correct. But, as I said, there could easily be other
solutions and I'm too tired to check (although cursory checking seems
to indicate that these are the only two solutions).

> The Brit lives in the red house.
> The Sweed keeps dogs as pets.
> The Dane drinks tea.
> The green house is on the left of the white house.
> The green house's owner drinks coffee.
> The person who smokes Pall Mall rears birds.
> The owner of the yellow house smokes Dunhill.
> The man living in the center house drinks milk.
> The Norwegian lives in the first house.
> The man who smokes Blends lives next to the one who keeps cats.
> The man who keeps the horse lives next to the man who smokes Dunhill.
> The owner who smokes Bluemasters drinks beer.
> The German smokes Prince.
> The Norwegian lives next to the blue house.
> The man who smokes Blends has a neighbor who drinks water.

Boris

--
bo...@uncommon-sense.net - <http://www.uncommon-sense.net/>

"Atomic batteries to power, turbines to speed."
-- Robin, The Boy Wonder

Markus B. Krüger

unread,
Mar 16, 2001, 6:22:08 AM3/16/01
to
Boris Schaefer <bo...@uncommon-sense.net> writes:

> "Andrew Makinson" <dome...@rahrahrandel.fsnet.co.uk> writes:
>
> | > then I deduce that the German owns the fish.
> | >
> | > John Murray
> |
> | And now John it's time to tell all us mere mortals how you deduced that ...
>
> It's also not correct, because at least the Dane and the German could
> have the fish. Possibly others as well. (To be fair, John asked
> whether there was some ambiguity in the puzzle and as far as I can
> tell, there is.)

This assumes that the hint 4, "The green house is on the left of the
white house", means that the green house is anywhere to left of the
white house. If so, the puzzle has seven possible solutions (given at
the bottom of the posting).

I believe the hint should be interpreted as saying that the green
house should be immediately to the left of the white house. If so,
there is one and only one solution, at least if I wrote my Prolog
program correctly:

norwegian, 1, yellow, cat, water, dunhill
danish, 2, blue, horse, tea, blend
british, 3, red, bird, milk, pallmall
german, 4, green, fish, coffee, prince
swedish, 5, white, dog, beer, bluemaster

The six other possible solutions with the other interpretation of hint 4:

norwegian, 1, green, bird, coffee, pallmall
german, 2, blue, cat, water, prince
british, 3, red, horse, milk, blend
danish, 4, yellow, fish, tea, dunhill
swedish, 5, white, dog, beer, bluemaster

norwegian, 1, green, bird, coffee, pallmall
german, 2, blue, fish, water, prince
british, 3, red, horse, milk, blend
danish, 4, yellow, cat, tea, dunhill
swedish, 5, white, dog, beer, bluemaster

norwegian, 1, green, bird, coffee, pallmall
german, 2, blue, cat, water, prince
swedish, 3, white, dog, milk, blend
british, 4, red, horse, beer, bluemaster
danish, 5, yellow, fish, tea, dunhill

norwegian, 1, green, fish, coffee, blend
german, 2, blue, cat, water, prince
swedish, 3, yellow, dog, milk, dunhill
british, 4, red, horse, beer, bluemaster
danish, 5, white, bird, tea, pallmall

norwegian, 1, green, bird, coffee, pallmall
german, 2, blue, cat, water, prince
swedish, 3, white, dog, milk, blend
danish, 4, yellow, fish, tea, dunhill
british, 5, red, horse, beer, bluemaster

norwegian, 1, green, bird, coffee, pallmall
german, 2, blue, fish, water, prince
swedish, 3, white, dog, milk, blend
danish, 4, yellow, cat, tea, dunhill
british, 5, red, horse, beer, bluemaster

--
,------------------- Markus Bjartveit Krüger ---------------------.
' `
` E-mail: mar...@pvv.org WWW: http://www.pvv.org/~markusk/ '
)-------------------------------------------------------------------(

Erik Naggum

unread,
Mar 16, 2001, 5:06:14 AM3/16/01
to
* Boris Schaefer <bo...@uncommon-sense.net>

> Green Blue Red Yellow White

> > The green house is on the left of the white house.

I read this differently, that the green house would be next to the white
house, on the left.

> > The man who smokes Blends has a neighbor who drinks water.

I also read this to mean "lives next to".

Then there is only one solution.

#:Erik
--
"Hope is contagious" -- American Cancer Society
"Despair is more contagious" -- British Farmers Society

Kent M Pitman

unread,
Mar 16, 2001, 9:21:37 AM3/16/01
to
[ replying to comp.lang.lisp only
http://world.std.com/~pitman/pfaq/cross-posting.html ]

Erik Naggum <er...@naggum.net> writes:

>
> * Boris Schaefer <bo...@uncommon-sense.net>
> > Green Blue Red Yellow White
>
> > > The green house is on the left of the white house.
>
> I read this differently, that the green house would be next to the white
> house, on the left.

FWIW, my dialect would agree with Erik's reading, though a red flag would pop

Chris Kirkwood-Watts

unread,
Mar 17, 2001, 10:09:28 PM3/17/01
to
__ "Steve Graham" <js.g...@home.com> ______

| Who would be interested in using his/her brain (and his computer) to solve
| the following?

Here's a one-liner, in elisp:

(gnus-group-fetch-faq "rec.puzzles")
=>
2.8
"This is a quiz written by Einstein in the last century. He said that
98% of the world's population could not solve it...." This is followed
by a series of fifteen clues about five European men who live in houses
of different houses, drink different beverages, smoke different
cigarettes, and keep different pets. Who keeps the fish?

The German keeps the fish. A detailed explanation is available at
http://www.frontiernet.net/~mwdaly/recpuzzles/einstein.html. For the
record, Einstein didn't write the puzzle and far more than 2% of the
world's population could solve it.

Chris.

Steve Graham

unread,
Mar 19, 2001, 7:02:46 AM3/19/01
to
A variety of answers have been posted at
http://members.home.net/js.graham/einstein/index.html.

Steve Graham

===

"Eugene Zaikonnikov" <vik...@cit.org.by> wrote in message
news:6y1ys0k...@viking.cit...

0 new messages