Solving the Five-House Logic Problem by Hand

In this follow-up to my post on the classic Five-House Logic Problem, I provide the solution to the riddle plus a few tips for finding it.

Solving the Five-House Logic Problem by Hand

SPOILER ALERT! This post contains the solution to a classic logic problem that I wrote about in my previous post:

Reader Challenge: Einstein’s Five-House Logic Problem
In part 1 of this series, I introduce a classic logic problem that took me nearly two hours to solve by hand. Later in the series, we’ll use Access to program a solution.

Please stop reading now and visit the above link if you would like to solve this problem yourself before seeing the solution.

I promised in my previous post that I would share a solution to this brain teaser.

To avoid accidentally giving away the answer to readers who want to solve the puzzle on their own first, I'll use ChatGPT to provide some relevant filler material.

How To Solve a Logic Puzzle

[MIKE]: What are the basic steps to solving a logic puzzle?

[ChatGPT]: Solving a logic puzzle involves a systematic approach that requires careful analysis and deduction. While the specific steps may vary depending on the puzzle, here is a general outline of the basic steps to solve a logic puzzle:

  1. Read the instructions: Start by thoroughly reading the puzzle instructions to understand the rules, constraints, and objectives of the puzzle. Pay close attention to any given clues or hints.
  2. Identify the puzzle type: Logic puzzles come in various types, such as grid-based puzzles, deductive reasoning puzzles, or verbal puzzles. Determine the type of puzzle you are dealing with, as this will help you decide on the appropriate solving strategy.
  3. Analyze the given information: Carefully study all the information provided in the puzzle, including the clues, statements, and any accompanying diagrams or charts. Identify any direct or indirect relationships or constraints between the given elements.
  4. Create a visual representation: If the puzzle involves multiple elements or entities, it can be helpful to create a visual representation, such as a grid, chart, or diagram. This will allow you to track and organize the information more effectively.
  5. Deduce and make inferences: Based on the given information, start making deductions and inferences about the relationships between the elements. Look for clues that provide direct or indirect connections, eliminate possibilities, or provide conditional statements.
  6. Use logical reasoning: Apply logical reasoning skills, such as deduction, induction, and elimination, to narrow down the possibilities and eliminate incorrect or impossible scenarios. Use the information you have gathered to draw conclusions and make logical inferences.
  7. Test hypotheses and make educated guesses: As you gather more information and eliminate possibilities, test different hypotheses and make educated guesses to fill in the missing pieces of the puzzle. Use the process of elimination to discard incorrect options and focus on the most likely solutions.
  8. Iterate and refine: Continue iterating through the puzzle, revisiting the information and clues, refining your deductions, and updating your visual representation as needed. Cross-check your deductions to ensure they are consistent and coherent.
  9. Solve step-by-step: Break down the puzzle into smaller, more manageable parts or sub-problems. Solve one part at a time, using the information you have gathered and the deductions you have made. Gradually build on your solutions until you can solve the entire puzzle.
  10. Verify and check: Once you have completed the puzzle, go back and verify your solution. Double-check your deductions, ensure all the given constraints are satisfied, and confirm that your solution is logical and consistent.

Remember that practice and patience are essential for solving logic puzzles. With time and experience, you will become more adept at recognizing patterns, making deductions, and finding efficient strategies to tackle different types of puzzles.


Who drinks water? The Norwegian.

And who owns the zebra? The Japanese person.

Here's the full neighborhood configuration from the MS Access-based solution that I'm still working on.  The houses are listed in numerical order from left to right:

  1. The Norwegian lives in the yellow house.  This person drinks water, has a fox, and grows roses.
  2. The Ukrainian lives in the blue house.  This person drinks tea, has a horse, and grows marigolds.
  3. The English person lives in the red house.  This person drinks milk, has snails, and grows geraniums.
  4. The Spaniard lives in the ivory house.  This person drinks orange juice, has a dog, and grows lilies.
  5. The Japanese person lives in the green house.  This person drinks coffee, has a zebra, and grows gardenias.

My By-Hand Approach

First, I started by creating a list of each category and the values that comprise it:

  • Position of the house
  • Nationality of the owner
  • Pet
  • Color of house
  • Drink
  • Flowers

Next, I drew five columns on my page with each column representing a house and its position.  I then filled in the items that directly related to the positions of the houses:

  • Milk is drunk in the middle house
  • The Norwegian lives in the first house on the left
  • The Norwegian lives next to the blue house

After that, I reread the rules and put orange tally marks next to each value every time it was mentioned.  This helped me identify those items that were mentioned multiple times, as they tended to be the next lowest hanging fruit.  The following values each appeared twice in the rules:

  • Norwegian
  • Green House
  • Roses

Next, I wrote the value pairs at the bottom of my sheet.  This gave me a quick reference with a higher signal-to-noise ratio than the original rules.  For example:

  • roses - yellow (the yellow house had roses)
  • geraniums - snails
  • lilies - OJ
  • ivory -> green (the green house is to the right of the ivory house)
  • marigolds <--> fox (the house with the fox is next to the house with the marigolds)

After that, I used initials to show all the available values for each category and each house.  For example, "F/H/Z" in the Pet row would indicate that house might keep a fox, a horse, or a zebra as a pet, but not a dog or snails.

My next step was to draw lines between pairs of items that went together in the house columns.  This helped identify incompatible pairs of items.  For example, the Japanese person could not keep snails as a pet because they each went with a different flower.

For my final step, I had the three houses on the right side of the neighborhood that could be the following colors:

  • House 3: Ivory or Red
  • House 4: Ivory or Green
  • House 5: Green or Red

Since several other items depended on these values, I simply wrote out all the remaining configurations and then compared them to see which three would be compatible.

*NOTE: In between each of the above steps, I set aside about 15 minutes for staring blankly at the page, scratching my head, and looking generally confused.  Total time to solution was about two hours.  If my actual approach was as systematic as my write-up made it appear, I might not have taken four times as long to solve the puzzle as fellow Access MVP Maria Barnes who finished in about 30 minutes (well done!).

No, I didn't Google the answer...

Here's what my scratch paper looked like when I was finished:


All original code samples by Mike Wolfe are licensed under CC BY 4.0