Solving Snape’s Logic Puzzle

Note (added 8/27/2011):

If you googled this page in order to solve the puzzle for Pottermore, the two possible solutions to the rhyme can be found at the bottom of this post. One of those solutions is correct. If you look at the bottles on Pottermore, you can easily see which one it is.

The rest of this page explains the logic behind those two potential solutions.

Original post starts here (posted 7/31/2010)…

In PS/SS, Snape’s Logic Puzzle guards the door that leads to Dumbledore’s protection for the Philosopher’s Stone. Here’s the puzzle:

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.

Parameters:

Here’s what I’ve got from the first half of the poem: one bottle will move you ahead (line 3), one will send you back (line 4), two hold nettle wine (line 5), three hold poison (line 6). Or, as Hermione sums it up quite succinctly:

“Seven bottles: three are poison; two are wine; one will get us safely through the black fire, and one will get us back through the purple.”

And, of course, if you don’t make a choice, you’re stuck in the chamber forever between the purple flame and the black. Nice.

Clues:

Now, let’s look at the clues that help Hermione make her choice.

  1. There is always poison to the left of nettle wine (lines 9-10)
  2. The bottles on either end of the line contain different contents, but neither will move you forward (lines 11-12)
  3. The smallest and largest bottles do not contain poison (lines 13-14)
  4. The second from the left and the second from the right are housed in different-sized bottles, but they hold the same contents (lines 15-16)

Setting the Constants:

So, how do we solve this? Well, to solve, you start with the unchangeable elements (the constants) not with the changeable elements (the variables). First, let’s number the positions from our left to right:

1 2 3 4 5 6 7

Now, let’s insert the constants: the elements second from the left and second from the right are identical (though in different-looking bottles), and poison will always be to the left of nettle wine.

There are actually two possible ways to arrange these bottles, depending on whether “to nettle wine’s left side” means from our left or from the wine’s left. But both arrangements ultimately lead to the same end solution of the puzzle.

Here are the constants using our left as the reference point:

1 2 3 4 5 6 7
Poison Wine x y Poison Wine z

Here are the constants using the wine’s left as a reference point:

1 2 3 4 5 6 7
Wine Poison x y Wine Poison z

Notice that whichever way we do it, we satisfy the requirement that the elements second from the end (Position 2 and Position 6) hold the same contents (2-Wine, 6-Wine; or 2-Poison, 6-Poison) – and we also satisfy the requirement that on either end, poison will always appear to the left of the wine – depending on whose left we’re using.

I’ll just say right now that I think the first layout (1-Poison, 5-Poison) is the correct interpretation of “nettle wine’s left side” – for reasons that I hope will become more apparent further down.

Solving for the Variables:

Okay, so now that we have positioned the poison/wine sequences (the constants), we now have three bottles remaining. One is poison, one moves you backward, one moves you forward. Poison cannot be in either a very large or very small bottle. The bottle on one end of the line cannot hold the same contents as the bottle on the opposite end of the line. And neither of the bottles on the end will move you forward.

As I mentioned above, I think that “nettle wine’s left side” is referring to our left – which means that poison, not wine, is in the bottle at the left end of the line (in Position 1). Why? Because Hermione is absolutely certain that the bottle on the right end of the line (in Position 7) is the potion that moves you backwards through the purple flame.

The bottle in Position 7 is described in the text as merely “rounded” (not extraordinarily large or extraordinarily small). This means that there is no visual cue to tell Hermione that it is not poison. Hermione would need to base her reasoning on the fact that the bottles on either end of the line must hold different contents. And the solution that makes most sense in this scenario is the one that has Poison in Position 1 – as I’ll explain below:

Wine in Position 1: If the bottle in Position 1 contained wine, then the bottle in Position 7 could theoretically contain either poison or potion. (Notice that I said “theoretically.” We already know from the text that it contains the potion that moves you Backwards). However, if Position 7 were really up for grabs between poison and potion, then we would expect a visual cue (i.e., bottle size) to tell us where the poison is not located. No such bottle exists in Position 7, so if wine is in Position 1, Hermione could not be so certain that the bottle in Position 7 contains the “Backwards” potion.

Poison in Position 1: Since Hermione’s solution for Position 7 does not depend on a visual cue, I would suggest that she is using our left as her reference point. That way, the bottle in Position 1 contains poison… and the bottle in Position 7 cannot contain poison (“different are those who stand at either end”).

So here’s what I believe we’ve got:

1 2 3 4 5 6 7
Poison Wine x y Poison Wine Backward

A Final Solution?

So, can we solve for Position 3 and Position 4? Not conclusively, without seeing the bottles.

Here’s what we know: Of these two bottles, one must contain poison. The other must contain the potion that moves you forward. The only way we would be able to tell which is which would be by a visual cue. And we know from the text that the bottle containing the “Forward” potion is the smallest bottle in the line.

But is the smallest bottle in Position 3 or Position 4? Well, if Snape preferred not to put like things next to each other, then he would not have poison sit next to poison. Here is the solution in which no two sequential elements share the same contents:

1 2 3 4 5 6 7
Poison Wine Poison Forward Poison Wine Backward

Poison alternates with wines and potions.

Here’s the solution if Snape preferred to use the middle Position as a “reset” to create a sort of symmetric mirror on either side of the middle:

1 2 3 4 5 6 7
Poison Wine Forward Poison Poison Wine Backward

Notice that in this solution, the sequence is Poison-Wine-Forward (1-2-3), Reset (4), Poison-Wine-Backward (5-6-7). The middle position (also containing poison) serves as the “reset,” with symmetric mirror sequences on either side of it.

Either solution, I think, is inconclusive, given that we cannot actually see the size of the bottles… and that bottle-size is actually part of the puzzle. All we can do, in the abstract, is narrow down the field so that the final choices are limited to Position 3 and Position 4 and then solve for those positions based on bottle size.

But we can at least do that.

Update (4/26/2020)

And now, at long last, here’s bottle layout. If you look at the layout and the two final solutions given above, you will correctly solve the puzzle.

IMG_4491

 

24 responses to “Solving Snape’s Logic Puzzle

  1. Pingback: An Ounce of Logic « Expecto Patronum

  2. this is so cool! i tried 2 solve it when i read the 1st book but gave up after the 3rd line. it is all clear now!

    • :) Glad it helps. We’ll know more when we actually see the bottles. I’m pretty sure I won’t actually be able to post the picture without violating Terms and Conditions. But I might be able to sketch bottle sizes so that I can show people the actual sizes of the bottles.

    • That does excite me! We saw a picture of what looked like the puzzle, but I wasn’t sure if it was the real deal or just some clever fanart.

      Now I know!

      Thanks for sharing that!!! I’m soooooooo excited! :)

  3. Well… Pottermore is up to a few lucky of us. Is there picture? :D
    Inspired by my recent Pottermania I tried to work it out.

    Just my two cents… i love puzzles involving logic, but it’s pretty hard to explain. I’ll give a try. I saw it didn’t match with your solution..

    PS: I didn’t re-read the chapter and I didn’t read your entire analysis (because I wanted to figure out for myself), so I’m only based in the verses.

    ______________________________________

    7 Bottles:

    3 Poison (P)
    1 Ahead (A)
    1 Back (B)
    2 Wine (W)

    “The second left and the second on the right
    Are twins once you taste them, though different at first sight.”

    There are 3 bottles of poison and seems to me that the poisons aren’t equal and… wine is a couple, so I just feel that it is talking about the wine.

    _ W _ _ _ W _

    “You will always find some on nettle wine’s left side”
    So, it certainly doesn’t mean our left, but the wine’s left. We can already put 2 bottles os poison.

    _ W P _ _ W P

    “Second, different are those who stand at either end”

    So we know that the first is not poison.

    2 possible solutions:

    _ W P _ P W P

    _ W P P _ W P

    “Second, different are those who stand at either end,
    But if you would move onward, neither is your friend”

    So the A is not in the first position.

    _ W P A P W P

    _ W P P A W P

    Just leaves Bacwards to fill:

    B W P A P W P

    B W P P A W P

    “Neither dwarf nor giant holds death in their insides”´
    So.. we need the visual clue… =(

    It can be either in 4th our 5th position.

  4. I don’t know if my last post with my explanation went ‘live’, I can’t see it –‘

    I come to 2 different solutions that are probably wrong:
    B W P A P W P
    B W P P A W P

    If Hermione drunk the last, I’m enterely wrong xD xD

      • I found a picture of the bottles and it did not seem fake :D
        I think we can have a true solution as it matches with your results ;)

        • Hi DreamChaser,

          I’ll be back to take a look at your work here once I’ve had a chance to do the logic puzzle inside Pottermore myself. :) I’m really looking forward to having a conversation on this!

          Sorry to remove those links. The pictures did look real, and Pottermore doesn’t want screen caps circulating… and I don’t want to get in trouble with JKR and Sony :)

          But we’ll all be able to see for ourselves very soon!

    • There are two potions that work correctly for me. You have to choose forward and backward.

      Above, under “A Final Solution,” there are two answers for where the forward and backward potions are located. One of those answers is correct. If you look at the bottles and read the passage in the book, you should quickly see which one is the correct solution.

  5. I believe that when it says “Niether dwarf nor giant holds death on their insides;” it isn’t saying giant as in height, but rather width. I imagine it would be more specified to the height if it was in reference to that dimension of the bottle.

  6. Oh wow. When I solved Snape’s puzzle while reading SS on Pottermore, I just guessed. And I got lucky. I really should’ve have tried that solution. The Sorting Hat really should’ve put you in Ravenclaw! Ha ha, I’m a Ravenclaw, although a few other quizzes say I’m a Gryffindor, a couple say I’m a Slytherin, but most, including the Pottermore Sorting Hat, say I’m a Ravenclaw. Squawk!

Leave a comment