From: Steve Graham
Subject: Einstein's Riddle
Date: 
Message-ID: <2bor6.407527$ge4.142793980@news2.rdc2.tx.home.com>
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.

From: Denver Braughler
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <3AAE6382.9C92CF2E@bwcc.com>
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.
From: Janis Dzerins
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <87hf0x4vwt.fsf@asaka.latnet.lv>
"Steve Graham" <·········@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.
From: Ben Bishop
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <yZrr6.66$%o5.5127@news.shore.net>
Janis Dzerins <·····@latnet.lv> writes:

>"Steve Graham" <·········@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.

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
From: ·········@sdp.be
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <3aaf1a78.176066139@news.skynet.be>
Even my kid, just 14, solved this problem in less than one hour.
Should I be proud now ?

Guy Thoon

On 13 Mar 2001 15:53:54 +0200, Janis Dzerins <·····@latnet.lv> wrote:

>"Steve Graham" <·········@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.
From: William Tanksley
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <slrn9asqj7.m94.wtanksle@dolphin.openprojects.net>
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
From: John Murray
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <tatbdrm1mooi5e@corp.supernews.co.uk>
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" <·········@home.com> wrote in message
·······························@news2.rdc2.tx.home.com...
> 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.
>
>
>
>
>
>
>
From: Andrew Makinson
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <98mf61$7oh$1@news8.svr.pol.co.uk>
>
> 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 ...
From: Eugene Zaikonnikov
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <6y1ys0k33m.fsf@viking.cit>
* "Andrew" == Andrew Makinson <········@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
From: Steve Graham
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <Gzmt6.447632$ge4.157327755@news2.rdc2.tx.home.com>
A variety of answers have been posted at
http://members.home.net/js.graham/einstein/index.html.

Steve Graham

===

"Eugene Zaikonnikov" <······@cit.org.by> wrote in message
···················@viking.cit...
> * "Andrew" == Andrew Makinson <········@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
From: Boris Schaefer
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <87d7bi4hag.fsf@qiwi.uncommon-sense.net>
"Andrew Makinson" <········@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.)

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

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

"Atomic batteries to power, turbines to speed."
-- Robin, The Boy Wonder
From: Erik Naggum
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <3193725974318524@naggum.net>
* Boris Schaefer <·····@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
From: Kent M Pitman
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <sfwwv9p94lq.fsf@world.std.com>
[ replying to comp.lang.lisp only
  http://world.std.com/~pitman/pfaq/cross-posting.html ]

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

> 
> * Boris Schaefer <·····@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.)
From: Bradford W. Miller
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <B6D79D78.3EC2%Bradford.W.Miller@motorola.com>
On 3/16/01 8:21 AM, in article �y�RTICLE], "Kent M Pitman"
<······@world.std.com> wrote:

> [ replying to comp.lang.lisp only
> http://world.std.com/~pitman/pfaq/cross-posting.html ]
> 
> Erik Naggum <····@naggum.net> writes:
> 
>> 
>> * Boris Schaefer <·····@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.
From: Christophe Rhodes
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <sqy9u5umeg.fsf@lambda.jesus.cam.ac.uk>
"Bradford W. Miller" <·················@motorola.com> writes:

> On 3/16/01 8:21 AM, in article �y�RTICLE], "Kent M Pitman"
> <······@world.std.com> wrote:
> > Erik Naggum <····@naggum.net> writes:
> > 
> >> 
> >> * Boris Schaefer <·····@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 ········@{~w~^ ~})" 'FORMAT T "(·@{~w ········@{~w~^ ~})")
From: Markus B. Kr�ger
Subject: Re: ANSWER for Einstein's Riddle
Date: 
Message-ID: <du3k85q3qn3.fsf@proto.pvv.ntnu.no>
Boris Schaefer <·····@uncommon-sense.net> writes:

> "Andrew Makinson" <········@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: ·······@pvv.org           WWW: http://www.pvv.org/~markusk/ '
 )-------------------------------------------------------------------(
From: Christian Lynbech
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <ofofv4a90c.fsf@chl.ted.dk.eu.ericsson.se>
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: ·················@ted.ericsson.dk
Fax:   +45 8938 5101    | web:   www.ericsson.com
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - ·······@hal.com (Michael A. Petonic)
From: Chris Kirkwood-Watts
Subject: Re: Einstein's Riddle
Date: 
Message-ID: <m3elvvvk6j.fsf@noether.totzeit.net>
 __ "Steve Graham" <·········@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.