The Zebra Puzzle: How to Solve It Step by Step
The zebra puzzle, also known as the Einstein puzzle or Einstein’s riddle, is a logic puzzle about five houses in a row. Each house has a different owner, color, drink, pet and more. About fifteen true clues lead to exactly one solution, and the question usually asks for a detail that no clue mentions.
Updated
What is the zebra puzzle?
An early version that still gets quoted everywhere ran in Life International in 1962. Five houses stand side by side. Their owners come from five countries, and every house has its own color, drink and pet. The puzzle closes with two questions: Who drinks water? Who owns the zebra? That second question gave the puzzle its name.
As far as anyone can tell, Albert Einstein had nothing to do with it. The story that he wrote it as a boy has never been backed up, and neither has the popular claim that only a tiny fraction of people can solve it. The name Einstein puzzle stuck anyway. Today it simply means a puzzle you crack with careful bookkeeping rather than knowledge.
How it’s built: houses, categories and clues
Every zebra puzzle has the same frame. There are positions in a row, usually houses, and several categories, such as owners, colors and drinks. Each value in a category appears exactly once. The clues tie values to each other or to a position, and every clue is true. Five kinds of clues come up again and again:
| Clue type | Example | How to use it |
|---|---|---|
| Fixed position | “The Norwegian lives in the first house.” | Fill it in right away. These clues are where you start. |
| Same house | “The Englishman lives in the red house.” | Treat it as a pair: wherever one goes, the other follows. |
| Next to | “The Norwegian lives next to the blue house.” | An end house has only one neighbor. Once one side is placed, the other has two spots at most. |
| Immediately left or right | “The green house is immediately to the right of the ivory house.” | The pair moves as a block. The left one is never on the far right, and the right one is never on the far left. |
| Never mentioned | Water, the zebra | The answer appears in no clue. It’s the last value left once everything else is placed. |
Watch the word “immediately.” Run the 1962 puzzle through a small solver program and the difference is stark. With “immediately to the right,” exactly one solution fits. Read it as “somewhere to the right,” and eleven do.
How to solve a zebra puzzle with a grid
Nobody can juggle five houses with four or five traits each in their head. A table does that work for you. For puzzles in a row, the simplest layout has one row per house and one column per category.
- Set up the table. Put positions 1 to 5 down the side and the categories across the top. Jot down the possible values for each category next to it.
- Fill in fixed positions. Clues like “in the first house” or “in the middle house” go first. They anchor everything else.
- Chain the pairs. Two clues that share a value belong together. If “Anna lives in the red house” and “tea is served in the red house,” then Anna drinks tea, wherever the red house ends up.
- Pencil in possibilities. When a value has only two spots left, write it in both rows with a question mark. You’ll see at a glance where things get tight.
- Follow one assumption through. When you’re stuck, pick one of two options and keep going. If it leads to a contradiction, the other option is right. That isn’t guessing: you test one possibility all the way and reject it for a reason.
- Read off the last value. Once everything else is placed, the missing answer has exactly one spot left.
To see the same moves in a classic elimination grid with dots and X’s, try the smaller example in logic puzzles for adults.
A mystery zebra puzzle: Snowed in at the lodge
A snowstorm closes the road to the mountain lodge for the night. Upstairs, five guests sleep in five rooms along one hallway: Room 1 by the stairs, Room 5 at the far end. Each guest comes from a different city, took a different drink up to bed and packed a different item. In the morning, Cecil, who runs the lodge, is found dead in the dining room. Next to him sits a mug that smells of whiskey and lemon: a hot toddy. Only one guest ordered a hot toddy that night.
Your question: Who drank the hot toddy?
The categories
- Guests: Mabel, Otis, Ruth, Vernon, Walter
- Hometowns: Austin, Boston, Denver, Omaha, Tulsa
- Drinks: coffee, hot toddy, mulled cider, tea, warm milk
- Packed: chess set, harmonica, hot-water bottle, knitting, trail map
“To the left” means a lower room number. “Right next to” means the room number just before or just after. Every clue is true.
The clues
- The guest from Omaha sleeps directly to the left of Vernon.
- Mabel drinks mulled cider.
- Tea is served in the middle room.
- The guest from Denver drinks coffee.
- Walter sleeps in the first room.
- The hot-water bottle belongs to whoever drinks warm milk.
- Otis is from Tulsa.
- Whoever packed the trail map sleeps right next to Mabel.
- The guest from Boston packed the harmonica.
- Vernon drinks warm milk.
- The mulled cider drinker sleeps right next to the guest with the knitting.
- Walter sleeps right next to the guest from Boston.
- The guest from Tulsa packed the knitting.
| Room | Guest | Hometown | Drink | Packed |
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 |
Give it a try before you peek. The full solution is below.
Show the step-by-step solution
- The fixed spots. Walter sleeps in the first room (clue 5). Tea is served in the middle room, which is Room 3 (clue 3).
- The guest from Boston. They sleep right next to Walter (clue 12). Room 1 has only one neighbor, so the guest in Room 2 is from Boston. The harmonica is there too (clue 9).
- Narrowing down Vernon. Vernon drinks warm milk (clue 10), so he also has the hot-water bottle (clue 6). Room 1 is Walter’s, Room 2 has the harmonica, and Room 3 has the tea. That puts Vernon in Room 4 or 5, and the guest from Omaha, directly to his left (clue 1), in Room 3 or 4.
| Room | Guest | Hometown | Drink | Packed |
|---|---|---|---|---|
| 1 | Walter | |||
| 2 | Boston | Harmonica | ||
| 3 | Omaha (maybe) | Tea | ||
| 4 | Vernon (maybe) | Omaha (maybe) | Warm milk (maybe) | Hot-water bottle (maybe) |
| 5 | Vernon (maybe) | Warm milk (maybe) | Hot-water bottle (maybe) |
- Testing an assumption. Suppose Vernon is in Room 4. Then the guest in Room 3 is from Omaha. Otis is from Tulsa (clue 7) and packed the knitting (clue 13). The only room left for him would be Room 5, since Room 1 is Walter’s, Room 2 belongs to the Boston guest, Room 3 to the Omaha guest and Room 4 to Vernon. The mulled cider is right next to the knitting (clue 11), so it would have to be in Room 4. But Vernon drinks warm milk. That’s a contradiction, so Vernon is in Room 5 and the guest from Omaha is in Room 4.
- Otis. He’s from Tulsa. Room 1 is Walter’s, the guests in Rooms 2 and 4 are from Boston and Omaha, and Vernon has Room 5. So Otis is in Room 3, with the knitting.
| Room | Guest | Hometown | Drink | Packed |
|---|---|---|---|---|
| 1 | Walter | |||
| 2 | Boston | Harmonica | ||
| 3 | Otis | Tulsa | Tea | Knitting |
| 4 | Omaha | |||
| 5 | Vernon | Warm milk | Hot-water bottle |
- Mabel. She drinks mulled cider (clue 2), right next to the knitting (clue 11), so she’s in Room 2 or 4. The trail map is right next to her (clue 8). Only Rooms 1 and 4 are still open for the trail map. If it were in Room 4, Mabel would need Room 3 or 5, but Otis and Vernon are there. So the trail map is in Room 1, Mabel is in Room 2, and the chess set goes to Room 4.
- The rest. Ruth takes Room 4. Denver and Austin are the hometowns still open (Rooms 1 and 5), and coffee and the hot toddy are the drinks still open (Rooms 1 and 4). The guest from Denver drinks coffee (clue 4), and the two only meet in Room 1. Austin goes to Room 5, and the hot toddy to Room 4.
- The answer: Ruth from Omaha drank the hot toddy. She’s in Room 4.
| Room | Guest | Hometown | Drink | Packed |
|---|---|---|---|---|
| 1 | Walter | Denver | Coffee | Trail map |
| 2 | Mabel | Boston | Mulled cider | Harmonica |
| 3 | Otis | Tulsa | Tea | Knitting |
| 4 | Ruth | Omaha | Hot toddy | Chess set |
| 5 | Vernon | Austin | Warm milk | Hot-water bottle |
All 13 clues matter. Drop any one of them and at least two answers fit. You never have to guess: one option gets tested once and ruled out for a reason.
From a row of houses to a floor plan
A zebra puzzle lines things up in a single row. The floor plan in Sudocrime works in two directions: suspects stand on a map of the house, and each row and column holds exactly one person. You use the same moves. The clues are just more spatial.
| Aspect | Zebra puzzle | Floor plan |
|---|---|---|
| Layout | A row of houses or rooms | A map with rows, columns and rooms |
| Core rule | Each value exactly once | Exactly one person per row and column |
| Typical clues | “next to,” “to the left of,” “in the same house” | “right next to the sofa,” “west of,” “in the parlor,” “was sitting” |
| The question | The value no clue mentions | The victim’s empty square and who was alone with them |
If you enjoy zebra puzzles, you’ll feel at home on a floor plan. Three short cases of that kind, from an easy warm-up to a crime logic grid, are waiting in murder mystery logic puzzles. The floor plan rules cover every detail.
The Sudocrime app has 100 murder cases to solve, each in its own setting, plus mystery stories told in chapters with sudoku and a floor plan. You can also start playing in your browser.
Frequently asked questions
Did Albert Einstein write the zebra puzzle?
There’s no evidence that he did. An early, widely quoted version appeared in Life International magazine in 1962. The story that Einstein made it up as a boy is a legend, and so is the claim that only a tiny share of people can solve it.
What is the answer to the zebra puzzle?
In the 1962 version, the Norwegian drinks water and the Japanese man owns the zebra. The mystery version on this page has its full solution in the collapsible section below the clues.
Is a zebra puzzle the same as a logic grid puzzle?
It’s a special kind of logic grid puzzle. The items stand in a row, so position clues such as “next to” or “immediately to the right of” do much of the work. A simple table with one row per house is usually easier than a full elimination grid.
How hard is the Einstein puzzle?
It rewards organization more than brilliance. If you keep a table, separate sure entries from possibilities, and follow one assumption through to the end when you get stuck, you can solve it without guessing. No math or trivia is involved.