So, there's a detail here that I'm surprised has been left out.
In the original book, the picture that's shown above doesn't appear. The picture appears to have been added for a later web-based version of the puzzle. Nothing in the text tells the reader which potions are the dwarf and the giant. Although Hermione would be able to see it, the reader isn't told.
If the dwarf and the giant are as shown above, then the solutions above work; and since these match the solution that Hermione came up with in the book, it is likely that the picture correctly represents what Hermione saw.
But what if it didn't?
We're going to code the potion types as follows. The potion that sends you forward will be
a for advance. The potion that sends you back will be
r for retreat. Wine will be
w. We'll divide the potions into two categories: the two "wine poisons" which are next to wine which we'll call
p, and the "rogue poison" which is not next to wine, and we'll call
Also, I'm just going to refer to the dwarf and giant bottles as "safe", since it doesn't matter which is the dwarf and which is the giant.
Finally, we're going to include a fair Snape hypothesis. This is simply that we assume Snape designed the puzzle fairly (if it was meant to be unfair, just put poison in all 7 potions and call it a day). This implies that:
- we should not need to risk drinking poison in order to solve the puzzle: we must be able to identify
- we should not need to risk drinking the "wrong" direction potion to solve the puzzle: we must be able to identify
- we should not need to risk drinking poison at any point: we should never need information that would require us to drink a potion that might be
I'm not going to repeat the reasoning that's given above. After applying the rules other than the "dwarf and giant" rules and their corrolaries, we are left with one of the following three sets of possibilities (where a letter means that a bottle has a chance of containing that potion):
Case 1: p w aP aP p w r
Case 2: r P ap wp wa p w
Case 3: rP p w arP arP p w
By the fair Snape hypothesis, the "dwarf and giant" rule must therefore complete the puzzle and tell us which of these cases we are in and then which is the correct bottle to drink.
Case 1 is easy, because it's uniquely identified by either 2 or 6 being marked safe. In this case,
r is 7 and
a is either 3 or 4. However, 3 and 4 also have the possibility of being
P. By the fair Snape hypothesis we must be able to tell that
a is not
P so the correct bottle must be identified by the dwarf and giant rule; ie, it must be the other safe one.
Case 3 and 2 are harder. We can simplify case 3 somewhat: In this case,
a is 4 or 5, and
r is 1, 4, or 5. By our Fair Snape Hypothesis there must be no risk of drinking the potion that sends us in the wrong direction, and the only way this could be avoided is if
r is 1, so our simplified case 3 is shown below with case 2:
Case 3 (simplified): r p w aP aP p w
Case 2: r P ap wp wa p w
Unfortunately, there are no potions that are always poison in one case but not the other, so simply identifying some potions as safe cannot tell us which case we are in. We thus need to work from the disjunction:
Case disjunction: r pP wap wapP waP p w
So by fair Snape,
a must be whichever of 3-5 is marked safe, because otherwise it would be impossible to tell it from poison.
So we end up with a strange total solution:
- If 2 or 6 are safe,
a is whichever of 3-4 is safe and
r is 7.
- If neither 2 nor 6 are safe,
a is whichever of 3-5 is safe and
r is 1.
Snape might be a bit disappointed to learn that the consequence of this is that not a whole lot of logic is needed: simply chugging the dwarf and the giant - which are both certain to be safe - will automatically get you through the puzzle.
But here's where things get really interesting. It's actually possible to go further than this and, given our Fair Snape Hypothesis, solve the puzzle even if all the bottles were the same size!
How do we do that?
In our three cases above, there is exactly one case where we can potentially identify
a without any reference to size. That is case 2. So if all bottles are the same size, a fair Snape can only set case 2, and the solution is that
r is 1 and to find
a, drink potion number 5; if it wasn't
a it was wine, so you'll be fine, and then 3 is