Logical Riddle


 * Hermione: "This isn't magic - it's logic - a puzzle. A lot of the greatest wizards haven't got an ounce of logic, they'd be stuck in here forever."
 * Harry: "But so will we, won't we?"
 * Hermione: "Of course not, everything we need is here on this paper. 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"
 * — Hermione and Harry discussing the Logic Chamber[src]

The Logical Riddle was a logic puzzle with potions which was set by Severus Snape.

Guarding The Stone
In 1992 Harry Potter,Hermione Granger and Ronald Weasley went through obstacles in order to get the thief.

The sixth obstacle is the Logical Riddle. Once entering the chamber, the one who enters the doorway is blocked by a purple flame, so which they can never get out. The other doorway leading to the Philosopher's Stone, is blocked with black flames. In the middle of a room sat seven different size bottles.

Each bottle contain different liquids, but not labeled what they were. Three contained poison, two contained wine, one contained a potion to let you move on to the last room and the last potion allowed to go back to the room with the purple flames. If the solver properly worked out the riddle, they would know what contents were in each bottle, and which was the one to progress:

"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 for evermore, 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 onwards 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."

Based on Hermione's thoughts, from left to right, the potions lineup is:
 * 1) Poison
 * 2) Nettle Wine
 * 3) Black fire potion Potion to move the drinker forward through black flames
 * 4) Poison
 * 5) Poison
 * 6) Nettle Wine
 * 7) Purple fire potion Potion to move the drinker backwards through purple flames