# Nine Bottles of Wine, One Poisoned, Two Mice, Two Tests

Came across this puzzle and couldn't think of a solution:

You are given nine bottles of wine out of which one is poisoned. Given two mice (that will die when taken a sip of poisoned wine), how can you find out which bottle is the poisoned one by only performing two tests?

Any ideas?

Edit: I misunderstood the exact meaning of test. I thought that each “drink/sip” was a test. Thanks for all the answers.

• The way a see it one test consists of each mouse taking a sip. In Glen O's answer, you would put a little from bottle 1, 2 and 3 in a dish and have the mouse 1 sip from that and then mix 3,4,5 in a dish and have mouse 2 sip from that. – Kevin Apr 29 '15 at 14:17
• I agree, a test has to be a sip. Otherwise just have one mouse take a sip of a new one every day. If it dies the last one was poison. Why go through all of the trouble in the answers below if you get multiple sips? – Zach Apr 29 '15 at 19:18
• I have heard the puzzle phrased that you only know the wine is safe if the mouse survives tnrough a full hour and you only have two hours to find the answer. Gets rid of the ambiguous test concept. – John Meacham Apr 30 '15 at 11:50
• In my blog I rephrased it as: “You are given nine bottles of wine out of which one is poisoned, and two cyborg-mice both of which will die with the minutest sip of the poisoned wine. How can you identify the poisonous wine in two rounds given that: (1) You are allowed to mix the wines; (2) in each round, you are allowed use both of the mice?” – blackened Apr 30 '15 at 11:59
• This is a variant of the classic balance puzzle (en.wikipedia.org/wiki/Balance_puzzle). This is doable with only 2 sips provided you can mix the wines together. – Sulthan Apr 30 '15 at 13:55

Number the bottles 0 through 8; these can be represented as $2$ digit ternary numbers (example, $7=21_3$). Call the mice Alice and Bob.

• For the first experiment, have Alice drink from every bottle whose first ternary digit is $0$, and have Bob drink from those whose second ternary digit is $0$.
• For the second experiment, replace every $0$ in the previous sentence with $1$.
After the two experiments, the experiment during which Alice died (if any) tells you the first ternary digit of the poisoned bottle: if she died on the first experiment, it is $0$, on the second, it is $1$, if never, it is $2$. Similarly, Bob's lifespan tells you the second digit. Thus, afterwards you will know the bottle.

• Why don't you just label them 00, 01, 02, etc.? You don't have to use explicit numbers. – Joe Z. Apr 29 '15 at 17:12
• This is one of the best SE answers that I've seen in a long time. – dotancohen Apr 29 '15 at 17:57
• Plottwist - Alice and Bob were very intelligent mice and already knew which one was poisoned... too bad no one could decipher their communications! – corsiKa Apr 29 '15 at 19:52
• Usually, to limit the test to "1 sip = 1 test", you have to mix the wines. – Sulthan Apr 30 '15 at 13:55
• For the record, this is equivalent to assigning an x and y coordinate of a 3x3 grid to each bottle, and testing a row and column on every test. – FvD May 1 '15 at 6:23

Start by having mouse 1 sip from 1, 2, and 3...

...and mouse 2 sip from 3, 4, and 5.

If they both die, it was bottle 3.

If mouse 1 dies, have mouse 2 sip from 1. If it dies, it's 1. If not, it's 2.

If mouse 2 dies, have mouse 1 sip from 4. If it dies, it's 4. If not, it's 5.

If neither die, you're left with 6, 7, 8, and 9. Have mouse 1 sip 6 and 7, and mouse 2 sip 7 and 8.

If both die, it's 7. If mouse 1 dies, it's 6. If mouse 2 dies, it's 8. If neither die, it's 9.

• I guess there is an ambiguity on what “two tests” mean. – blackened Apr 29 '15 at 9:19
• I think they would both die after 3rd sip from alcohol poisoning. – Zikato Apr 29 '15 at 11:43
• Populist badge, here you come! :P – Joe Z. Apr 29 '15 at 18:27
• This answer is better than mine, since it requires fewer sips in total. :) – Mike Earnest Apr 30 '15 at 1:37
• Note that if you combine the second experiment branches for each mouse then this strategy is equivalent to the one provided by @MikeEarnest 1-> 01 2->02 3->00 4->10 5->20 6->12 7->11 8->21 9->22 – Rick May 5 '15 at 17:27

I posted a similar problem (and an explanation of the solution although not an outright formula) in an answer to a different question about puzzles. Everyone else here has the right answer, although they don't explain it as well.

Each mouse has three possible states — dead in one day, dead in two days, not dead. This gives us that the information content of two trials is $3^n$ where $n$ is the number of mice — in this case, $n = 2$, so $3^n = 9$.

But that brings us no closer to an algorithm that actually makes use of that information. So let's see what we'd need to do in order to be able to tell between bottles on the second day.

On the first day, we do a binary trial in order to identify the wine as being in one of $2^n$ groups of bottles where $n$ is the number of mice.

However we configure the groups on the first day, on the second day there need to be enough mice left (and enough bottles eliminated) so that you can do another binary trial on the remaining bottles. So we need to structure the first day in such a way that:

• If both mice are eliminated, there is only one possible bottle.

• If one mouse is eliminated, there are two possible bottles.

• If neither mouse is eliminated, there are four possible bottles.

This is done by making each group contain $2^{2-n}$ bottles if it's being given to $n$ mice. So you'd give a single bottle to both mice on the first day, two different bottles to each individual mouse, and leave four bottles alone. This results in the algorithm some people have given:

Give bottle $1$ to both mice, $2, 3$ to the first mouse, and $4, 5$ to the second mouse.

If both mice die on the first day, then the poisoned bottle was bottle $1$.

If one mouse dies, then the poisoned bottle is one of the bottles given to that mouse. So test the remaining two bottles (either $2, 3$ or $4, 5$) with the other mouse by giving it a sip of one of them. If the mouse dies, it was that bottle; if it survives, it was the other one.

If both mice survive, then do another binary trial with the four remaining bottles. Give $6, 7$ to the first mouse and $6, 8$ to the second mouse.

• If both mice die, then the poisoned bottle was $6$.
• If the first mouse dies, then the poisoned bottle was $7$.
• If the second mouse dies, then the poisoned bottle was $8$.
• If both mice survive, then the poisoned bottle was $9$.

You can use this strategy for 243 bottles and five mice as well — on the first day, give one bottle to each of five mice, two bottles to each of the five distinct groups of four mice, four bottles to the ten distinct groups of 3 mice, etc. and leave 32 bottles alone.

• Without a doubt, an answer is not very useful if it cannot be generalized. Thank you for this wonderful explanation. – dotancohen Apr 29 '15 at 18:01
• How shall we change the wording so that it is both terse and unambiguous? – blackened Apr 29 '15 at 18:25
• It's not unambiguous at all - all the answers that have been provided so far are exactly the same. – Joe Z. Apr 29 '15 at 18:26
• Sorry. I meant the wording of the question. – blackened Apr 29 '15 at 18:41
• That's what I meant - the wording of the question isn't unambiguous if all the answers provided are the same thing. – Joe Z. Apr 29 '15 at 18:42

Number the bottles from $1$ to $9$ and the mice $A$ and $B$.

First test

$A$ drinks $1$, $2$ and $3$.
$B$ drinks $1$, $4$ and $5$

Cases:

1. If both die, poison was in $1$.
2. If only $A$ dies, poison is in $2$ or $3$
3. If only $B$ dies, poison is in $4$ or $5$
4. If nobody dies, poison is in $6,7,8$ or $9$

Second test

Depending on what happened after the first test, we have these cases:

1. Poison is in bottle $1$
2. $B$ drinks $2$.
If he dies, poison is in $2$, else it's in $3$
3. $A$ drinks $4$.
If he dies, poison is in $4$, else it's in $5$
4. $A$ drinks $6,7$
$B$ drinks $6,8$
If both die, poison is in $6$. If $A$ dies, poison is in $7$. If $B$ dies, poison is in $8$. If nobody dies, poison is in $9$.
• How is this different from the answer given by Glen O two hours earlier? – Lars Ebert Apr 29 '15 at 13:49
• It is the same method but I do think this is written more clearly. – Chris Apr 29 '15 at 14:35
• Then he could also edit the answer, instead of taking credit. – Mathias711 Apr 29 '15 at 16:53
• Hmm, the tests seem to be different if you look closer… They're not 100% the same but they do use a similar method. – Léo Lam Apr 29 '15 at 17:51
• @LéoLam They are identical exept the bottles are relabeled. – Taemyr Apr 30 '15 at 8:12

I liked Mike's answer, but I thought of a way to make it more visual, and also to show that each test really does involve a single sip for each mouse.

If we put the bottles in a grid with columns A,B,C and rows 1,2,3, we can pour six glasses - glass 1 contains a mixture of all the row 1 wines, and so on...

Now, give the first mouse a drink from glass 1, and the second mouse a drink from glass A.

Mice that survive advance to the next row/column for the next round, where first mouse get a drink from glass 2, and second mouse from glass B.

Surviving mice advance again, and their final positions indicate the row and column where the poisoned wine is!

Feed Alice a sip from 1, 2 and 3. Feed Bob a sip from 1, 4 and 5.
If both die, it's bottle 1.
If only Bob lives, give Bob a sip from 1, 2, 4, 5, 6, 7, 8, 9. If Bob dies, it's bottle 2, else 3.
If only Alice lives, give Alice a sip from 1, 2, 3, 4, 6, 7, 8, 9. If Alice dies, it's bottle 4, else 5.
If both live, give Alice a sip from 1, 2, 3, 4, 5, 6, 7 and Bob a sip from 1, 2, 3, 4, 5, 6, 8.
If both die, it's bottle 6.
If only Alice dies, it's bottle 7.
If only Bob dies, it's bottle 8.
If both lives, it's bottle 9.

This way,
if it was bottle 1, you know nothing else,
if it was bottle 2, you know for sure 1, 4 and 5 are safe,
if it was bottle 3, you know for sure 1, 2, 4, 5, 6, 7, 8 and 9 are safe,
if it was bottle 4, you know for sure 1, 2 and 3 are safe,
if it was bottle 5, you know for sure 1, 2, 3, 4, 6, 7, 8 and 9 are safe,
if it was bottle 6, you know for sure 1, 2, 3, 4 and 5 are safe,
if it was bottle 7, you know for sure 1, 2, 3, 4, 5, 6 and 8 are safe,
if it was bottle 8, you know for sure 1, 2, 3, 4, 5, 6 and 7 are safe,
if it was bottle 9, you know for sure 1, 2, 3, 4, 5, 6, 7 and 8 are safe.

Even better, if it's bottle 3, 5, 7, 8 or 9 you can feed the remaining mice the remaining unknown bottle, to make 100% sure it contain poison while you get drunk on the first set of bottles.

• Yet another duplicate answer. – March Ho Apr 29 '15 at 15:34
• Who else feed the mice 8 drips to confirm the 9th is toxic? – Dorus Apr 29 '15 at 16:11
• Throwing in redundant bottles just masks the fact that it's the same procedure. If both die, it's bottle 1 means that if both do not die it can't be bottle 1 -- yet you keep using bottle 1 after that point, for no purpose. On the third line you also use bottles 4-9 for no reason. Etc. – Matthew Read Apr 30 '15 at 15:34