chinman.com
21 August 2018, 19:47:49 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Login Register  
Pages: 1   Go Down
  Print  
Author Topic: Einstein riddle  (Read 4212 times)
hangchoi
SBC Old Boys
***
Offline Offline

Posts: 2,880


Alcoholic + Golfmania


WWW
« on: 11 September 2015, 23:25:23 »

Just read a website and found this one. So I share here and see if you can solve it.

According to folklore, the following riddle was invented by Albert Einstein when he was just a boy. To add to its mystique, various reports suggest that only two per cent of the world's population can solve it.

Einstein riddle


There is a street with five houses all in a row. Each house has a person with a different name and each house is painted a different colour. Each homeowner drinks a different type of beverage, owns a different type of pet and reads a different type of newspaper.

Here are the clues to help you solve the puzzle :


1. Jez lives in the red house.
2. Liz keeps corgis as pets.
3. Vlad drinks vodka.
4. The green house is on the immediate left of the white house.
5. The green house's owner drinks coffee.
6. The owner who reads the Morning Star keeps a golden eagle.
7. The owner of the purple house reads the Daily Express.
8. The owner living in the centre house drinks milk.
9. Nigel lives in the first house.
10. The owner who reads the Guardian lives next to the one who keeps a tiger.
11. The owner who keeps the stallion lives next to the one who reads the Daily Express.
12. The owner who reads the Times drinks beer.
13. Donald reads the Daily Mail.
14. Nigel lives next to the blue house.
15. The owner who reads the Guardian lives next to the one who drinks green tea.

Now, the question is : Who owns the goldfish?

______________________________________________

I solved it in 10 minutes so I really doubt those reports.

Will let you know the answer, if you can't figure it out, which I don't think you can't.

Enjoy!!!
Logged

「吾心信其可行,則移山倒海之難,終有成功之日。吾心信其不可行,則反掌折枝之易,亦無收效之期也。」
chin
Global Moderator
*****
Offline Offline

Posts: 6,651



« Reply #1 on: 14 September 2015, 17:22:40 »

corgi, eagle, tiger, stallion.

whose says there is a goldfish. do we assume the goldfish is the 5th one?

if yes, can you simple draw a chart?
Logged
hangchoi
SBC Old Boys
***
Offline Offline

Posts: 2,880


Alcoholic + Golfmania


WWW
« Reply #2 on: 15 September 2015, 14:32:19 »

Yes, there are totally 5 pets kept by those home-owners. Goldfish is the fifth one.

well. drawing a chart is one way to solve the riddle. You may give it a go.
Logged

「吾心信其可行,則移山倒海之難,終有成功之日。吾心信其不可行,則反掌折枝之易,亦無收效之期也。」
q
Quan
***
Offline Offline

Posts: 285



« Reply #3 on: 20 September 2015, 22:15:36 »

I think I have the answer... took me 9:59.9999 minutes   Grin
Logged
kido
SBC Old Boys
***
Offline Offline

Posts: 310



« Reply #4 on: 20 September 2015, 23:34:48 »

Interestingly, I have a solution, in 18ms, LOL. Shocked

I solved it, with the help of a computer, which the solution comes out instantaneously, in 18ms.

Code:
| ?- solution(Houses).

Houses = [(nigel,purple,tiger,green_tea,daily_express),(vlad,blue,stallion,vodka,guardian),(jez,red,eagle,milk,morning_star),(donald,green,fish,coffee,daily_mail),(liz,white,corgis,beer,times)] ? a

(18 ms) no

The above is a list containing the solution, first tuple is the first house's characteristics, etc.  It's a Prolog program.


***  Hidden Message Below  ***
« Last Edit: 21 September 2015, 10:58:28 by kido » Logged

Hey, diddle, diddle ! The cat and the fiddle.
hangchoi
SBC Old Boys
***
Offline Offline

Posts: 2,880


Alcoholic + Golfmania


WWW
« Reply #5 on: 21 September 2015, 15:09:37 »

I think I have the answer... took me 9:59.9999 minutes   Grin

Q, you should be far smarter than me. How come you solved it just 0.0001 sec faster? I expect you can solve it without drawing a chart in 1 minute.  Angry
Logged

「吾心信其可行,則移山倒海之難,終有成功之日。吾心信其不可行,則反掌折枝之易,亦無收效之期也。」
hangchoi
SBC Old Boys
***
Offline Offline

Posts: 2,880


Alcoholic + Golfmania


WWW
« Reply #6 on: 21 September 2015, 15:23:50 »

Interestingly, I have a solution, in 18ms, LOL. Shocked

I solved it, with the help of a computer, which the solution comes out instantaneously, in 18ms.

Code:
| ?- solution(Houses).

Houses = [(nigel,purple,tiger,green_tea,daily_express),(vlad,blue,stallion,vodka,guardian),(jez,red,eagle,milk,morning_star),(donald,green,fish,coffee,daily_mail),(liz,white,corgis,beer,times)] ? a

(18 ms) no

The above is a list containing the solution, first tuple is the first house's characteristics, etc.  It's a Prolog program.


 


You should start counting when you write the program.......  Cool
Logged

「吾心信其可行,則移山倒海之難,終有成功之日。吾心信其不可行,則反掌折枝之易,亦無收效之期也。」
kido
SBC Old Boys
***
Offline Offline

Posts: 310



« Reply #7 on: 21 September 2015, 15:28:00 »


You should start counting when you write the program.......  Cool

ok, ok, I confess.  I used 3+ hrs to write it up.
Logged

Hey, diddle, diddle ! The cat and the fiddle.
wongyan
SBC Old Boys
***
Offline Offline

Posts: 552



« Reply #8 on: 23 September 2015, 10:54:18 »

you guys are really really smart.  I was totally lost!!!
Logged

Never stop Learning, Never stop Earning!!
哲人無憂,智者常樂。並不是因為所愛的一切他都擁有了,而是所擁有的一切他都愛。
Pages: 1   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.257 seconds with 19 queries.