Praveen's Blog

An Eternal Quest for Incremental Improvement

Solution for Puzzle of the week - Week #45

I have spent more time to prepare the solution for this problem compared to the time I took to solve it. This is one damn case where a lot of problems with formatting. Hence I am not able to post it as a comment. So, I am posting it as a seperate post. Please bear with the inconvenience.

9: The Norwegian lives in the first house

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |          |       |          |       |            |
| Man    |Norwegian |       |          |       |            |
| Pet    |          |       |          |       |            |
| Smoke  |          |       |          |       |            |
| Drink  |          |       |          |       |            |
+--------+----------+-------+----------+-------+------------+

14: The Norwegian lives next to the blue house

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |          |Blue   |          |       |            |
| Man    |Norwegian |       |          |       |            |
| Pet    |          |       |          |       |            |
| Smoke  |          |       |          |       |            |
| Drink  |          |       |          |       |            |
+--------+----------+-------+----------+-------+------------+

8: The man living in the house right in the centre drinks milk

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |          |Blue   |          |       |            |
| Man    |Norwegian |       |          |       |            |
| Pet    |          |       |          |       |            |
| Smoke  |          |       |          |       |            |
| Drink  |          |       |Milk      |       |            |
+--------+----------+-------+----------+-------+------------+

4: The green house is on the left of the white house (they are also next door to each other) 5: The green house owner drinks coffee

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |          |Blue   |          |Green  |White       |
| Man    |Norwegian |       |          |       |            |
| Pet    |          |       |          |       |            |
| Smoke  |          |       |          |       |            |
| Drink  |          |       |Milk      |Coffee |            |
+--------+----------+-------+----------+-------+------------+

1: The Briton lives in a red house.

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |          |Blue   |Red       |Green  |White       |
| Man    |Norwegian |       |Briton    |       |            |
| Pet    |          |       |          |       |            |
| Smoke  |          |       |          |       |            |
| Drink  |          |       |Milk      |Coffee |            |
+--------+----------+-------+----------+-------+------------+

7: The owner of the yellow house smokes Dunhill

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |       |Briton    |       |            |
| Pet    |          |       |          |       |            |
| Smoke  |Dunhill   |       |          |       |            |
| Drink  |          |       |Milk      |Coffee |            |
+--------+----------+-------+----------+-------+------------+

11: The man who keeps horses lives next to the man who smokes Dunhill

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |       |Briton    |       |            |
| Pet    |          |Horses |          |       |            |
| Smoke  |Dunhill   |       |          |       |            |
| Drink  |          |       |Milk      |Coffee |            |
+--------+----------+-------+----------+-------+------------+

3: The Dane drinks tea 12: The owner who smokes Blue Master drinks beer 15: The man who smokes Blend has a neighbor who drinks water

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |Dane   |Briton    |       |            |
| Pet    |          |Horses |          |       |            |
| Smoke  |Dunhill   |Blend  |          |       |Blue Master |
| Drink  |Water     |Tea    |Milk      |Coffee |Beer        |
+--------+----------+-------+----------+-------+------------+

(OK - here is where we get all the drinks sorted out. The Dane could be 2 or 5. The person who smokes Blue Master could also be 2 or 5. However the Dane can't be 5, otherwise House 2 would be the Blue Master smoker and beer drinker, which would only leave House 1 for the water drinking neighbour; this doesn't work, since this would now make House 2 the Blend smoker. So the Dane is in House 2, etc)

13: The German smokes Prince

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |Dane   |Briton    |German |            |
| Pet    |          |Horses |          |       |            |
| Smoke  |Dunhill   |Blend  |          |Prince |Blue Master |
| Drink  |Water     |Tea    |Milk      |Coffee |Beer        |
+--------+----------+-------+----------+-------+------------+

2: The Swede keeps dogs as pets

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |Dane   |Briton    |German |Swede       |
| Pet    |          |Horses |          |       |Dogs        |
| Smoke  |Dunhill   |Blend  |          |Prince |Blue Master |
| Drink  |Water     |Tea    |Milk      |Coffee |Beer        |
+--------+----------+-------+----------+-------+------------+

6: The person who smokes Pall Mall rears birds

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |Dane   |Briton    |German |Swede       |
| Pet    |          |Horses |Birds     |       |Dogs        |
| Smoke  |Dunhill   |Blend  |Pall Mall |Prince |Blue Master |
| Drink  |Water     |Tea    |Milk      |Coffee |Beer        |
+--------+----------+-------+----------+-------+------------+

10: The man who smokes Blend lives next to the one who keeps cats

+--------+----------+-------+----------+-------+------------+
|        |    1     |   2   |    3     |   4   |     5      |
+--------+----------+-------+----------+-------+------------+
| Color  |Yellow    |Blue   |Red       |Green  |White       |
| Man    |Norwegian |Dane   |Briton    |German |Swede       |
| Pet    |Cats      |Horses |Birds     |       |Dogs        |
| Smoke  |Dunhill   |Blend  |Pall Mall |Prince |Blue Master |
| Drink  |Water     |Tea    |Milk      |Coffee |Beer        |
+--------+----------+-------+----------+-------+------------+

Which only leaves one gap.Who keeps Fish? The German.


Comments