30
$\begingroup$

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.

$\endgroup$
7
  • 3
    $\begingroup$ 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. $\endgroup$
    – Kevin
    Commented Apr 29, 2015 at 14:17
  • $\begingroup$ 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? $\endgroup$
    – Zach
    Commented Apr 29, 2015 at 19:18
  • 3
    $\begingroup$ 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. $\endgroup$ Commented Apr 30, 2015 at 11:50
  • 1
    $\begingroup$ 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?” $\endgroup$
    – blackened
    Commented Apr 30, 2015 at 11:59
  • $\begingroup$ 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. $\endgroup$
    – Sulthan
    Commented Apr 30, 2015 at 13:55

6 Answers 6

48
$\begingroup$

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.

$\endgroup$
5
  • 1
    $\begingroup$ Why don't you just label them 00, 01, 02, etc.? You don't have to use explicit numbers. $\endgroup$
    – user88
    Commented Apr 29, 2015 at 17:12
  • $\begingroup$ This is one of the best SE answers that I've seen in a long time. $\endgroup$
    – dotancohen
    Commented Apr 29, 2015 at 17:57
  • 4
    $\begingroup$ Plottwist - Alice and Bob were very intelligent mice and already knew which one was poisoned... too bad no one could decipher their communications! $\endgroup$
    – corsiKa
    Commented Apr 29, 2015 at 19:52
  • $\begingroup$ Usually, to limit the test to "1 sip = 1 test", you have to mix the wines. $\endgroup$
    – Sulthan
    Commented Apr 30, 2015 at 13:55
  • 3
    $\begingroup$ 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. $\endgroup$
    – FvD
    Commented May 1, 2015 at 6:23
53
$\begingroup$

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.

$\endgroup$
5
  • 12
    $\begingroup$ I guess there is an ambiguity on what “two tests” mean. $\endgroup$
    – blackened
    Commented Apr 29, 2015 at 9:19
  • 18
    $\begingroup$ I think they would both die after 3rd sip from alcohol poisoning. $\endgroup$
    – Zikato
    Commented Apr 29, 2015 at 11:43
  • 1
    $\begingroup$ Populist badge, here you come! :P $\endgroup$
    – user88
    Commented Apr 29, 2015 at 18:27
  • $\begingroup$ This answer is better than mine, since it requires fewer sips in total. :) $\endgroup$ Commented Apr 30, 2015 at 1:37
  • 2
    $\begingroup$ 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 $\endgroup$
    – Eph
    Commented May 5, 2015 at 17:27
7
$\begingroup$

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.

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

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$.
$\endgroup$
6
  • 5
    $\begingroup$ How is this different from the answer given by Glen O two hours earlier? $\endgroup$ Commented Apr 29, 2015 at 13:49
  • 2
    $\begingroup$ It is the same method but I do think this is written more clearly. $\endgroup$
    – Chris
    Commented Apr 29, 2015 at 14:35
  • 1
    $\begingroup$ Then he could also edit the answer, instead of taking credit. $\endgroup$
    – Mathias711
    Commented Apr 29, 2015 at 16:53
  • 1
    $\begingroup$ Hmm, the tests seem to be different if you look closer… They're not 100% the same but they do use a similar method. $\endgroup$
    – Léo Lam
    Commented Apr 29, 2015 at 17:51
  • 1
    $\begingroup$ @LéoLam They are identical exept the bottles are relabeled. $\endgroup$
    – Taemyr
    Commented Apr 30, 2015 at 8:12
2
$\begingroup$

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...

Illustrated answer

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!

$\endgroup$
0
$\begingroup$

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.

$\endgroup$
3
  • 1
    $\begingroup$ Yet another duplicate answer. $\endgroup$
    – March Ho
    Commented Apr 29, 2015 at 15:34
  • $\begingroup$ Who else feed the mice 8 drips to confirm the 9th is toxic? $\endgroup$
    – Dorus
    Commented Apr 29, 2015 at 16:11
  • $\begingroup$ 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. $\endgroup$ Commented Apr 30, 2015 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.