Solved

5 houses with 5 different nationalities living in it. Each is different by their smoking, drink and pets. Find who keeps fish.

Posted on 2008-10-16
37
1,444 Views
Last Modified: 2012-05-05
This riddle is a bit different from the said Einstein's riddle. As far as I'm concerned there are still 5 different houses and 5 different nationalities but there is no clue about the 5th element. Please read the question and solve if it is possible. It is supposed to be possible.

There are five houses with different color in a street. In each, there is a man with different nationality; they are also different in their drinks, smokings and pets.

1-Sweden has dog.
2-The green house is in the left side of the white house.
3-Japanese drinks tea.
4-Parrot is in the red house.
5-The man in green house drinks coffee.
6-The man who smokes Pall Mall loves birds.
7-The man in yellow house smokes Dunhill.
8-The man in the middle house drinks milk.
9-The Indian lives in the first house.
10-The man who smokes Blends lives beside the man who keeps cat.
11-The man who keeps horse lives beside the man who smokes Dunhill.
12-The man who smokes Blue Master, drinks beer.
13-The German smokes Prince.
14-The Indian lives beside the blue house.
15-The neighbour of Blend smoker, drinks water.
0
Comment
Question by:shadow_shooter
  • 16
  • 12
  • 5
  • +2
37 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 22735913
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22735942
No, it's not. There are five nationalities in the clues as it's said. The problem in this riddle is that clue section misses all fifth elements. (nationality, drink and cigarettes)
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22735953
Sweden-German-Japanese-Ind1an-? (5th is missing)
Dog-Parrot-Cat-Horse-? (5th is missing)
.
.
(same goes with other two: drinks, cigarettes)
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22735960
By the way, you have to find which man keeps fish as his pet.
0
 
LVL 32

Expert Comment

by:aleghart
ID: 22736353
OK.  You were missing the fifth pet "fish".  You're missing the fifth nationality also.
0
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 225 total points
ID: 22736410
Only one nationality is missing. The fifth pet are obviously fish ;)

There does seem to be one rule missing for a unique solution though.


These are the 3 possible solutions I found :

House   Color   Nationality   Drink      Smoke         Pet

   1         Red       Indian      Water    Pall Mall       Parrot
   2        Blue     Japanese     Tea        Blends       Horse
   3       Yellow        ??            Milk       Dunhill         Cat
   4       Green     German    Coffee      Prince         Fish         <----
   5       White     Swedish     Beer   Blue Master    Dog


   1         Red       Indian      Water    Pall Mall       Parrot
   2        Blue     Japanese     Tea        Blends        Fish          <----
   3       Yellow        ??            Milk       Dunhill         Cat
   4       Green     German    Coffee      Prince        Horse
   5       White     Swedish     Beer   Blue Master    Dog


   1       Yellow     Indian      Water      Dunhill         Cat
   2        Blue     Japanese     Tea        Blends       Horse
   3         Red          ??            Milk      Pall Mall      Parrot
   4       Green     German    Coffee      Prince         Fish         <----
   5       White     Swedish     Beer   Blue Master    Dog


So, it's either the German or the Japanese guy - My guess is the German.
0
 
LVL 84

Expert Comment

by:ozo
ID: 22736589
> No, it's not.
No what is not?

I gave you a program to solve any puzzle of this type.
In this case, rewriting the program is particularly easy, since all you need to do is rename some of the elements
Running the program then gives
Solution:
        HOUSE_0 NORWEG -> Indian
        HOUSE_0 YELLOW
        HOUSE_0 WATER
        HOUSE_0 FOX  -> Cat
        HOUSE_0 Kools -> Dunhill

        HOUSE_1 UKRAIN ->Japanese
        HOUSE_1 BLUE
        HOUSE_1 TEA
        HOUSE_1 HORSE
        HOUSE_1 CHESTER -> Blends

        HOUSE_2 ENGLISH
        HOUSE_2 RED
        HOUSE_2 MILK
        HOUSE_2 SNAIL -> Parrot
        HOUSE_2 OGOLD  ->Pall Mall

        HOUSE_3 SPANISH -> Sweden
        HOUSE_3 IVORY  -> WHite
        HOUSE_3 OJUICE -> Beer
        HOUSE_3 DOG
        HOUSE_3 LSTRIKE -> Blue Master

        HOUSE_4 JAPAN -> German
        HOUSE_4 GREEN
        HOUSE_4 COFFEE
        HOUSE_4 ZEBRA -> Fish
        HOUSE_4 PARLIA -> Prince



0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22736697
Could you tell me how you found the following possibilities:

1-Japanese lives in the blue house.
2- Indian drinks water and his pet is a parrot.
3- German lives in the green house.
4-The white house is rightmost in row. (This question depends on the answer to the below.)

I also wonder what you understood from the sentence "Thegreen house is in the left side of white house". It's very bad englishand i'm not good at decyphering it. Does it say the house is on theleft and next to the white house or can it be any house as long as it'son the left.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22736843
ozo, I had read the example problem at the beginning in the given link, this is why I said "It's not" to imply it wasn't not the same question. I see it's a practical solution to the question and I appreciate your effort but I need a solution with explanations. I don't need time to rewrite the code which is described in pseudocode which also does not explain the solution step by step.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22736857
Infinity,

Can you also tell me how you found out the colours of first and third house?
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22738153
>> I also wonder what you understood from the sentence "Thegreen house is in the left side of white house".

To me, that means that the green house is on the left side of the white house, so ozo's solution is not correct. It comes very close to my third solution though.


>> Can you also tell me how you found out the colours of first and third house?

The first and third houses are yellow and red. You arrive at that by iterative elimination. Set up a grid like this (with all possibilities) :

       1           2            3           4            5                     house number

  GWRYB  GWRYB   GWRYB  GWRYB   GWRYB               color (green, white, red, yellow, blue)
   SJIGX     SJIGX     SJIGX     SJIGX     SJIGX                 nationality (swedish, japanese, indian, german, other)
  TCMBW  TCMBW  TCMBW  TCMBW  TCMBW               drink (tea, coffee, milk, beer, water)
  PDBMR   PDBMR   PDBMR   PDBMR   PDBMR                smoke (pall mall, dunhill, blends, blue master, prince)
  DPCHF   DPCHF    DPCHF   DPCHF   DPCHF                pet (dog, parrot, cat, horse, fish)

and then you go over the rules one by one, crossing out the combinations that are impossible, and you repeat that process until a solution is found or all rules have been exhausted.

For example, the second rule says : "2-The green house is in the left side of the white house.", which means that the green house can't be on the extreme right, and the white house can't be on the extreme left, so :

       1           2            3           4            5                     house number

  G  RYB    GWRYB   GWRYB  GWRYB   WRYB                 color (green, white, red, yellow, blue)
   SJIGX     SJIGX     SJIGX     SJIGX     SJIGX                 nationality (swedish, japanese, indian, german, other)
  TCMBW  TCMBW  TCMBW  TCMBW  TCMBW               drink (tea, coffee, milk, beer, water)
  PDBMR   PDBMR   PDBMR   PDBMR   PDBMR                smoke (pall mall, dunhill, blends, blue master, prince)
  DPCHF   DPCHF    DPCHF   DPCHF   DPCHF                pet (dog, parrot, cat, horse, fish)

and rule 8 says : "8-The man in the middle house drinks milk.", so :

       1           2            3           4            5                     house number

  G  RYB    GWRYB   GWRYB  GWRYB   WRYB                 color (green, white, red, yellow, blue)
   SJIGX     SJIGX     SJIGX     SJIGX     SJIGX                 nationality (swedish, japanese, indian, german, other)
  TC  BW  TC  BW       M       TC  BW  TC  BW                drink (tea, coffee, milk, beer, water)
  PDBMR   PDBMR   PDBMR   PDBMR   PDBMR                smoke (pall mall, dunhill, blends, blue master, prince)
  DPCHF   DPCHF    DPCHF   DPCHF   DPCHF                pet (dog, parrot, cat, horse, fish)

etc.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22738259
You might be interested in a game that is all about solving these kind of problems. I play it from time to time. It used to be called Sherlock, but there's a new implementation called Einstein that can be downloaded here :

        http://games.flowix.com/en/index.html

Interesting pass-time ;)
0
 
LVL 84

Expert Comment

by:ozo
ID: 22738367
> To me, that means that the green house is on the left side of the white house, so ozo's solution is not correct.
Why not?
I was counting the "first house" as the rightmost house,
You seem to be counting it as the leftmost house, but I don't see it specified in the question
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22738878
>> I was counting the "first house" as the rightmost house,

If it's not specified, isn't it customary to choose the most likely option ? With the usual order being left-to-right ...

But then again, the question might have meant it from the point of view of the house itself, rather than from someone standing in front of the row of houses, facing them.

There still isn't a unique solution though. Using your interpretation, I get :

House   Color   Nationality   Drink      Smoke         Pet

   1         Red       Indian      Water    Pall Mall       Parrot
   2        Blue     Japanese     Tea        Blends       Horse
   3       Yellow        ??            Milk       Dunhill         Cat
   4       White     Swedish     Beer   Blue Master    Dog
   5       Green     German    Coffee      Prince         Fish         <----

which is different from yours, although both agree on who has the fish heh :)

Chances it's the German keep increasing ;)
0
 
LVL 84

Expert Comment

by:ozo
ID: 22738908
On my street half the houses run one way, while the other half on the other side of the street go the other way,
I don't know which side of the street is usual.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22738933
I meant left-to-right as the usual order for pretty much everything, and counting up from 1 to 5 being quite standard too. So, counting up from 1 to 5 from left to right sounds like the usual way to do things.

Anyway, I think it's more likely that the question intended the rule to be interpreted from the viewpoint of the house rather than a person standing in front of it (if we assume your interpretation is correct).

Your interpretation does have an advantage though : it is clear that it's the German, while my interpretation allows for the Japanese to own the fish.

So, I'll take that to mean that my interpretation is incorrect.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22740812
Infinity08,

Thanks for your time and efforts. This is actually a homework, I am not interested in this kind of riddles. What I've found since far as the follows

MAIN IDEA----------------------------------------------
1-Indian lives in the first house and his house is beside the blue house. So, the blue house is the second.
2-The green house should be on the left side of the white house. So, it can't be either the first house or the second house. It says, the milk is drinked in the middle house. There is only one possibility that the fourth house is green and fifth is the white.
OTHER USEFUL FINDINGS---------------------------------------------
3-In the red house, the pet is parrot and Pall Mall is smoked.
4-Dunhill is smoked in the yellow house and the man whose pet is horse is the negihbour of it.

I still don't have any clue whether the first house should be yellow or red. What different clues do you have to clear up the colours of these houses?
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22740862
By the way, we already know that the coffee is drinked in the green house. This is why I said the fourth house is green.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 53

Expert Comment

by:Infinity08
ID: 22741137
>> This is actually a homework

Then you should have said so in your question. Try to solve this yourself by using the technique I explained earlier.


>> 2-The green house should be on the left side of the white house. So, it can't be either the first house or the second house.

That conclusion is incorrect. The green house can't be the first (using ozo's interpretation), but it can be the second.


>> There is only one possibility that the fourth house is green and fifth is the white.

There are more than one possibility at this point - there are 4 possibilities to place the green and white houses. You need to combine several other rules to find out which of the 4 it is.


>> I still don't have any clue whether the first house should be yellow or red. What different clues do you have to clear up the colours of these houses?

None ;) That's exactly why there is more than one possible solution.
0
 
LVL 31

Expert Comment

by:awking00
ID: 22741868
I think perhaps the riddle may have been designed to have one solution no matter how the interpretation of "the green house is on the left side of the white house" is made. Ozo's solution and infinity08's third solution (also my first interpretation) are, in essence, the same. So, it's the German who owns the fish whether or not you're looking at the houses from the street or at the street.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22742030
>> and infinity08's third solution

except that with my interpretation, all three solutions I posted are possible. And one of them has the Japanese guy owning the fish. So, how do you know that that's not the "right" one ?
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22742126
infinity08,

i'm not trying to make anyone solve my homework instead of me.  I know why homeworks are given and I'm at the age of knowing all the consequences. This homework is given by a foreign lecturer and I highly suspect that this homework lacks of important infomation for a unique solution.(Because he tried to change the original riddle with using his poor English, so I suggest he forgot to include one more explaining clue)

Anyway, I'm trying to LEARN how you solved the question and not writing it down as a solution of mine. All the questions I'm asking here is to learn it.

So, I'd appreciate if you can clear out the following statements:
1-If the Indian lives in the first house (9th clue) and his house is beside the blue house (14th), how can it be possible that the second house could be green? If the house beside the Indian is Blue, then it can only be blue and if Indian is the first in row, then the house beside it is the second. So the second house is blue, isn't it? The green house can't be the  second house.

2-The green house is known to drink coffee (5th rule), and the middle house is known to drink milk (8th clue), so green house can't be the third one either.

3-The green house should be on the left and next to the white house. There are three possible ways for green and white houses. (1st, 4th and 5th).  Only possible way seems like the 4th is green and 5th is white since they should be in the sequential order.

Do you see any wrong idea here? Please let me know.
Thanks.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22742636
Here is what I've done according to your method. But I'm not sure how to process on this table with the clues such as "Sweden man has dog". Can you show an example of a clue which is not directly related to house numbers. They are attributes and I dont know what to cross out when it is said: "The man in green house drinks coffee."

Riddle.doc
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22743024
>> Anyway, I'm trying to LEARN how you solved the question and not writing it down as a solution of mine. All the questions I'm asking here is to learn it.

Great ;)

Btw, the game I mentioned earlier is a fun way to learn how to solve these :)


>> 1-If the Indian lives in the first house (9th clue) and his house is beside the blue house (14th), how can it be possible that the second house could be green?

I'm sorry. It wasn't clear to me that you were combining multiple statements to get to that conclusion.


>> Only possible way seems like the 4th is green and 5th is white since they should be in the sequential order.

Depends which interpretation of rule 2 you follow. Mine or ozo's ...


>> But I'm not sure how to process on this table with the clues such as "Sweden man has dog".

Either you process it in your head, by combining multiple rules. Or you create a second table with the nationalities for example. You apply all rules to this second table, and then compare it to the first table, and join both together. You can repeat this process with more tables of course (each time with a different chosen feature) :)
0
 
LVL 84

Expert Comment

by:ozo
ID: 22743436
> how you solved the question
http://brainyplanet.com/index.php/Dell%20Solution?PHPSESSID=1fee227fb8c09d1d586ecbad6f720b5d
describes an explicit procedure
0
 
LVL 31

Expert Comment

by:awking00
ID: 22743699
Besides the missing nationality, there are still questions you should pose to your teacher. If the street runs east-west, are the houses on the north side of the street or the south side? Is left defined looking at the front door (i.e. from the street) or out of the front door (i.e. at the street)? That's why boaters use port and starboard to remove the ambiguity of left and right.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22744783
Okay. It seems like I can't go further with this riddler. I better consider to drop the course. Thanks everyone. I'll keep the question open for a couple of more days in case someone could solve it in a different which can help me at the point where i'm stucked.

If not, points will be awarded after all.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22745753
>> which can help me at the point where i'm stucked.

Can you arrive at the same solutions that were already posted ? Because you can get at those by applying the rules - no guessing involved.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22748618
infinity08,

I made six tables for each category. (Pet, Drink, Smoking, Nationality and House Numbers)

Each table has rows of other attributes. For instance, Drink table has rows of color, nationality, smoking, house numbers and pets.

I've progressed much more than before. The only problem is that I couldn't use the 10th clue. I don't have any information about the cat or Blends. They can be found in any of five houses.
Can you tell me any information about the 10th clue? Did you find any house which can't have the cat or Blends? It seems like you found that Blends belongs to the second house. How come is that?

Here is what I have now:
      1           2            3           4            5                     house number

      RY         B          RY         G           W               color (green, white, red, yellow, blue)
        I      SJGX      SGX     SJGX     SJGX                 nationality (swedish, japanese, indian, german, other)
    TBW     TBW         M          C         TBW               drink (tea, coffee, milk, beer, water)
  PDBMR   BMR   DBMR   PBMR   PBMR                smoke (pall mall, dunhill, blends, blue master, prince)
   PCF      DCHF    DPCHF   DCHF   DCHF                pet (dog, parrot, cat, horse, fish)
Please help =( Thanks for everything.
0
 
LVL 31

Accepted Solution

by:
awking00 earned 275 total points
ID: 22748923
Perhaps something like the attached is what you're looking for.
riddle.xls
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22749323
>> I don't have any information about the cat or Blends. They can be found in any of five houses.

rule 15 helps in eliminating some of the Blends smokers. All rules related to other smokes will also eliminate certain possibilities.
The cat also has only a few locations it can be due to the other pet rules.

I don't recall when exactly I was able to place the Blends, but it was towards the end (when tying up all loose ends).


>> I made six tables for each category.

If you have all 6, then you should be able to combine them, and get more detailed tables, from which you can then continue applying the rules.
I know it takes time, but it is a sure way to solve this kind of puzzle ;) The easy ones can be solved with just one table and minor brain action. The more complicated puzzles require either more tables, or significant brain action lol

Maybe you can show the tables you currently have, and I can give a hint to continue ?
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22749779
Well, for the clue 15th, I didnt have any eliminations. It says "The neighbor of Blend Smoker drinks water." So we have something like that:

        1            2            3            4            5
a)    B            W
b)    W         B
c)                   B         W
d)                    W       B
e)                                 B           W
f)                                  W            B
g)                                                 B           W
h)                                                 W          B

We know that the middle house drinks milk. So the rows which has W on the third column should be eliminated. It means the row C and the row F are eliminated.  But, it doesn't help you for anything. It is still possible that any house can have Blend or Water:

        1            2            3            4            5
a)    B            W
b)    W         B

d)                    W       B
e)                                 B           W

g)                                                 B           W
h)                                                 W          B


So, I can't use 15th for anything useful and it doesn't help me with the clue 10th either. Is that right?

I'll upload all the tables I have soon.  I've drawn them on paper.  I should copy them to a Word  document.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22749795
>> So, I can't use 15th for anything useful and it doesn't help me with the clue 10th either. Is that right?

It does, but you're looking at it with a too narrow focus. You have to apply ALL rules to EVERY table, and repeat applying all rules to all tables until the solution is found or no rules are left.


>> I should copy them to a Word  document.

I don't have Word ;) Maybe an image ?
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22749987
awking00,

Thank you very much! It's obviously that I didnt think if only red and yellow are left for the first and third house then there are only two possible cigarettes that they may smoke. (Pall Mall and Dun Hill), and because the fourth house drinks coffee,  The fifth house can't be the Blend smoker either. So the blend smoker should be either the 2nd house or the 4th house. Because the Pall Mall smoker should drink beer, only the second house can be the Blend smoker but in this case tea would be left for the fisrt house. But we assume that it is Indian's and tea is drunk by the Japan it is not possible and so the blend smoker is in the second house.

It really makes sense.

So there are three possibilities here and it is like one more clue is missing which would yield to an unique solution, is that right? I think, it's better to state this situation in the homework.

Thanks infinity for the tip so that I could make tables and thanks awking00 for the clarification so that I could go on after the table I showed here.

0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22750006
>> So there are three possibilities here and it is like one more clue is missing which would yield to an unique solution, is that right?

Using my interpretation of rule 2, there are 3 possible outcomes, and they don't agree on who owns the fish.
Using ozo's interpretation of rule 2, there is also more than 1 solution, but they all agree on who owns the fish.

If the puzzle is complete, and the solution is unique, then you should use ozo's interpretation, and find out who owns the fish ;)
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22750026
>>It does, but you're looking at it with a too narrow focus. You have toapply ALL rules to EVERY table, and repeat applying all rules to alltables until the solution is found or no rules are left.
It becomes handy only after It is seen that the fifth house can't smoke Blend. Anyway, thanks for replying to questions. Thanks to the awking's clarification I have now the same three solutions you first wrote here.

I wish I could give more points to both of you.
0
 
LVL 2

Author Comment

by:shadow_shooter
ID: 22750409
I'm just going to assume that it's extremely left. I can't understand further with only the 2nd clue.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

A procedure for exporting installed hotfix details of remote computers using powershell
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now