Poisoned wine

You got 100 bottles of wine and only one is poisoned: you want to know which one is. You can make rats drink the wine of the different bottles (they can test one or several bottles each). You only know if they are alive or dead the next day and you want your answer the next day (so you can’t test one rat after the other). How many rats at least do you need to find out which bottle is poisoned ? (Look for the smallest number of rats)

Hint: search the problem at first with 7 bottles


The answer is 7.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Nathan Weill
Jul 2, 2018

I give the answer for 7 bottles, it’s the same for 100. Let’s number the bottles in binary from 0 to 6 :

0<->000

1<->001

2<->010

3<->011

4<->100

5<->101

6<->110

We then need 3 \boxed{3} rats Why? Each rats tests the bottles where there is a « 1 » in the k position for k in {1,2,3}. Then if the first rat dies the poisoned bottles is necessarily the number 4 (always starting from 0). You have then 7 different cases whether it’s only the rat 1,2 or 3 who dies or it’s both rats 1 and 3 or 1 and 2 or 2 and 3 or 1 and 2 and 3 who die. Same logic for 100 which is 1100100 in binary

Number the 100 bottles of wine from 0 to 99 and then convert them to base 2 that is from 0 2 0_2 to 110001 1 2 1100011_2 . There is a total of 7 binary digits. Now use 7 rats to represent the 7 2 n 2^n -digit d n d_n , where n = 0 , 1 , 2 , 3 , 4 , 5 , 6 n=0,1,2,3,4,5,6 . The d n d_n rat is to drink from the bottle with d n = 1 d_n = 1 . Since each of the 100 bottles has a unique 7-digit binary code, The poisoned bottle will kill the specific digital rats. For example, if none of the 7 rats dies, then bottle 0 is poisonous. If d 0 d_0 , d 1 d_1 and d 2 d_2 rats die, then bottle 7 ( 11 1 2 111_2 ) is poisonous. Therefore, we need only 7 \boxed{7} rats of which at most 6 will be killed.

Decimal d 6 d 5 d 4 d 3 d 2 d 1 d 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 97 1 1 0 0 0 0 1 98 1 1 0 0 0 1 0 99 1 1 0 0 0 1 1 \begin{array} {crrrrrrr} \text{Decimal} & d_6 & d_5 & d_4 & d_3 & d_2 & d_1 & d_0 \\ \hline 0 & 0 & 0 &0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 &0 & 0 & 0 & 0 & 1 \\ 2 & 0 & 0 &0 & 0 & 0 & 1 & 0 \\ \cdots & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot \\ 97 & 1 & 1 &0 & 0 & 0 & 0 & 1 \\ 98 & 1 & 1 &0 & 0 & 0 & 1 & 0 \\ 99 & 1 & 1 &0 & 0 & 0 & 1 & 1 \end{array}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...