A classic case of six dimension logic analysis, method based solution to Einstein's whose fish puzzle
Who keeps the fish?
Can you find out in 20 minutes? Well, that is the standard time limit for this puzzle. If you have time in your hands, go on till you solve it.
We have encountered this classic puzzle of unknown source long back. We have enjoyed it for a long time. We are sure you will also enjoy it.
Before you start, we would like to make just one point,
The way you will analyze and reach the solution is more important than the solution itself.
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 center house drinks milk.
9 The Norwegian lives in the first house.
10 The man who smokes Blends lives next to the one who keeps cats.
11 The man who keeps the horse lives next to the man who smokes Dunhill.
12 The owner who smokes Bluemasters drinks beer.
13 The German smokes Prince.
14 The Norwegian lives next to the blue house.
15 The man who smokes Blends has a neighbor who drinks water.
Solution - Problem analysis
The problem involves one to one assignment between six sets of entities.
Five nationals live in five houses each of a different color from a set of 5 colors, with each national smoking a different brand of cigarette from a set of 5 brands, drinking a different drink from a set of five drinks and keeping a different pet from a set of five pets, a total of six sets of entities.
One member taken from each set makes a unique combination of a six member subset. Five such six member combinations are to be formed to complete the set of one to one unique assignments between the six sets of entities. As the possible number of combinations is large (number of possible combinations = $5^5$), a sizeable number of 15 assignment conditions are given for the full assignment.
A possible combination might be,
The Swede living in White house on the rightmost position smokes Bluemasters, drinks beer and keeps dogs as pets.
Though the problem was to find whose pet is the fish, a specific single goal, it may turn out that while the assignments are carried out systematically through logic analysis, the whole of the logic table may get fully assigned automatically giving the solution.
At first glance the logic puzzle may seem daunting unless the problem solver is naturally gifted or used to logic analysis of various forms.
Solution - Problem modeling
Examining the logic conditions, it was decided to adopt the simplest form of logic assignment table, a 5 column by 5 row table with one extra column for row labels and one extra row for column labels.
This in fact is the fully collapsed column as well as fully collapsed row logic table. Each of the row or column cell will hold a certain final assignment (without any doubt involved regarding assignment), and no superfluous cell exists in the logic table for holding the interim states of doubtful and uncertain fragments of assignments.
Obviously, if we are going to use such an optimal logic table representation, we must proceed processing the steps not sequentially from first to the last, but following a well developed analytical strategy of execution of the steps itself.
The houses identified by their positions form natural column labels with position embedded in each. The other five entity names form the row labels. For example, the column labels will be: from left to right: House1, House2, House3, House4 and House5 with House1 being the leftmost and the first house and House3 being the center house.
With this problem modeling done, let us now solve the problem.
The row labels become then, Color, Occupant, Pet, Drinks and Smokes.
The blank table is shown below. The job in hand is to fill up the 25 cells by analyzing the 15 logic statements.
The overriding objective of selecting one or more than one logic condition will be to,
Maximize certain cell assignments for now as well as creating such possibilities for future.
If we can follow the proper analytical path with such objectives, we should reach the solution quickest as well as with certainty without any confusion.
Solution - Logic analysis assignment strategies and use of the strategies
While solving this type of problem it is essential to form a strategy of processing the logic statements. Going serially from the first to the second and so on generally will end up into hopeless confusion.
The most important strategy is to process those statements that make certain and definitive assignments to any of the cells. In the very beginning, such a statement must have mention of a house by its position in this problem.
As a specific national lives in a specific house and except color of the house, all the other three entities, Drinks, Smokes and Pets are actually attributes of the national, preference will always be given to a statement in which a specific national is involved.
With these decisions, the "Statement 9. The Norwegian lives in the first house." is chosen as the first statement to be processed. This statement puts national Norwegian firmly in House 1 and accordingly the corresponding cell in the table is filled up.
Any statement that refers to an already assigned national and additionally helps to make another certain assignment is chosen next.
Accordingly, "Statement 14.; The Norwegian lives next to the blue house." is processed second putting color Blue to the House 2. This is so because there is no house on the left of Norwegian's first house. This is an element of logic analysis.
Any statement out of the remaining ones that makes possible filling up with certainty any other cell is chosen next. Such a statement must refer to a relation to an already assigned value or a specific house or the owner of a specific house (by specific we mean house at specific position).
These criteria are met by Statement 8. The man living in the center house drinks milk.", and so we put milk in the Drinks cell below the House 3 column.
With application of the first three strategies, the table is now partially filled up. The remaining statements do not satisfy the criteria of the first three strategies. So we need to adopt a fourth, more powerful strategy.
We will look now for any statement that connects at least two cells in a partially filled row or column, so that limited number of possible values (we restrict this number to 2) can be assigned to minimum number of cells.
While processing such a statement we cannot be certain about a particular cell value, we can only be partially certain. To indicate this uncertainty we fill up the cells with the possible values separated by a stroke.
If we proceed this way, a later statement might be found to remove the uncertainty in multiple values in a particular cell resulting in a certain assignment.
An important property of such a logic table is, as we go on filling the empty cells, chances of getting hold of a certain fill increases.
We find "Statement 4. The green house is on the left of the white house.", satisfy these criteria as it informs on colors of houses with color row already having one value, as well as it links two house in the color row, increasing conflict with existing values that reduces number of possibilities and increases chance of certain assignment.
As Green on the left and White on the right make a tightly bound couple, a number of possibilities get eliminated. To be specific, Green color can only be for House 3 or House 4, while White color will be for House 4 or House 5 respectively. This is an important element of basic logic analysis in this problem domain and accordingly the possibilities are noted in the cells.
Check this assignment yourself.
The result of dealing with four chosen statements according to four strategies is shown below.
In any problem state, the statement that can resolve an already recorded multiple values in multiple cells will be of highest importance because at one stroke more than one assignments would be possible by elimination. So we search for a statement now that refers to color of a house and any other attribute that helps to resolve multiple values in color of house.
Such a statement we find in "Statement 5. The green house's owner drinks coffee.", which conflicts in Drinks value of House 3 for Green color and thus eliminates this possibility leaving Green color and Drinks Coffee for the House 4, and White color for the House 5 with certainty. At one go we have three certain assignments.
This kind of logic analysis thus plays an important role in quickly resolving the assignments.
The result of processing this 5th statement is shown below.
The earlier strategies we can apply during the initial stages when the logic table was nearly empty. But as the table gets filled by application of these strategies, we must look for conflicts resulting in certain assignments.
Such is the "Statement 1. The Brit lives in the red house".
Two house colors are still not known, for House 1 and for House 3. As the Norwegian lives in House 1, the red colored house in which the Brit lives must be the House 3. Certain assignment is achieved by conflict in nationality and color couple.
Seventh strategy - assignment by exclusion
This is a very favorable condition when out of a set of values for an attribute only one value is left to be assigned as well as only one cell is left to be assigned the attribute value. The last value automatically gets assigned to this remaining cell.
In our problem by the seventh strategy, Yellow color is automatically assigned to the House 1.
Now applying Strategy 3, "Statement 7. The owner of the yellow house smokes Dunhill." is chosen as it links already assigned color Yellow with Smokes attribute.
In the same way, "Statement 11. The man who keeps the horse lives next to the man who smokes Dunhill.", is processed next, assigning Horse as pet against House 2.
At this stage finding no certain assignment we apply Uncertainty creating Strategy 4 to process "Statement 3. The Dane drinks tea." assigning "Dane/tea" couple of values against House 2 and House 5. This again is logic analysis element.
The state of the logic table now is shown below.
Eighth strategy - processing of more than one statement together
As Drinks values are assigned more at this stage, we look for further statements with Drinks value so that certain assignment may finally result.
With "Statement 12. The owner who smokes Bluemasters drinks beer.", Dane-tea, and Bluemasters-beer couple can be placed in House 2 and House 5 or vice versa. Just as we process, "Statement 15. The man who smokes Blends has a neighbor who drinks water.", Blends conflicts with Bluemasters in House 2 position leaving only House 5 for Bluemasters-beer couple and House 2 for Dane-tea couple which also gets Blends as the House 1 gets Drinks as water.
This is a critical analytical step and you should check for yourself till fully satisfied by the logic analysis.
With Smokes row nearly full, "Statement 13. The German smokes Prince." is processed next for certain assignment.
The state of the logic table is shown below.
With the logic table nearly filled up except for Pets, by exclusion we select "Statement 6. The person who smokes Pall Mall rears birds.", then by direct assignment Statement 2. The Swede keeps dogs as pets.", and lastly, "Statement 10. The man who smokes Blends lives next to the one who keeps cats.", leaving Fish for the German.
The final state of logic table is shown below.
The solving of the puzzle gives pleasure not just in finding the solution, but primarily in enriching a logic analysis method framework (it has already been developed while solving problems such as SBI PO high level reasoning puzzles) for dealing with easy to complex logic analysis problems without any confusion and with confidence.
The power of such framework lies in the fact that "why's" being embedded in the strategic method, any person following the solution carefully can absorb the core concepts and should be able to apply it on her own for solving other such problems.
That's why we consider the framework a powerful tool in learning logic analysis.
Update: We came to know that this classic puzzle is popularly known as Einstein's puzzle.
You may refer to an improved methodological solution to this puzzle in the following link,
Puzzles you may enjoy
Logic analysis puzzles
Method based solution to Einstein's logic analysis puzzle, whose fish