Harry Potter - solving the Potions Riddle
To celebrate the upcoming release of Harry Potter Book 7, I thought I’d write about something that always bugged me. At the end of Harry Potter and the Philosopher’s Stone (which I’ve just re-read) Harry and Hermione are trapped in a room, and have to solve a riddle to find out which of seven potions to drink. One will move them onwards to stop Voldemort from getting the Philosopher’s Stone. One will send them back to (relative) safety. Two will do nothing, and three will kill them. Hermione (brains of the operation) of course figures it out, but, frustratingly, we (the readers) apparently don’t have enough information to solve it ourselves! Here’s the riddle:
Danger lies before you, while safety lies behind,
Two of us will help you, whichever you would find,
One among us seven will let you move ahead,
Another will transport the drinker back instead,
Two among our number hold only nettle wine,
Three of us are killers, waiting hidden in line.
Choose, unless you wish to stay here forevermore,
To help you in your choice, we give you these clues four:
First, however slyly the poison tries to hide
You will always find some on nettle wine’s left side;
Second, different are those who stand at either end,
But if you would move onward, neither is your friend;
Third, as you see clearly, all are different size,
Neither dwarf nor giant holds death in their insides;
Fourth, the second left and the second on the right
Are twins once you taste them, though different at first sight.
The catch is that the third clue tells us that “neither dwarf nor giant” bottles are poison - and we’re not told which of the seven bottles they are.
So, I started wondering - what, if anything, can we deduce from this riddle? It’s actually a neat little problem, with a clever problem solving twist. Have a go yourself, then read on for my solution and how it connects to one of my favourite logic puzzles!
Here’s how I solved it. First, like all good problems, one way to start it to condense the text down into its basic information.
First of all, we have 7 bottles: 3P (poison), 2W (wine), 1F (forward) and 1B (back). Let’s label the 7 bottles presented as B1 (on the left) through to B7 (on the right). There are four clues:
Clue #1: Nettle wine will always have poison on its left.
Clue #2a: Neither B1 nor B7 are F
Clue #2b: B1 is different from B7
Clue #3: The smallest and largest bottles are not P
Clue #4: B2=B6
Clue #1 means that B1 cannot be wine (since there’s no bottle to the left of B1 to be poison). In fact, instead of 7 bottles to move around, we really only have “5″ allowed singles or pairs of bottles:
Clue #1b: F, B, PW, PW and P.
Does that makes sense? The PW must always be in pairs, and one P is left over.
Clue #2 means that B1 can only be either P or B. Clue #4 means B2 and B6 cannot be F or B (since there’s only one of each of those), and so B2 must be either P or W. That means there’s at most four possible combinations for the first two bottles - PP, PW, BP, BW. But BW is ruled out by Clue #1.
So, let’s look at each. If the first two bottles are PP, the third must be W (Clue #1b). B6 must be P (Clue #4) and B7 must be W (Clue #1b). That just leaves us B3,B4 and B5 to fill with a P,F and W, constrained by Clue #1b.
If you do the same thing with the other B1&B2 pairs, you end up with only ten possible combinations:
| B | P | W | F | P | P | W |
| B | P | W | P | F | P | W |
| B | P | P | W | F | P | W |
| B | P | F | P | W | P | W |
| P | P | W | F | B | P | W |
| P | P | W | B | F | P | W |
| P | W | F | P | P | W | B |
| P | W | P | F | P | W | B |
And I’ll explain the highlighting in a moment.
It would seem, then, that to go any further we would need to know the bottle sizes to be able to use clue #3. The poison could be anywhere. The Forward potion is either in B4 or B5, but you can’t tell which. There’s no safe bottle at all to drink! We’ll either have to gamble, or stay here until we die of thirst. But there’s one more clue to help us, and that’s that Snape (the guy who set the puzzle) wouldn’t (probably) have made it impossible to solve. And that means that Clue #3 must be able to resolve things for us - and that’s useful information!
Let’s say the left most bottle was either the largest or smallest. That means it’s not poison, and we’re limited to the first four sequences listed above. Four bottles are always the same - these are bolded - but to distinguish between them, we’d need one of the three middle bottles to be large/small and hence not poison. But at most, this can reduce the possible arrangements to two, which isn’t enough to safely drink from one of the bottles. Hence, we can’t solve the puzzle and the first bottle isn’t giant or dwarf.
It turns out that only if B2 or B6 are the giant/dwarf can we solve the puzzle. This restricts us to the final two sequences, where B3 and B4 are either P-F or F-P. That means one of those two must also be either dwarf or giant, giving us only one possible arrangement of bottles that fits all the clues! What’s the upshot? We know all the bolded bottles (B1,B2,B5,B6,B7), and know that we can safely drink B7 to escape the puzzle. You’d then need to simply see which of B3 or B4 was either a dwarf or a giant bottle, and that one will take you forwards to fight Voldemort!
Turns out that this sequence was already deduced by another fan - BUT they used the additional information that Hermione tells Harry Potter to drink the smallest bottle to go forwards, while she’d drink the one on the end to go back and get more help. These clues fit with the above solution (and tells us that one of bottle 2 or 5 was the largest bottle) but we didn’t need them to get to almost the same answer. Ain’t maths grand?
This actually the technique used to solve the hats puzzle, probably my favourite logic puzzle of all time. It’s just such an unbelievably cool puzzle, which works on the same principle as my solution above. It’s the first puzzle on that page, and the others are neat variants.
Anyway, 16 days, 16 hours and 16 minutes until Book 7!
His conclusion was that the correct sequence was one of the final two rows in the table.
So there are four possible arrangements:
P Wg Fd P P W B
P W Fd P P Wg B
P Wg P Fd P W B
P W P Fd P Wg B
[’d’ means dwarf (the smallest bottle), and ‘g’ means giant (the largest).]
We can’t tell which of these four is correct, since all of them match the clues in the book.
I spent more time on this puzzle, because I’m American. I wasn’t sure whether, in Britain, “the second left and the second on the right” means what it means in America, or whether it’s off by one. (In England, the ’second storey’ of a building is what Americans call the “third story”.) But I eventually proved that if second left and second from the right is shifted by one (i.e., ..:.:..) then there is no configuration that is solvable given the fact that the B potion ends up being on the right.
Cheers, Lawrence! Neat extra calculation, too. I wonder - would there be some set of clues like this that would give precisely *one* solution? Clues that use the words “giant” and “dwarf” without describing where they are, but through the same kind of reasoning (i.e., there must be *a* solution) you can figure it out. Hmmm!
Google to find the solution better explained on other websites.
It turns out there are actually 8 arrangements of the bottles which fit “unique” solutions; i.e. 8 arrangements of the dwarf and the giant bottles which, in combination with the other clues, let one deduce an unambiguous solution. There are 88 other arrangements (ignoring the permutations of the 5 mid-sized bottles) which also fit the other clues but don’t give enough information to actually solve which bottles to drink. Having read book 7, I prefer to believe that Snape would not have used any of those 88 permutations.
Even with the additional information Hermione gave about HER solution, there are actually four arrangements which fit the clues and what she said about her solution. Using P for Poison, W for Nettle Wine, F for Forward, B for Back, + for Largest, and - for Smallest, the four solutions are:
P W+ P F- P W B
P W P F- P W+ B
P W+ F- P P W B
and
P W F- P P W+ B
The other four solutions do not fit what Hermione said, but work equally well
P W P F+ P W- B
P W- P F+ P W B
P W F+ P P W- B
and
P W- F+ P P W B
Note that these other four differ in that the LARGEST bottle, not the SMALLEST, goes forward. The one on the right end is still the Back bottle.
hey, i really like this solution, but found it sort of difficult to understand what conclusion you came to