Page 1 of 1 [ 6 posts ] 

techstepgenr8tion
Veteran
Veteran

User avatar

Joined: 6 Feb 2005
Age: 45
Gender: Male
Posts: 24,519
Location: 28th Path of Tzaddi

16 Aug 2007, 9:54 pm

Who owns the fish?
A Common Lisp solution to "Einstein's Riddle"

This is a Common Lisp solution to a notorious logical puzzle known as "Einstein's riddle." (I doubt that Einstein really had something do with it, but that's another story.) The problem is stated below:

There are five houses in five different colours starting from left to right. In each house lives a person of a different nationality. These owners all drink a certain type of beverage, smoke a certain brand of cigarette and keep a certain type of pet. No two owners have the same pet, smoke the same brand or drink the same beverage. The question is: WHO OWNS THE FISH??? Hints:

1. The Brit lives in the red house
2. The Swede keeps dogs as pets
3. The Dane drinks tea
4. The green house is on the left of the white house
5. The green house's owner drinks coffee
6. The person who smokes Pall Mall rears birds
7. The owner of the yellow house smokes Dunhill
8. The man living in the centre house drinks milk
9. The Norwegian lives in the first house
10. The person who smokes Marlboro lives next to the one who keeps cats
11. The person who keeps horses lives next to the person who smokes Dunhill
12. The person who smokes Winfield drinks beer
13. The German smokes Rothmans
14. The Norwegian lives next to the blue house
15. The person who smokes Marlboro has a neigbor who drinks water

(spoilers get smacked in the forehead with a wet ruler!)



calandale
Veteran
Veteran

User avatar

Joined: 9 Mar 2007
Gender: Male
Posts: 12,439

17 Aug 2007, 5:22 am

I have a bass fish.



jrknothead
Veteran
Veteran

User avatar

Joined: 3 Aug 2007
Gender: Male
Posts: 1,423

17 Aug 2007, 6:42 am

After working on it half an hour and running into a paradox I googled the answer... I had the order of the houses right, but not much else... i messed up somewhere...



techstepgenr8tion
Veteran
Veteran

User avatar

Joined: 6 Feb 2005
Age: 45
Gender: Male
Posts: 24,519
Location: 28th Path of Tzaddi

17 Aug 2007, 3:02 pm

jrknothead wrote:
After working on it half an hour and running into a paradox I googled the answer... I had the order of the houses right, but not much else... i messed up somewhere...


Yeah, its definitely doable. I found this somewhere around 2002, took about 45 minutes but its there. I also made about 30 copies and took it into work, a couple line cooks actually got it sorted out in about half an hour (not all that surprising though, very r-type puzzle if you think about it).



yvaN_ehT_nioJ
Veteran
Veteran

User avatar

Joined: 21 Jan 2007
Gender: Male
Posts: 2,753
Location: South US

17 Aug 2007, 4:32 pm

A person of some nationality that lives in some house, that smokes some sort of cigarette, and drinks a certain type of liquid owns the fish.


_________________
¯\_(ツ)_/¯


techstepgenr8tion
Veteran
Veteran

User avatar

Joined: 6 Feb 2005
Age: 45
Gender: Male
Posts: 24,519
Location: 28th Path of Tzaddi

17 Aug 2007, 4:50 pm

Heh, and here I thought aspies liked to think :roll: