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

Einstein's Riddle

5 views
Skip to first unread message

Steve Graham

unread,
Mar 11, 2001, 1:49:56 PM3/11/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.

Erik Max Francis

unread,
Mar 11, 2001, 2:03:03 PM3/11/01
to
Steve Graham wrote:

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

No, he didn't.

--
Erik Max Francis / m...@alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Weakness of attitude becomes weakness of character.
\__/ Albert Einstein
Interstelen / http://www.interstelen.com/
A multiplayer, strategic, turn-based Web game on an interstellar scale.

Boris Popov

unread,
Mar 11, 2001, 3:05:39 PM3/11/01
to
"Steve Graham" <js.g...@home.com> wrote in message
news:oNPq6.396644$ge4.13...@news2.rdc2.tx.home.com...

I don't beleive he said that only 2% of the world could solve it. It's not
hard, you just need to pay attention to the details. The German owns the
fish. It was supposed to be a table that I used to layout all the details,
but I prefer to post plain-text:

house 1 2 3 4 5
color yellow blue red green white
nationality norweigian dane brit german swede
drink water tea milk coffee beer
smoke dunhill blend pall mall prince bluemaster
pet cats horse birds fish dogs

-Boris
P.S. Did I have to write software to solve it ? :)


Bruce Elrick

unread,
Mar 11, 2001, 3:58:59 PM3/11/01
to
I swear there is no evidence that any of them own a fish. The German
owns an emu.

Bruce

Boris Popov

unread,
Mar 11, 2001, 4:02:10 PM3/11/01
to
"Bruce Elrick" <bel...@home.com> wrote in message
news:3AABE712...@home.com...

> I swear there is no evidence that any of them own a fish. The German
> owns an emu.
>
> Bruce

I am missing something then. I thought my table satisfies all given
statements and it has fish right under the german...

-Boris
P.S. What's emu ?

Gregory Jorgensen

unread,
Mar 11, 2001, 4:36:52 PM3/11/01
to
The 2% that can solve it must be psychic or deranged. The riddle as posed is not
solvable.

We are told of five houses anf five people. The hints mention five colors (red,
green, white, yellow, blue), five drinks (tea, coffee, milk, beer, water), five
smokes (Pall Mall, Dunhill, Blends, Bluemaster, Prince), and five nationalities
(Brit, Swede, Dane, Norwegian, German). But only four types of pet are
mentioned: dogs, birds, cats, horse. We have no evidence that any of the five
owns fish.

More telling: how many people can't quickly determine that this puzzle is
unsolvable?


In article <oNPq6.396644$ge4.13...@news2.rdc2.tx.home.com>, Steve Graham
says...

Greg Jorgensen
Deschooling Society
Portland, Oregon, USA
gr...@pobox.com

Boris Popov

unread,
Mar 11, 2001, 4:38:39 PM3/11/01
to
LoL... Oh well... I see what you mean now... :) But all of them have a
certain pet. Even though we have no clue what kind of pet german owns, we
can assume it's fish cause no one else has it... :)))

-Boris

"Boris Popov" <no-spa...@bigserver.com> wrote in message
news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...

Boris Popov

unread,
Mar 11, 2001, 4:43:02 PM3/11/01
to
"Gregory Jorgensen" <gr...@pobox.com> wrote in message
news:UdSq6.2184$54....@www.newsranger.com...

> The 2% that can solve it must be psychic or deranged. The riddle as posed
is not
> solvable.
>
> We are told of five houses anf five people. The hints mention five colors
(red,
> green, white, yellow, blue), five drinks (tea, coffee, milk, beer, water),
five
> smokes (Pall Mall, Dunhill, Blends, Bluemaster, Prince), and five
nationalities
> (Brit, Swede, Dane, Norwegian, German). But only four types of pet are
> mentioned: dogs, birds, cats, horse. We have no evidence that any of the
five
> owns fish.
>
> More telling: how many people can't quickly determine that this puzzle is
> unsolvable?

Well.. That's the trick of the puzzle... and I admit I did not notice it
right away :))) My mind tricked me into thinking that there's a fish even
though statements do not mention it.
I would just say that it's not *unsolvable*... It turns out to be solveable
completely except the type of the pet german owns. It's a hole in the
solution table and we can't do anything about it... Let's just say that
puzzle is solvable but we cannot answer the question without making any
assumptions.

-Boris

Brian Harvey

unread,
Mar 11, 2001, 7:43:00 PM3/11/01
to
"Boris Popov" <no-spa...@bigserver.com> writes:
>house 1 2 3 4 5
>color yellow blue red green white
>nationality norweigian dane brit german swede
>drink water tea milk coffee beer
>smoke dunhill blend pall mall prince bluemaster
>pet cats horse birds fish dogs
>
>P.S. Did I have to write software to solve it ? :)

I can't resist being (apparently) first to post a computer program.
But it doesn't really belong in any of these newsgroups, because it's
written in Logo.

First get Berkeley Logo from ftp://ftp.cs.berkeley.edu/ucblogo/
(pick the one that matches your platform)

Then get the logic-puzzle-solver from
http://www.cs.berkeley.edu/~bh/logic-code/hybrid.lg

Then here's the part specific to this puzzle:

? po [einstein neighbor neighbor1]
to einstein
cleanup
category "position [1 2 3 4 5]
category "color [red green white yellow blue]
category "nationality [British Swedish Danish Norwegian German]
category "beverage [tea coffee milk beer water]
category "cigar [pallmall dunhill blend bluemaster prince]
category "pet [dog bird cat horse fish]
verify "British "red
verify "Swedish "dog
verify "Danish "tea
justbefore "green "white :position
verify "green "coffee
verify "pallmall "bird
verify "yellow "dunhill
verify 3 "milk
verify 1 "Norwegian
neighbor "blend "cat :position
neighbor "horse "dunhill :position
verify "bluemaster "beer
verify "German "prince
neighbor "Norwegian "blue :position
neighbor "blend "water :position
print []
solution
end

to neighbor :a :b :lineup
falsify :a :b
neighbor1 :lineup count :lineup
end

to neighbor1 :lineup :count
if :count=0 [stop]
foreach bl bf bf :lineup [implies :a first :lineup "true :b ? "false]
neighbor1 (lput first :lineup bf :lineup) :count-1
end

? solve [einstein]
category position [1 2 3 4 5]
category color [red green white yellow blue]
category nationality [British Swedish Danish Norwegian German]
category beverage [tea coffee milk beer water]
category cigar [pallmall dunhill blend bluemaster prince]
category pet [dog bird cat horse fish]
British red -> true
Swedish red -> false
Danish red -> false
Norwegian red -> false
German red -> false
green British -> false
white British -> false
yellow British -> false
blue British -> false
Swedish dog -> true
British dog -> false
red dog -> false
Danish dog -> false
Norwegian dog -> false
German dog -> false
bird Swedish -> false
cat Swedish -> false
horse Swedish -> false
fish Swedish -> false
Danish tea -> true
British tea -> false
red tea -> false
Swedish tea -> false
dog tea -> false
Norwegian tea -> false
German tea -> false
coffee Danish -> false
milk Danish -> false
beer Danish -> false
water Danish -> false
green 5 -> false
white 1 -> false
green coffee -> true
red coffee -> false
British coffee -> false
white coffee -> false
yellow coffee -> false
blue coffee -> false
5 coffee -> false
tea green -> false
Danish green -> false
milk green -> false
beer green -> false
water green -> false
pallmall bird -> true
dunhill bird -> false
blend bird -> false
bluemaster bird -> false
prince bird -> false
dog pallmall -> false
Swedish pallmall -> false
cat pallmall -> false
horse pallmall -> false
fish pallmall -> false
yellow dunhill -> true
red dunhill -> false
British dunhill -> false
green dunhill -> false
coffee dunhill -> false
white dunhill -> false
blue dunhill -> false
pallmall yellow -> false
bird yellow -> false
blend yellow -> false
bluemaster yellow -> false
prince yellow -> false
3 milk -> true
1 milk -> false
2 milk -> false
4 milk -> false
5 milk -> false
tea 3 -> false
Danish 3 -> false
coffee 3 -> false
green 3 -> false
white 4 -> false
beer 3 -> false
water 3 -> false
1 Norwegian -> true
2 Norwegian -> false
3 Norwegian -> false
milk Norwegian -> false
4 Norwegian -> false
5 Norwegian -> false
white Norwegian -> false
British 1 -> false
red 1 -> false
Swedish 1 -> false
dog 1 -> false
Danish 1 -> false
tea 1 -> false
German 1 -> false
blend cat -> false
horse dunhill -> false
yellow horse -> false
bluemaster beer -> true
pallmall beer -> false
bird beer -> false
dunhill beer -> false
yellow beer -> false
blend beer -> false
prince beer -> false
tea bluemaster -> false
Danish bluemaster -> false
coffee bluemaster -> false
green bluemaster -> false
milk bluemaster -> false
3 bluemaster -> false
water bluemaster -> false
German prince -> true
British prince -> false
red prince -> false
Swedish prince -> false
dog prince -> false
Danish prince -> false
tea prince -> false
Norwegian prince -> false
1 prince -> false
pallmall German -> false
bird German -> false
dunhill German -> false
yellow German -> false
blend German -> false
bluemaster German -> false
beer German -> false
Norwegian blue -> false
1 blue -> false
blue 3 -> false
milk blue -> false
blue 4 -> false
blend water -> false


Assuming 1 yellow
1 yellow -> true
2 yellow -> false
dunhill 2 -> false
3 yellow -> false
milk yellow -> false
dunhill milk -> false
3 dunhill -> false
4 yellow -> false
dunhill 4 -> false
5 yellow -> false
dunhill 5 -> false
1 dunhill -> true
Norwegian dunhill -> true
Swedish dunhill -> false
dog dunhill -> false
yellow dog -> false
Swedish yellow -> false
Danish dunhill -> false
tea dunhill -> false
water dunhill -> true
pallmall water -> false
bird water -> false
prince water -> false
German water -> false
yellow water -> true
red water -> false
British water -> false
white water -> false
blue water -> false
Swedish water -> false
Norwegian water -> true
1 water -> true
2 water -> false
4 water -> false
5 water -> false
dog water -> false
coffee 1 -> false
green 1 -> false
Norwegian green -> false
yellow Norwegian -> true
beer Norwegian -> false
bluemaster Norwegian -> false
1 bluemaster -> false
beer 1 -> false
horse Norwegian -> false
1 horse -> false
water horse -> false
blend Norwegian -> false
1 blend -> false
pallmall Norwegian -> false
bird Norwegian -> false
1 bird -> false
pallmall 1 -> false
coffee Norwegian -> false
Danish yellow -> false
tea yellow -> false
white 2 -> false
blend 4 -> false
blend 3 -> false
milk blend -> false
horse 4 -> false
horse 3 -> false
milk horse -> false

Assuming 5 beer
5 beer -> true
2 beer -> false
bluemaster 2 -> false
4 beer -> false
bluemaster 4 -> false
5 bluemaster -> true
pallmall 5 -> false
bird 5 -> false
blend 5 -> false
2 blend -> true
white blend -> false
pallmall 2 -> false
bird 2 -> false
prince 2 -> false
German 2 -> false
cat 2 -> false
cat 5 -> false
bluemaster cat -> false
beer cat -> false
cat 4 -> false
prince 5 -> false
German 5 -> false
tea 5 -> false
Danish 5 -> false

Assuming 5 Swedish
5 Swedish -> true
2 Swedish -> false
blend Swedish -> false
bluemaster Swedish -> true
beer Swedish -> true
coffee Swedish -> false
green Swedish -> false
German green -> true
prince green -> true
pallmall green -> false
bird green -> false
coffee bird -> false
pallmall coffee -> false
blend green -> false
2 green -> false
4 green -> true
cat green -> false
coffee cat -> false
horse green -> false
coffee horse -> false
red 4 -> false
British 4 -> false
coffee 4 -> true
tea 4 -> false
Danish 4 -> false
2 Danish -> true
blend Danish -> true
pallmall Danish -> false
bird Danish -> false
British bird -> true
red bird -> true
white bird -> false
pallmall white -> false
blue bird -> false
pallmall blue -> false
red pallmall -> true
British pallmall -> true
4 pallmall -> false
3 pallmall -> true
milk pallmall -> true
tea pallmall -> false
blend tea -> true
2 tea -> true
cat tea -> false
Danish cat -> false
bird tea -> false
milk bird -> true
3 bird -> true
4 bird -> false
dog 3 -> false
Swedish 3 -> false
milk Swedish -> false
dog milk -> false
cat 3 -> false
1 cat -> true
yellow cat -> true
red cat -> false
British cat -> false
white cat -> false
blue cat -> false
water cat -> true
milk cat -> false
Norwegian cat -> true
German cat -> false
prince cat -> false
dunhill cat -> true
fish dunhill -> false
1 fish -> false
yellow fish -> false
water fish -> false
Norwegian fish -> false
fish 3 -> false
milk fish -> false
white 3 -> false
red 3 -> true
British 3 -> true
German 3 -> false
prince 3 -> false
4 prince -> true
horse prince -> false
fish prince -> true
milk prince -> false
coffee prince -> true
blue prince -> false
German blue -> false
white prince -> false
bluemaster white -> true
5 white -> true
beer white -> true
tea white -> false
Danish white -> false
blue Danish -> true
Swedish blue -> false
dog blue -> false
white Swedish -> true
4 Swedish -> false
German 4 -> true
dog 4 -> false
fish 4 -> true
2 fish -> false
blend fish -> false
5 fish -> false
beer fish -> false
bluemaster fish -> false
green fish -> true
red fish -> false
British fish -> false
white fish -> false
blue fish -> false
Danish fish -> false
German fish -> true
tea fish -> false
coffee fish -> true
dog coffee -> false
beer dog -> true
5 dog -> true
2 dog -> false
blend dog -> false
bluemaster dog -> true
green dog -> false
white dog -> true
horse white -> false
milk white -> false
red milk -> true
British milk -> true
German milk -> false
coffee German -> true
horse German -> false
white German -> false
2 coffee -> false
blend coffee -> false
beer British -> false
5 British -> false
bluemaster British -> false
red bluemaster -> false
5 red -> false
beer red -> false
horse British -> false
Danish horse -> true
tea horse -> true
beer horse -> false
5 horse -> false
2 horse -> true
blend horse -> true
bluemaster horse -> false
British blend -> false
red blend -> false
blue blend -> true
bluemaster blue -> false
5 blue -> false
2 blue -> true
beer blue -> false
tea blue -> true
red 2 -> false
British 2 -> false
horse blue -> true
red horse -> false

1 yellow Norwegian water dunhill cat
2 blue Danish tea blend horse
3 red British milk pallmall bird
4 green German coffee prince fish
5 white Swedish beer bluemaster dog

Boris Popov

unread,
Mar 12, 2001, 12:29:25 AM3/12/01
to
"Brian Harvey" <b...@abbenay.cs.berkeley.edu> wrote in message
news:98h62k$knn$1...@abbenay.CS.Berkeley.EDU...

> "Boris Popov" <no-spa...@bigserver.com> writes:
> >house 1 2 3 4 5
> >color yellow blue red green white
> >nationality norweigian dane brit german swede
> >drink water tea milk coffee beer
> >smoke dunhill blend pall mall prince bluemaster
> >pet cats horse birds fish dogs
> >
> >P.S. Did I have to write software to solve it ? :)
>
> I can't resist being (apparently) first to post a computer program.
> But it doesn't really belong in any of these newsgroups, because it's
> written in Logo.

Khm... I thought that software is impossible to write for this particular
problem. The thing is that there's no fifth pet element (fish) explicitly
defined in the puzzle. And it will definetely blow up if you run it with no
"fish"... :)

-Boris


Petasis George

unread,
Mar 12, 2001, 1:54:23 AM3/12/01
to
Well, I saw the same in Greek a month ago and it was somewhat
unclear in its formation. Now that I see the English version, the ambiguity
remains. If we assume that the fifth owner owns the fish, then:

There is only one solution if you *asume* that
"The green house is on the left of the white house." means that
the green house in next to the white house, on the left side.
On the other hand, if you assume that the green house is on the left
of the white house, but other houses can be in between, then the are more
than one solutions. In a simple C++ program that a friend wrote to find
all solutions, it find at least 8.

Supposing the first case (green house next to white, on the left), everyone
that tried to solve it succeded. Ok, some people simply need more time.
Even my 16-year little brother manage to solve it. So, where is this 98%
not able to solve it?

But unfortunately, I have to agree with Greg Jorgensen: the way it is
stated is not solvable:-) You have to make assumptions for solving it...

George

sulfugor

unread,
Mar 12, 2001, 1:56:25 AM3/12/01
to

Gregory Jorgensen wrote in message ...

>The 2% that can solve it must be psychic or deranged. The riddle as posed
is not
>solvable.
>
>We are told of five houses anf five people. The hints mention five colors
(red,
>green, white, yellow, blue), five drinks (tea, coffee, milk, beer, water),
five
>smokes (Pall Mall, Dunhill, Blends, Bluemaster, Prince), and five
nationalities
>(Brit, Swede, Dane, Norwegian, German). But only four types of pet are
>mentioned: dogs, birds, cats, horse. We have no evidence that any of the
five
>owns fish.


But the fish is mentionned in the question before the clues are given. We
are able to find who owns each of the 4 pets mentionned in the hint list. is
it so unreasonable to assume then that the last pet is a fish, since we were
asked about it ? The question IMplied that one of the 5 people owned a fish.

sulfugor

ps = by the way, how long is this supposed to take ( solving the riddle) ?

Petasis George

unread,
Mar 12, 2001, 1:58:48 AM3/12/01
to
sulfugor wrote:
>
> Gregory Jorgensen wrote in message ...
> >The 2% that can solve it must be psychic or deranged. The riddle as posed
> is not
> >solvable.
> >
> >We are told of five houses anf five people. The hints mention five colors
> (red,
> >green, white, yellow, blue), five drinks (tea, coffee, milk, beer, water),
> five
> >smokes (Pall Mall, Dunhill, Blends, Bluemaster, Prince), and five
> nationalities
> >(Brit, Swede, Dane, Norwegian, German). But only four types of pet are
> >mentioned: dogs, birds, cats, horse. We have no evidence that any of the
> five
> >owns fish.
>
> But the fish is mentionned in the question before the clues are given. We
> are able to find who owns each of the 4 pets mentionned in the hint list. is
> it so unreasonable to assume then that the last pet is a fish, since we were
> asked about it ? The question IMplied that one of the 5 people owned a fish.
>
> sulfugor
>
> ps = by the way, how long is this supposed to take ( solving the riddle) ?
>
Yes, that the problem: it implies, it does not states :-)
It took me about 20 minutes to solve it
(with paper+pencil of-course :-))...

George

Michael DeBusk

unread,
Mar 12, 2001, 3:18:13 AM3/12/01
to
Gregory Jorgensen wrote:

> We have no evidence that any of the five owns fish.

I know very little about transformational grammar, but I've picked up
enough to respond to this. There's a thing called "presupposition" at
play here.

A presupposition is an idea one has to pre-suppose so one can make sense
of a given sentence. For example, the sentence "tell the dog to get off
the sofa" contains presuppositions that such a thing as a dog exists,
such a thing as a sofa exists, that both the dog and the sofa exist in
such a way that dogs can be on sofas, that dogs can obey commands...
even that the speaker believes that the listener speaks and understands
English. All the things native speakers of a language intuitively know
when they go through the process of understanding a sentence, in other
words.

The question "Who owns the fish?" contains a linguistic presupposition
indicating *someone* owns a fish; the question is not whether, but whom.
That presupposition is the evidence.

If the question was "Does someone own a fish?" one could then assert
there was no available information.

Someone else in the thread pointed out the problems involved in
translating the puzzle to other languages. I imagine that would create
some roadblocks, because the structure of presuppositions would be
different in each.

--
Use the munged address below to reply:
debu4335 [shift-2] eclipsetel [dot] com

Gregory Jorgensen

unread,
Mar 12, 2001, 3:31:22 AM3/12/01
to
Assuming the unknown pet is the fish, solving the puzzle doesn't take any great
skill with logic or math; certainly more than 2% of the population can figure it
out. I think the riddle demonstrates the fallacy of unwarranted assumptions.
It's a trick question; you work out the solution only to be told "I never said
anyone had fish." The more literal-minded the reader, the more likely they will
be taken in.


In article <98438018...@news.aei.ca>, sulfugor says...


>But the fish is mentionned in the question before the clues are given. We
>are able to find who owns each of the 4 pets mentionned in the hint list. is
>it so unreasonable to assume then that the last pet is a fish, since we were
>asked about it ? The question IMplied that one of the 5 people owned a fish.
>
>sulfugor
>
>ps = by the way, how long is this supposed to take ( solving the riddle) ?

Greg Jorgensen

Gregor Lingl

unread,
Mar 12, 2001, 4:39:54 AM3/12/01
to

Petasis George schrieb:

....

> But unfortunately, I have to agree with Greg Jorgensen: the way it is
> stated is not solvable:-) You have to make assumptions for solving it...
>
> George
>

Right!. But the ONLY assumption you have to make is, that it IS solvable!
Gregor Lingl

Alex Martelli

unread,
Mar 12, 2001, 4:35:06 AM3/12/01
to
"Boris Popov" <no-spa...@bigserver.com> wrote in message
news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...
> "Bruce Elrick" <bel...@home.com> wrote in message
> news:3AABE712...@home.com...
> > I swear there is no evidence that any of them own a fish. The German
> > owns an emu.
> >
> > Bruce
>
> I am missing something then. I thought my table satisfies all given
> statements and it has fish right under the german...
>
> -Boris
> P.S. What's emu ?

A large flightless bird, whose meat is appreciated by more and
more connaisseurs (it's red meat, reasonably tasty, quite soft,
light in cholesterol & fats). You can get a LOT of information
about it from the American Emu Association, http://www.aea-emu.org/.
(Particularly with the many recent scares about "mad cow's disease"
aka BSE, emu meat has received a huge market boost -- it's now
quite common for supermarkets around here to offer it, restaurants
to feature it in several dishes, etc).

Any association with Europe's "Economic and Monetary Union" is,
one can hope, totally coincidental (some people WOULD argue that
_that_ EMU _is_ 'owned' "by the German", but that's a base and
unsubstantiated canard...).


Alex

Andreas Leitgeb

unread,
Mar 12, 2001, 8:10:30 AM3/12/01
to
On Sun, 11 Mar 2001 18:49:56 GMT, Steve Graham <js.g...@home.com> wrote:
>Who would be interested in using his/her brain (and his computer) to solve
>the following?
>
>Einstein's Riddle
> [riddle's description snipped]

in Germany, there's a magazine called "PM", which has one riddle of
this structure in (almost) each issue. ("Logik Trainer")

based on this kind of riddles, I've created a tcl/tk-prog, that
helps one solving it.

though, there are still two open problems:
-) it is still possible to enter contradicting information.
(this means, that not yet all logical consequences for
each entered information are obtained - actually i have
a clear idea of what's missing, but i haven't coded it)
-) because Tk cannot yet write vertical texts,
it is not possible to put label for the columns, which
makes it tough to remember what each column represents.
Actually, I haven't even realized the horizontal row-labels, yet :-)

If someone is interested in this kind of riddles, then mail me.
(I for myself have declined from putting any further work into it, lately)

David Murphy

unread,
Mar 12, 2001, 11:08:32 AM3/12/01
to
This reminds me of a test my class was given WAY back in grade 6. It was
two sheets of paper long, and at the very top, it was clearly stated that
the student should 'Read the entire test carefully before beginning'.

The point was, at the bottom of the second page, the student was told
something to the effect of: 'After reading through the test, place your
pencil on you desk and wait for further instructions'.

Well, 90%+ of the class immediately went to work on this test. There were a
couple of questions where students had to get up and do things, and it was
rather amusing to watch them run around. About 30 minutes later, they
started to get to the end, and they realized that they had been running
around and scribbling down answers for nothing. It was a rather profound
lesson, at least for me.

*IF* Einstein was just talking about people's ability to deal with just the
facts, and not to make assumptions, I think 2% +/- 5% is probably a good
estimate. Take a look at the first draft of the next project specification
you get *grin*

dave

"Gregory Jorgensen" <gr...@pobox.com> wrote in message

news:uP%q6.2375$54....@www.newsranger.com...

sulfugor

unread,
Mar 12, 2001, 11:13:02 AM3/12/01
to

Petasis George wrote in message <3AAC73A8...@iit.demokritos.gr>...

>sulfugor wrote:
>>
>> Gregory Jorgensen wrote in message ...
>>
>> But the fish is mentionned in the question before the clues are given. We
>> are able to find who owns each of the 4 pets mentionned in the hint list.
is
>> it so unreasonable to assume then that the last pet is a fish, since we
were
>> asked about it ? The question IMplied that one of the 5 people owned a
fish.
>>
>> sulfugor
>>
>> ps = by the way, how long is this supposed to take ( solving the riddle)
?
>>
>Yes, that the problem: it implies, it does not states :-)
>It took me about 20 minutes to solve it
>(with paper+pencil of-course :-))...


It took me about 30-35min in total (in 2 stages) to do it. But i must
mention that i was in the metro and i was going to and returning from a
death metal concert, so i can be excused for the lousy times :)
By the way, i also doubt that only 2% of the population could solve this.
It may be that only 2% of people can solve it under a certain number of
minutes.

It was fun to do !

sulfugor

>
>George


sulfugor

unread,
Mar 12, 2001, 11:20:19 AM3/12/01
to

Alex Martelli wrote in message <98i58...@news2.newsguy.com>...

>"Boris Popov" <no-spa...@bigserver.com> wrote in message
>news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...
>> "Bruce Elrick" <bel...@home.com> wrote in message
>> news:3AABE712...@home.com...

>> P.S. What's emu ?


>
>A large flightless bird, whose meat is appreciated by more and
>more connaisseurs (it's red meat, reasonably tasty, quite soft,
>light in cholesterol & fats). You can get a LOT of information
>about it from the American Emu Association, http://www.aea-emu.org/.
>(Particularly with the many recent scares about "mad cow's disease"
>aka BSE, emu meat has received a huge market boost -- it's now
>quite common for supermarkets around here to offer it, restaurants
>to feature it in several dishes, etc).
>
>Any association with Europe's "Economic and Monetary Union" is,
>one can hope, totally coincidental (some people WOULD argue that
>_that_ EMU _is_ 'owned' "by the German", but that's a base and
>unsubstantiated canard...).
>
>

I think we 're dealing with another kind of fish here : the lame duck
presidency of the EMU by germany.

sulfugor , pundit

>Alex
>
>
>


Donal K. Fellows

unread,
Mar 12, 2001, 11:20:46 AM3/12/01
to
Andreas Leitgeb wrote:
> -) because Tk cannot yet write vertical texts,
> it is not possible to put label for the columns, which
> makes it tough to remember what each column represents.
> Actually, I haven't even realized the horizontal row-labels, yet :-)

Stick to all-caps and then just place one (unrotated) character above the
next, and everything will come out looking OK. Simple? Yes. Easy? Yes.
Exactly the effect you're after? No, but Good Enough For The Lazy. :^)

Donal.
--
Donal K. Fellows http://www.cs.man.ac.uk/~fellowsd/ fell...@cs.man.ac.uk
-- There are worse futures that burning in hell. Imagine aeons filled with
rewriting of your apps as WinN**X API will change through eternity...
-- Alexander Nosenko <n...@titul.ru>

Gregory Jorgensen

unread,
Mar 12, 2001, 2:36:35 PM3/12/01
to
I just looked at a bunch of web sites I turned up with Google searching for
"einstein riddle fish." All of them conclude that the German owns the fish. I
didn't find any confirmation that Einstein actually conceived the riddle or said
that only 2% of the population could solve it. Nor could I determine if the
original author wrote the riddle in English, German, or some other language.

Clearly my statement that the puzzle can't be solved puts me in a minority. If
you assume that SOMEONE keeps fish the puzzle can be solved with a little bit of
logic. Perhaps the intent of the riddle is to show how few people can devise a
useful and logical methodology.

Dave Simons

unread,
Mar 12, 2001, 7:12:48 PM3/12/01
to
David Murphy wrote:

I'm certain that if Albert had wanted to lead people up the garden path, he
could have devised a much more subtle way than "na na na na na - I never
said there was any fish!"

Presupposing, of course, that it realy does come from Einstein.

I used to buy a monthly French magazine called Logica that had nothing but
this exact type of puzzle from cover to cover. I can tell you they start to
get boring after doing about two hundred of them. I remember learning of
the magazine's existence from a poetry-writing tramp who wandered into a
café where I was one day. You meet all sorts...

Dave

--
I think, therefore I am ... or at least there are some people who think I
am.

David Murphy

unread,
Mar 12, 2001, 10:43:12 PM3/12/01
to

"{R} Richard Ashton" <{R}@news.semolina.org> wrote in message
news:r62qats4341i3hcn7...@4ax.com...

> On Mon, 12 Mar 2001 16:08:32 GMT, "David Murphy" <dwmu...@home.com>
> wrote:
>
> }*IF* Einstein was just talking about people's ability to deal with just
the
> }facts, and not to make assumptions, I think 2% +/- 5% is probably a good
> }estimate. Take a look at the first draft of the next project
specification
> }you get *grin*
>
> He was. There are many variants of these, and they have been around along
> time. A lot of psychological papers have been written about "mindsets" and
> jumping to conclusions, reading more into the information than the data
> warrants. I could go on ...
>
> {R}

Interesting.

Although I haven't read any of those papers, i have to wonder what
types of people are inclined to make such assumptions. i mean, for varies
activities, it might be essential.

For example, anything creative may require the ability to lead 'beyond
the facts' to come up with something new. (so long as the individual is able
to work back and fill in the facts)

dave


Mark Yudkin

unread,
Mar 13, 2001, 1:48:57 AM3/13/01
to
Rather than looking at America sites for information about emu's, consider
that it's an AUSTRALIAN flightless bird, and there's more to it than eating
it.

"Alex Martelli" <ale...@yahoo.com> wrote in message
news:98i58...@news2.newsguy.com...

Alex Martelli

unread,
Mar 13, 2001, 4:05:22 AM3/13/01
to
"Mark Yudkin" <myu...@compuserve.com> wrote in message
news:98kfrl$pug$1...@sshuraaa-i-1.production.compuserve.com...

> Rather than looking at America sites for information about emu's, consider
> that it's an AUSTRALIAN flightless bird, and there's more to it than
eating
> it.

It's an animal of Australian _origin_, just as, say, cows are of old-world
origin; that doesn't imply it's wrong to look for emu information on
American
sites, any more than the species-origin of cows impedes Australian or
American
sites offering interesting bovine information.

And, yes, of course there's more than gastronomy about _any_ animal or
plant. However, _most_ people's main interests in cows, tomatos, lettuce,
or emus, are quite likely to include culinary aspects (no matter how
fascinating it IS to study a tomato flower's sepals, petals, stamens,
carpels, anther, stigma, &c, for example, it is a biological as well
as a cultural fact that most people would be more interested in
ascertaining the amount of, say, sodium, vitamins, energy, minerals,
dietary fiber, etc, in a 100-gram serving of tomato juice...).


Alex

J. A. Durieux (reply from http://www.biep.org/)

unread,
Mar 13, 2001, 10:43:29 AM3/13/01
to
"Boris Popov" <no-spa...@bigserver.com> wrote in message
news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...
> P.S. What's emu ?

A European currency unit, now replaced by the Euro..

--
Biep
http://www.biep.org/
(email to me can be sent from there)


Thaddeus L Olczyk

unread,
Mar 13, 2001, 10:57:19 AM3/13/01
to
On Mon, 12 Mar 2001 16:08:32 GMT, "David Murphy" <dwmu...@home.com>
wrote:

>This reminds me of a test my class was given WAY back in grade 6. It was


>two sheets of paper long, and at the very top, it was clearly stated that
>the student should 'Read the entire test carefully before beginning'.
>
>The point was, at the bottom of the second page, the student was told
>something to the effect of: 'After reading through the test, place your
>pencil on you desk and wait for further instructions'.
>
>Well, 90%+ of the class immediately went to work on this test. There were a
>couple of questions where students had to get up and do things, and it was
>rather amusing to watch them run around. About 30 minutes later, they
>started to get to the end, and they realized that they had been running
>around and scribbling down answers for nothing. It was a rather profound
>lesson, at least for me.
>

The version I saw the last question was sign your name and turn it in.
There were ( AFAIK ) no questions about getting up and running around.
We were given an hour told it was very important. I gave up after
reading the test halfway in the first thirty minutes and started
answering questions.

It didn't help that we had a strange test two weeks.
For the first time the HS I was in had set up a special schedual for
midterms/finals. In this particular class we would meet for two
seperate hours. THe teacher gave us an exam that should have lasted
one hour ( by her estimation ). She was going to use the second hour
for a class. It turned out that most fiished about 3/4 of the test in
the two hours. So she had a reputation for giving long tests.

>*IF* Einstein was just talking about people's ability to deal with just the
>facts, and not to make assumptions, I think 2% +/- 5% is probably a good
>estimate. Take a look at the first draft of the next project specification
>you get *grin*
>

The problem is typical of problems published in many magazines ( here
in Dell Crosswords ). I suspect that 2%-5% will have the motivation to
sit through solving the puzzle unless there were some other reward,
but I figure half the population could actually solve it given the
proper motivation.

I also figure the fish thing was simply a typo, and that this guy (
who hasn't resdponded ) was probably given this as a homework
assignement, and is simply looking for a cheap way to get it done.

mudshark

unread,
Mar 13, 2001, 10:57:50 AM3/13/01
to
"J. A. Durieux \(reply from http://www.biep.org/\)" <bo...@ddress.com>
wrote in <98lf4g$2dqj2$1...@ID-63952.news.dfncis.de>:

>"Boris Popov" <no-spa...@bigserver.com> wrote in message
>news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...
>> P.S. What's emu ?
>
>A European currency unit, now replaced by the Euro..
>

That's ecu (echo? echo echo echo ....)

Philip Wright

unread,
Mar 13, 2001, 11:02:11 AM3/13/01
to
"J. A. Durieux (reply from http://www.biep.org/)" wrote:
>
> "Boris Popov" <no-spa...@bigserver.com> wrote in message
> news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...
> > P.S. What's emu ?
>
> A European currency unit, now replaced by the Euro..
>

I thought it was software - "Emu Might-be Unix"

Sorry

Boris Popov

unread,
Mar 13, 2001, 11:07:54 AM3/13/01
to
"Thaddeus L Olczyk" <olc...@interaccess.com> wrote in message
news:3aae4114...@nntp.interaccess.com...

There are a lot of references to this puzzle on the internet mentioning
Einstein, 2% and non-existing "fish"... But again... You never know... :)

-Boris


Donal K. Fellows

unread,
Mar 13, 2001, 11:34:05 AM3/13/01
to
Thaddeus L Olczyk wrote:
> I also figure the fish thing was simply a typo, and that this guy (
> who hasn't resdponded ) was probably given this as a homework
> assignement, and is simply looking for a cheap way to get it done.

That'd be a very lame homework assignment. Not unless you had to write
a program in $FAVOURITE_LANGUAGE to compute the answer automatically
(which is much more interesting, especially if you make the program
start from the natural language expression of the problem! :^)

"I wouldn't just call you wrong. I'd go further and call you an argumentative
net-kook idiot who can't do his own research before opening his mouth and
yammering bullshit." -- Theo de Raadt <der...@zeus.theos.com>

Yoann Padioleau

unread,
Mar 13, 2001, 3:28:25 PM3/13/01
to
"Steve Graham" <js.g...@home.com> writes:

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

here it is:

%----------------------------------------------------------------
% a sicstus program
:- use_module(library(clpfd)).

relation(Unknown) :-
Unknown =
[[Color1, Nationality1, Drink1, Smoke1, Pet1]
,[Color2, Nationality2, Drink2, Smoke2, Pet2]
,[Color3, Nationality3, Drink3, Smoke3, Pet3]
,[Color4, Nationality4, Drink4, Smoke4, Pet4]
,[Color5, Nationality5, Drink5, Smoke5, Pet5]
]
, Colors = [Color1, Color2, Color3, Color4, Color5]
, Nationalities = [Nationality1, Nationality2, Nationality3, Nationality4, Nationality5]
, Drinks = [Drink1, Drink2, Drink3, Drink4, Drink5]
, Smokes = [Smoke1, Smoke2, Smoke3, Smoke4, Smoke5]
, Pets = [Pet1, Pet2, Pet3, Pet4, Pet5],

Red = 1, Green = 2, Yellow = 3, Blue = 4, White = 5,
Brit = 1, Sweed = 2, Dane = 3, Norvegian = 4, German = 5,
Tea = 1, Coffee = 2, Milk = 3, Beer = 4, Water = 5,
Pall_mall = 1, Dunhill = 2, Blends = 3, Bluemaster = 4, Prince = 5,
Dogs = 1, Birds = 2, Cats = 3, Fish = 4, Horse = 5,

domain([Color1, Nationality1, Drink1, Smoke1, Pet1
,Color2, Nationality2, Drink2, Smoke2, Pet2
,Color3, Nationality3, Drink3, Smoke3, Pet3
,Color4, Nationality4, Drink4, Smoke4, Pet4
,Color5, Nationality5, Drink5, Smoke5, Pet5], 1, 5)
, all_different(Colors)
, all_different(Nationalities)
, all_different(Drinks)
, all_different(Smokes)
, all_different(Pets)
,

% cant do the member, cos member need instantiated things!! and if enum and then test member
% we gain nothing cos always big search space, the labeling must be at the end !!

A1 in 1..5, element(A1, Nationalities, Brit), element(A1,Colors,Red),
A2 in 1..5, element(A2, Nationalities, Sweed), element(A2,Pets, Dogs),
A3 in 1..5, element(A3, Nationalities, Dane), element(A3,Drinks, Tea),
A4 in 1..5, element(A4, Colors, Green),
A5 in 1..5, A5 #= A4+1, element(A5, Colors, White),
A6 in 1..5, element(A6, Colors, Green), element(A6, Drinks, Coffee),
A7 in 1..5, element(A7, Smokes, Pall_mall), element(A7, Pets, Birds),
A8 in 1..5, element(A8, Colors, Yellow), element(A8, Smokes, Dunhill),
element(3, Drinks, Milk),
element(1, Nationalities, Norvegian),
A9 in 1..5, element(A9, Smokes, Blends),
A10 in 1..5, ((A10 #= A9-1) #\/ (A10 #= A9+1)), element(A10, Pets, Cats),
A11 in 1..5, element(A11, Pets, Horse),
A12 in 1..5 , ((A12 #= A11-1) #\/ (A12 #= A11+1)), element(A12, Smokes, Dunhill),
A13 in 1..5, element(A13, Smokes, Bluemaster), element(A13, Drinks, Beer),
A14 in 1..5, element(A14, Nationalities, German), element(A14, Smokes, Prince),
A15 in 1..5, element(A15, Nationalities, Norvegian),
A16 in 1..5 , ((A16 #= A15-1) #\/ (A16 #= A15+1)), element(A16, Colors, Blue),
A17 in 1..5, element(A17, Smokes, Blends),
A18 in 1..5 , ((A18 #= A17-1) #\/ (A18 #= A17+1)), element(A18, Drinks, Water),

labeling([],
[Color1, Nationality1, Drink1, Smoke1, Pet1
,Color2, Nationality2, Drink2, Smoke2, Pet2
,Color3, Nationality3, Drink3, Smoke3, Pet3
,Color4, Nationality4, Drink4, Smoke4, Pet4
,Color5, Nationality5, Drink5, Smoke5, Pet5
, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18
]).

%relation(X).
% X = [[3,4,5,2,3],[4,3,1,3,5],[1,1,3,1,2],[2,5,2,5,4],[5,2,4,4,1]] ? ; corresponding to
% [Yellow, Norvegian, Water, Dunhill, Cats]
% [Blue, Dane, Tea, Blends, Horse]
% [Red, Brit, Milk, Pall_mall, Birds]
% [Green, German, Coffee, Prince, Fish]
% [White, Sweed, Beer, Bluemaster, Dogs]

%----------------------------------------------------------------

--
Yoann Padioleau, INSA de Rennes, France, http://www.irisa.fr/prive/padiolea
Opinions expressed here are only mine. Je n'écris qu'à titre personnel.
**____ Get Free. Be Smart. Simply use Linux and Free Software. ____**

Howard Brazee

unread,
Mar 13, 2001, 4:54:56 PM3/13/01
to
This is cross-posted. Please tell us which language you are using.

P4R0XYSM

unread,
Mar 13, 2001, 5:19:07 PM3/13/01
to
The statement you posted suggested that no owners have the same, well,
taking this logically I am assuming that this means they cannot share the
same pet, the statement does not explicitly specify that no two people can
own a fish, they could own different fishes, this would not be the same pet,
perhaps as a consequence of this, uncertainty comes into play and everyone
owns the fish at the same time. I wonder if Einstein saw the quantum
implications behind his riddle. Hehe

Only Joking

Ashley Mills


Gregory Jorgensen <gr...@pobox.com> wrote in message

news:7z9r6.2576$54....@www.newsranger.com...

Brian Harvey

unread,
Mar 13, 2001, 6:47:45 PM3/13/01
to
"Boris Popov" <no-spa...@bigserver.com> writes:
> The thing is that there's no fifth pet element (fish) explicitly
>defined in the puzzle.

Of course the fish is explicit in the puzzle -- it's in the question
"who owns the fish?"

This is a well-known convention among logic-puzzle fans; it's perfectly
legitimate to treat this as if there were a clue saying "someone owns
a fish."

Steve Holden

unread,
Mar 13, 2001, 6:52:01 PM3/13/01
to
"J. A. Durieux (reply from http://www.biep.org/)" <bo...@ddress.com> wrote
in message news:98lf4g$2dqj2$1...@ID-63952.news.dfncis.de...

> "Boris Popov" <no-spa...@bigserver.com> wrote in message
> news:98gp5b$1u0oi$1...@ID-75892.news.dfncis.de...
> > P.S. What's emu ?
>
> A European currency unit, now replaced by the Euro..
>
Bzzzt. EMU is the European Monetary Union, the group of countries which have
collectively agreed to bind their exchange rates to the ECU, which is the
European Currency Unit, commonly referred to as the Euro.

still-european-even-though-living-in-the-usa-ly y'rs - steve

Remco Gerlich

unread,
Mar 13, 2001, 8:57:02 PM3/13/01
to
Howard Brazee <how...@brazee.net> wrote in comp.lang.python:

> This is cross-posted. Please tell us which language you are using.
>
> Yoann Padioleau wrote:
>
> > "Steve Graham" <js.g...@home.com> writes:
> >
> > > Who would be interested in using his/her brain (and his computer) to solve
> > > the following?
> > here it is:
> >
> > %----------------------------------------------------------------
> > % a sicstus program

hint ^^^^^^^


Sicstus Prolog. Seems a nice choice for this sort of problem.

--
Remco Gerlich

Petasis George

unread,
Mar 14, 2001, 1:40:00 AM3/14/01
to
"Donal K. Fellows" wrote:
>
> Thaddeus L Olczyk wrote:
> > I also figure the fish thing was simply a typo, and that this guy (
> > who hasn't resdponded ) was probably given this as a homework
> > assignement, and is simply looking for a cheap way to get it done.
>
> That'd be a very lame homework assignment. Not unless you had to write
> a program in $FAVOURITE_LANGUAGE to compute the answer automatically
> (which is much more interesting, especially if you make the program
> start from the natural language expression of the problem! :^)
>
Well, try this:-)
Written by a friend of mine. Its amazing how small can programs be if you
know STL. To bad I don't know stl :-)
Of course it will need some time, as it randomly checks all combinations...

George

//A simple randomiser to find the solution to the riddle, by J. Y. Goulermas

#include <vector>
#include <ctime>
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>

using namespace std;

enum element_type { nation, colour, pet, drink, cigs };
enum nation_type { english, swedish, danish, german, norwegian };
enum colour_type { red, blue, yellow, green, white };
enum pet_type { cat, bird, horse, dog, fish };
enum drink_type { tea, water, milk, beer, coffee };
enum cigs_type { palmal, dunhill, bluemasters, prince, blends };

char* codes[][5] = { { "english", "swedish", "danish", "german",
"norwegian" },
{ "red", "blue", "yellow", "green",
"white" },
{ "cat", "bird", "horse", "dog", "fish"
},
{ "tea", "water", "milk", "beer",
"coffee" },
{ "palmal", "dunhill", "bluemasters", "prince",
"blends" }
};

inline bool ValidConstraints(const vector< vector<int> >& p)
{
return p[nation][norwegian] == 0 //Rule 9
&&
p[colour][blue] == 1 //Rule 14
&&
p[drink][milk] == 2 //Rule 8
&&
p[nation][english] == p[colour][red] //Rule 1
&&
p[nation][swedish] == p[pet][dog] //Rule 2
&&
p[nation][danish] == p[drink][tea] //Rule 3
&&
p[colour][yellow] == p[cigs][dunhill] //Rule 7
&&
p[pet][bird] == p[cigs][palmal] //Rule 6
&&
p[drink][beer] == p[cigs][bluemasters] //Rule 12
&&
p[nation][german] == p[cigs][prince] //Rule 13
&&
p[colour][green] == p[drink][coffee] //Rule 5
&&
abs(p[cigs][blends] - p[pet][cat]) == 1 //Rule 10
&&
abs(p[cigs][blends] - p[drink][water]) == 1 //Rule 15
&&
abs(p[pet][horse] - p[cigs][dunhill]) == 1 //Rule 11
&&
p[colour][green] < p[colour][white]; //Rule 4
}

void Output(const vector< vector<int> >& p,
unsigned c
)
{
ofstream text("solution.txt");

for (int i = nation; i <= cigs; ++i)
{
for (int j = 0; j < p[i].size(); ++j)
text <<setw(20)
<<codes[i][ find(p[i].begin(), p[i].end(), j) - p[i].begin() ];
//get inverse permutation
text <<endl;
}
text <<"\n\nTotal attempts: " <<c;

text.close();
}

void main(void)
{
//srand( (unsigned) time(NULL) ); //optional RNG seeding

int ramp[] = { 0, 1, 2, 3, 4 };
vector< vector<int> > permutations;
unsigned counter(0);
for (int i = nation; i <= cigs; i++ )
permutations.push_back( vector<int>(ramp, ramp + 5) );

do
{
for (int i = nation; i <= cigs; i++)
random_shuffle( permutations[i].begin(), permutations[i].end() );
if ( ! (++counter % 100000) )
cout <<"\rRe-Randomisations: " <<counter;
}
while ( ! ValidConstraints(permutations) );

Output(permutations, counter);
}

Yoann Padioleau

unread,
Mar 14, 2001, 7:26:10 AM3/14/01
to
Petasis George <pet...@iit.demokritos.gr> writes:

> "Donal K. Fellows" wrote:
> >
> > Thaddeus L Olczyk wrote:
> > > I also figure the fish thing was simply a typo, and that this guy (
> > > who hasn't resdponded ) was probably given this as a homework
> > > assignement, and is simply looking for a cheap way to get it done.
> >
> > That'd be a very lame homework assignment. Not unless you had to write
> > a program in $FAVOURITE_LANGUAGE to compute the answer automatically
> > (which is much more interesting, especially if you make the program
> > start from the natural language expression of the problem! :^)
> >
> Well, try this:-)
> Written by a friend of mine. Its amazing how small can programs be if you
> know STL. To bad I don't know stl :-)
> Of course it will need some time, as it randomly checks all combinations...

But your program dont really do the job cos it is too slow.
You first generate the permutations and then test, the pb is that
there is too many permutations :
p[nation][english] can be either 0 1 2 3 4 or 5, same for the other variables
you have 5*(5!) possibililty = 24 883 200 000
if you are able to do 1 000 000 ValidConstraints per second (cos you have perhaps
a very very fast computer) you will need 24 883 seconds =~ 6hours to compute (in the worst case
i admit)

the prolog program i propose take 0.1 second to find the solution :)
who say that prolog is slower than c++ :))

--

Andreas Leitgeb

unread,
Mar 14, 2001, 7:54:09 AM3/14/01
to
Andreas Leitgeb <Andreas...@siemens.at> wrote:
>based on this kind of riddles, I've created a tcl/tk-prog, that
>helps one solving it.

someone asked (per email), so here it is:

<http://avl.enemy.org/MyWorks/TclTk/> get "logik.tgz"

PS: there is also some other stuff there ...

Howard Brazee

unread,
Mar 14, 2001, 9:59:13 AM3/14/01
to
The original poster must have used a Spammer tool. This thread is cross-posted
elsewhere as well, and I have seen one other coded solution, in Forth.

It would be fun to see a bunch of language solutions, first to solve this problem,
and then a more generic version to solve this class of problems.

Kevin Cazabon

unread,
Mar 11, 2001, 11:50:08 PM3/11/01
to
You've obviously got too much time on your hands... q:]

"Brian Harvey" <b...@abbenay.cs.berkeley.edu> wrote in message
news:98h62k$knn$1...@abbenay.CS.Berkeley.EDU...
| "Boris Popov" <no-spa...@bigserver.com> writes:
| >house 1 2 3 4 5
| >color yellow blue red green white
| >nationality norweigian dane brit german swede
| >drink water tea milk coffee beer
| >smoke dunhill blend pall mall prince bluemaster
| >pet cats horse birds fish dogs
| >
| >P.S. Did I have to write software to solve it ? :)
|
| I can't resist being (apparently) first to post a computer program.
| But it doesn't really belong in any of these newsgroups, because it's
| written in Logo.
|
| First get Berkeley Logo from ftp://ftp.cs.berkeley.edu/ucblogo/
| (pick the one that matches your platform)
|
| Then get the logic-puzzle-solver from
| http://www.cs.berkeley.edu/~bh/logic-code/hybrid.lg
|
| Then here's the part specific to this puzzle:
|
| ? po [einstein neighbor neighbor1]
| to einstein
| cleanup
| category "position [1 2 3 4 5]
| category "color [red green white yellow blue]
| category "nationality [British Swedish Danish Norwegian German]
| category "beverage [tea coffee milk beer water]
| category "cigar [pallmall dunhill blend bluemaster prince]
| category "pet [dog bird cat horse fish]
| verify "British "red
| verify "Swedish "dog
| verify "Danish "tea
| justbefore "green "white :position
| verify "green "coffee
| verify "pallmall "bird
| verify "yellow "dunhill
| verify 3 "milk
| verify 1 "Norwegian
| neighbor "blend "cat :position
| neighbor "horse "dunhill :position
| verify "bluemaster "beer
| verify "German "prince
| neighbor "Norwegian "blue :position
| neighbor "blend "water :position
| print []
| solution
| end
|
| to neighbor :a :b :lineup
| falsify :a :b
| neighbor1 :lineup count :lineup
| end
|
| to neighbor1 :lineup :count
| if :count=0 [stop]
| foreach bl bf bf :lineup [implies :a first :lineup "true :b ? "false]
| neighbor1 (lput first :lineup bf :lineup) :count-1
| end
|
| ? solve [einstein]
| category position [1 2 3 4 5]
| category color [red green white yellow blue]
| category nationality [British Swedish Danish Norwegian German]
| category beverage [tea coffee milk beer water]
| category cigar [pallmall dunhill blend bluemaster prince]
| category pet [dog bird cat horse fish]
| British red -> true
| Swedish red -> false
| Danish red -> false
| Norwegian red -> false
| German red -> false
| green British -> false
| white British -> false
| yellow British -> false
| blue British -> false
| Swedish dog -> true
| British dog -> false
| red dog -> false
| Danish dog -> false
| Norwegian dog -> false
| German dog -> false
| bird Swedish -> false
| cat Swedish -> false
| horse Swedish -> false
| fish Swedish -> false
| Danish tea -> true
| British tea -> false
| red tea -> false
| Swedish tea -> false
| dog tea -> false
| Norwegian tea -> false
| German tea -> false
| coffee Danish -> false
| milk Danish -> false
| beer Danish -> false
| water Danish -> false
| green 5 -> false
| white 1 -> false
| green coffee -> true
| red coffee -> false
| British coffee -> false
| white coffee -> false
| yellow coffee -> false
| blue coffee -> false
| 5 coffee -> false
| tea green -> false
| Danish green -> false
| milk green -> false
| beer green -> false
| water green -> false
| pallmall bird -> true
| dunhill bird -> false
| blend bird -> false
| bluemaster bird -> false
| prince bird -> false
| dog pallmall -> false
| Swedish pallmall -> false
| cat pallmall -> false
| horse pallmall -> false
| fish pallmall -> false
| yellow dunhill -> true
| red dunhill -> false
| British dunhill -> false
| green dunhill -> false
| coffee dunhill -> false
| white dunhill -> false
| blue dunhill -> false
| pallmall yellow -> false
| bird yellow -> false
| blend yellow -> false
| bluemaster yellow -> false
| prince yellow -> false
| 3 milk -> true
| 1 milk -> false
| 2 milk -> false
| 4 milk -> false
| 5 milk -> false
| tea 3 -> false
| Danish 3 -> false
| coffee 3 -> false
| green 3 -> false
| white 4 -> false
| beer 3 -> false
| water 3 -> false
| 1 Norwegian -> true
| 2 Norwegian -> false
| 3 Norwegian -> false
| milk Norwegian -> false
| 4 Norwegian -> false
| 5 Norwegian -> false
| white Norwegian -> false
| British 1 -> false
| red 1 -> false
| Swedish 1 -> false
| dog 1 -> false
| Danish 1 -> false
| tea 1 -> false
| German 1 -> false
| blend cat -> false
| horse dunhill -> false
| yellow horse -> false
| bluemaster beer -> true
| pallmall beer -> false
| bird beer -> false
| dunhill beer -> false
| yellow beer -> false
| blend beer -> false
| prince beer -> false
| tea bluemaster -> false
| Danish bluemaster -> false
| coffee bluemaster -> false
| green bluemaster -> false
| milk bluemaster -> false
| 3 bluemaster -> false
| water bluemaster -> false
| German prince -> true
| British prince -> false
| red prince -> false
| Swedish prince -> false
| dog prince -> false
| Danish prince -> false
| tea prince -> false
| Norwegian prince -> false
| 1 prince -> false
| pallmall German -> false
| bird German -> false
| dunhill German -> false
| yellow German -> false
| blend German -> false
| bluemaster German -> false
| beer German -> false
| Norwegian blue -> false
| 1 blue -> false
| blue 3 -> false
| milk blue -> false
| blue 4 -> false
| blend water -> false
|
|
| Assuming 1 yellow
| 1 yellow -> true
| 2 yellow -> false
| dunhill 2 -> false
| 3 yellow -> false
| milk yellow -> false
| dunhill milk -> false
| 3 dunhill -> false
| 4 yellow -> false
| dunhill 4 -> false
| 5 yellow -> false
| dunhill 5 -> false
| 1 dunhill -> true
| Norwegian dunhill -> true
| Swedish dunhill -> false
| dog dunhill -> false
| yellow dog -> false
| Swedish yellow -> false
| Danish dunhill -> false
| tea dunhill -> false
| water dunhill -> true
| pallmall water -> false
| bird water -> false
| prince water -> false
| German water -> false
| yellow water -> true
| red water -> false
| British water -> false
| white water -> false
| blue water -> false
| Swedish water -> false
| Norwegian water -> true
| 1 water -> true
| 2 water -> false
| 4 water -> false
| 5 water -> false
| dog water -> false
| coffee 1 -> false
| green 1 -> false
| Norwegian green -> false
| yellow Norwegian -> true
| beer Norwegian -> false
| bluemaster Norwegian -> false
| 1 bluemaster -> false
| beer 1 -> false
| horse Norwegian -> false
| 1 horse -> false
| water horse -> false
| blend Norwegian -> false
| 1 blend -> false
| pallmall Norwegian -> false
| bird Norwegian -> false
| 1 bird -> false
| pallmall 1 -> false
| coffee Norwegian -> false
| Danish yellow -> false
| tea yellow -> false
| white 2 -> false
| blend 4 -> false
| blend 3 -> false
| milk blend -> false
| horse 4 -> false
| horse 3 -> false
| milk horse -> false
|
| Assuming 5 beer
| 5 beer -> true
| 2 beer -> false
| bluemaster 2 -> false
| 4 beer -> false
| bluemaster 4 -> false
| 5 bluemaster -> true
| pallmall 5 -> false
| bird 5 -> false
| blend 5 -> false
| 2 blend -> true
| white blend -> false
| pallmall 2 -> false
| bird 2 -> false
| prince 2 -> false
| German 2 -> false
| cat 2 -> false
| cat 5 -> false
| bluemaster cat -> false
| beer cat -> false
| cat 4 -> false
| prince 5 -> false
| German 5 -> false
| tea 5 -> false
| Danish 5 -> false
|
| Assuming 5 Swedish
| 5 Swedish -> true
| 2 Swedish -> false
| blend Swedish -> false
| bluemaster Swedish -> true
| beer Swedish -> true
| coffee Swedish -> false
| green Swedish -> false
| German green -> true
| prince green -> true
| pallmall green -> false
| bird green -> false
| coffee bird -> false
| pallmall coffee -> false
| blend green -> false
| 2 green -> false
| 4 green -> true
| cat green -> false
| coffee cat -> false
| horse green -> false
| coffee horse -> false
| red 4 -> false
| British 4 -> false
| coffee 4 -> true
| tea 4 -> false
| Danish 4 -> false
| 2 Danish -> true
| blend Danish -> true
| pallmall Danish -> false
| bird Danish -> false
| British bird -> true
| red bird -> true
| white bird -> false
| pallmall white -> false
| blue bird -> false
| pallmall blue -> false
| red pallmall -> true
| British pallmall -> true
| 4 pallmall -> false
| 3 pallmall -> true
| milk pallmall -> true
| tea pallmall -> false
| blend tea -> true
| 2 tea -> true
| cat tea -> false
| Danish cat -> false
| bird tea -> false
| milk bird -> true
| 3 bird -> true
| 4 bird -> false
| dog 3 -> false
| Swedish 3 -> false
| milk Swedish -> false
| dog milk -> false
| cat 3 -> false
| 1 cat -> true
| yellow cat -> true
| red cat -> false
| British cat -> false
| white cat -> false
| blue cat -> false
| water cat -> true
| milk cat -> false
| Norwegian cat -> true
| German cat -> false
| prince cat -> false
| dunhill cat -> true
| fish dunhill -> false
| 1 fish -> false
| yellow fish -> false
| water fish -> false
| Norwegian fish -> false
| fish 3 -> false
| milk fish -> false
| white 3 -> false
| red 3 -> true
| British 3 -> true
| German 3 -> false
| prince 3 -> false
| 4 prince -> true
| horse prince -> false
| fish prince -> true
| milk prince -> false
| coffee prince -> true
| blue prince -> false
| German blue -> false
| white prince -> false
| bluemaster white -> true
| 5 white -> true
| beer white -> true
| tea white -> false
| Danish white -> false
| blue Danish -> true
| Swedish blue -> false
| dog blue -> false
| white Swedish -> true
| 4 Swedish -> false
| German 4 -> true
| dog 4 -> false
| fish 4 -> true
| 2 fish -> false
| blend fish -> false
| 5 fish -> false
| beer fish -> false
| bluemaster fish -> false
| green fish -> true
| red fish -> false
| British fish -> false
| white fish -> false
| blue fish -> false
| Danish fish -> false
| German fish -> true
| tea fish -> false
| coffee fish -> true
| dog coffee -> false
| beer dog -> true
| 5 dog -> true
| 2 dog -> false
| blend dog -> false
| bluemaster dog -> true
| green dog -> false
| white dog -> true
| horse white -> false
| milk white -> false
| red milk -> true
| British milk -> true
| German milk -> false
| coffee German -> true
| horse German -> false
| white German -> false
| 2 coffee -> false
| blend coffee -> false
| beer British -> false
| 5 British -> false
| bluemaster British -> false
| red bluemaster -> false
| 5 red -> false
| beer red -> false
| horse British -> false
| Danish horse -> true
| tea horse -> true
| beer horse -> false
| 5 horse -> false
| 2 horse -> true
| blend horse -> true
| bluemaster horse -> false
| British blend -> false
| red blend -> false
| blue blend -> true
| bluemaster blue -> false
| 5 blue -> false
| 2 blue -> true
| beer blue -> false
| tea blue -> true
| red 2 -> false
| British 2 -> false
| horse blue -> true
| red horse -> false
|
| 1 yellow Norwegian water dunhill cat
| 2 blue Danish tea blend horse
| 3 red British milk pallmall bird
| 4 green German coffee prince fish
| 5 white Swedish beer bluemaster dog


Donal K. Fellows

unread,
Mar 14, 2001, 10:39:13 AM3/14/01
to
Yoann Padioleau wrote:

> Petasis George <pet...@iit.demokritos.gr> writes:
>> Well, try this:-)
>> Written by a friend of mine. Its amazing how small can programs be if you
>> know STL. To bad I don't know stl :-)
>> Of course it will need some time, as it randomly checks all combinations...
> But your program dont really do the job cos it is too slow.
> You first generate the permutations and then test, the pb is that
> there is too many permutations :
> p[nation][english] can be either 0 1 2 3 4 or 5, same for the other
> variables you have 5*(5!) possibililty = 24 883 200 000
> if you are able to do 1 000 000 ValidConstraints per second (cos you
> have perhaps a very very fast computer) you will need 24 883 seconds
> =~ 6hours to compute (in the worst case i admit)
>
> the prolog program i propose take 0.1 second to find the solution :)
> who say that prolog is slower than c++ :))

Having read both C++ and Prolog versions, do either of you wish to take on
the extension and write a program to take a natural language description of
the problem and solve it? In this caffeine-hyped .com-ready electronically
enabled speed-of-light online world of ours, I might not have time to take
your existing code and adapt it to the specific problem I'm interested in.

Scanner support is optional. >:^)

Donal.

-- With a complex beast like Swing, it's not just a matter of "What button
should I push", but rather "How do I put myself into a nice metamorphosis
so that I am deemed acceptable by the Swing Gods." -- Anonymous

David Rush

unread,
Mar 14, 2001, 11:28:11 AM3/14/01
to
Howard Brazee <how...@brazee.net> writes:
> The original poster must have used a Spammer tool. This thread is cross-posted
> elsewhere as well, and I have seen one other coded solution, in Forth.

I've seen far too many.

> It would be fun to see a bunch of language solutions, first to solve this problem,
> and then a more generic version to solve this class of problems.

Set up a website, then. Quit spamming the world.

david rush
--
Einstein said that genius abhors consensus because when consensus is
reached, thinking stops. Stop nodding your head.
-- the Silicon Valley Tarot

Brian {Hamilton Kelly}

unread,
Mar 14, 2001, 11:39:44 AM3/14/01
to
In article <3aae4114...@nntp.interaccess.com>

olc...@interaccess.com "Thaddeus L Olczyk" writes:

> I also figure the fish thing was simply a typo, and that this guy (
> who hasn't resdponded ) was probably given this as a homework
> assignement, and is simply looking for a cheap way to get it done.

It wasn't a typo; after all, one TROLLS for fish.

"No fair", starting a troll by cross-posting to EIGHT groups. One's
supposed to limit the initial posting to no more than eight groups.

At least "Graham" hasn't cheated on the classic criteria for a troll by
responding.

--
Brian {Hamilton Kelly} b...@dsl.co.uk
"We have gone from a world of concentrated knowledge and wisdom to one of
distributed ignorance. And we know and understand less while being incr-
easingly capable." Prof. Peter Cochrane, BT Labs

Brian {Hamilton Kelly}

unread,
Mar 14, 2001, 11:30:17 AM3/14/01
to
In article <7z9r6.2576$54....@www.newsranger.com>
gr...@pobox.com "Gregory Jorgense" writes:

> Clearly my statement that the puzzle can't be solved puts me in a minority. If
> you assume that SOMEONE keeps fish the puzzle can be solved with a little bit of> logic. Perhaps the intent of the riddle is to show how few people can devise a
> useful and logical methodology.

There is (or was) a British monthly (possibly bi-monthly) magazine
published under the title Logic Problems. This had about fifty of this
genre of puzzle in every issue. It is bought by a wide range of people,
not many of whom are likely to belong in the upper two-percentile of
intelligence, but all of whom (presumably, otherwise the magazine
wouldn't sell) have the right mindset to solve the problems.

Incidentally, I first saw a puzzle of this nature in McCall's Magazine in
the 1950s, when I was still at primary school. That particular one was
*entitled* "Who owns the zebra", which was the only mention of that
particular species in the whole exposition of the puzzle. It IS
"information" that is required for the puzzle to be soluble, however.

Isn't it about time this stupid thread came to a halt? It was needlessly
cross-posted (perhaps also multiply to other groups than appear in the
headers of this post?) and has excited "interest" beyond all rationality.

IOW, YHBT.

Steve Graham

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

Steve Graham

===

"Steve Graham" <js.g...@home.com> wrote in message
news:oNPq6.396644$ge4.13...@news2.rdc2.tx.home.com...


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

Greg Kobele

unread,
Mar 20, 2001, 4:02:47 PM3/20/01
to
You actually don't need to have this tidbit of info:

>
> The man who smokes Blends has a neighbor who drinks water.
>
The problem then becomes a little more fun to do if you don't.

Greg.

Michael Klein

unread,
Mar 22, 2001, 5:34:17 PM3/22/01
to
> [ eating emu ]

You guys are talking about eating the poor German's pet! Have you no heart.

Emile van Sebille

unread,
Mar 22, 2001, 8:51:11 PM3/22/01
to
I thought the german had the fish that didn't exist?

if-you-eat-it-and-it-never-was-can-you-still-ride-a-bicycle?-ly y'rs


Emile van Sebille
em...@fenx.com

-----


"Michael Klein" <mkl...@alumni.caltech.edu> wrote in message
news:3ABA7DE9...@alumni.caltech.edu...

0 new messages