## A classic case of six dimension logic analysis, method based solution to Einstein's whose fish puzzle

### Question

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.

### Conditions

**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

*each of a*

**five houses***with each national*

**different color from a set of 5 colors,***, drinking*

**smoking a different brand of cigarette from a set of 5 brands***and*

**a different drink from a set of five drinks***, a total of six sets of entities.*

**keeping a different pet from a set of five pets**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

Swedeliving inWhite houseon therightmost positionsmokesBluemasters,drinksbeerand keepsdogsas 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

*, we*

**optimal logic table representation***processing the steps*

**must proceed***, but following a well developed*

**not sequentially from first to the last**

*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 assignmentsfornowas well as creating such possibilitiesfor 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.

#### First strategy

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

*to be processed. This statement puts national Norwegian firmly in House 1 and accordingly the corresponding cell in the table is filled up.*

**chosen as the first statement**#### Second strategy

**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

*This is so because there is no house on the left of Norwegian's first house.*

**color Blue to the House 2.**

**This is an element of logic analysis.**#### Third strategy

Any statement out of the remaining ones that makes possible filling up * with certainty any other cell* is chosen next.

*(by specific we mean house at specific position).*

**Such a statement must refer to a relation to an already assigned value or a specific house or the owner of a specific house**These criteria are met by * Statement 8. The man living in the center house drinks milk."*, and so we put

*in the*

**milk***below*

**Drinks cell***.*

**the House 3 column**#### Fourth strategy

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.

*and accordingly the possibilities are noted in the cells.*

**This is an important element of basic logic analysis in this problem domain**Check this assignment yourself.

The result of dealing with four chosen statements according to four strategies is shown below.

#### Fifth strategy

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

*and any other attribute that*

**search for a statement now that refers to color of a house**

**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.

#### Sixth strategy

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

*assigning "Dane/tea" couple of values against House 2 and House 5. This again is logic analysis element.*

**"Statement 3. The Dane drinks tea."**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,

*, 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.*

**"Statement 15. The man who smokes Blends has a neighbor who drinks 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

*, and lastly,*

**Statement 2. The Swede keeps dogs as pets."***, leaving*

**"Statement 10. The man who smokes Blends lives next to the one who keeps cats."**

**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

*) for dealing with easy to complex logic analysis problems without any confusion and with confidence.*

**SBI PO high level reasoning puzzles**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 inlearning 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,

**How to solve Einstein's puzzle Whose fish confidently, an improved method based solution.**

### Puzzles you may enjoy

#### Mathematical puzzles

**Reverse cheque puzzle solution**

**Counting eggs puzzles based on Euclid's division lemma**

**Monkey and the coconuts puzzle with solutions**

**10 digit Conway number puzzle with solution**

**World's Hardest Easy Geometry Puzzle Solved with Techniques Explained Step by Step**

**Hard Algebra Puzzles Solved by Basic Exponent Concepts and Reasoning**

#### Logic analysis puzzles

**Method based solution to Einstein's logic analysis puzzle, whose fish**

**How to solve Einstein's puzzle whose fish confidently, improved method based solution**

**Logic puzzle, When is Cheryl's birthday**

#### River crossing puzzles

**Farmer with fox, goose and bag of corn crossing the river puzzle**

**Two pigs and two hens crossing river puzzle**

*3 monkeys and 3 humans crossing river puzzle*

**King queen minister washerman river crossing puzzle**

#### Ball weighing puzzles

**Find the heavier among 8 identical balls in 2 weighing puzzle**

**Find the fake ball among 8 identical balls in 3 weighing puzzle**

#### Matchstick puzzles

**Solution to 6 triangles to 5 triangles in 2 moves, first matchstick puzzle**

**Matchstick puzzle 5 squares to 4 squares in 2 moves**

**Matchstick puzzle 5 squares to 4 squares in 3 moves**

**Matchstick puzzle, Turn around the fish in 3 moves**

**Fifth Matchstick puzzle, Move 3 sticks in tic-tac-toe figure to form 3 perfect squares**

**Hexagonal wheel to 3 triangles by removing 4 sticks**

**Convert 5 squares to 4 squares in 3 stick moves, third 5 square matchstick puzzle**

**Matchstick Puzzle - Make the kite nose-dive in 5 stick moves**

**Make 5 squares from 6 in 2 stick moves - 6 square matchstick puzzle**

**Move 3 sticks and convert 5 squares to 4 squares in 4th 5 square matchstick puzzle**

**Move 3 sticks and convert 4 squares to 3 squares matchstick puzzle**

**Move 8 sticks and convert 5 squares to 2 squares matchstick puzzle**

**First Move 3 sticks and make 2 squares matchstick puzzle**

**Second Move 3 sticks and make 2 squares matchstick puzzle**

**Remove 3 matchsticks to leave 6 triangles puzzle**

**Add 3 matchsticks to make 4 triangles - lateral thinking stick puzzle**