Wednesday, 4 December 2019

Rat and wine puzzel

I will start with the small number of bootles and rats and then extend.
Let's consider rat 1 and only 2 bottles out of which one of them contains poison.
If the rat 1 drinks bottle 1 and die then bottle 1 contains the poison, but if not them the bottle 2 contains the poison.
Therefore 1 rat is required to test 2 bottles.
If we have 2 rats, then let's figure out how many bottles can be checked.
Rat 1 is given a mixture of 1 and 2
Rat 2 is given a mixture of 2 and 3
If rat 1 and 2 die then the bottle 2 is poisoned.
If rat 1 dies and rat 2 survives then bottle 1 is poisoned.
If rat 1 survives and rat 2 dies then the bottle 2 is poisoned.
If both the rats survive then the bottle 4 is poisoned.
Therefore, with 2 rats I am able to check 4 bottles.

Now let's start with 3 rats.
Rat 1 is given a mixture of 1,2,3,4
Rat 2 is given a mixture of 3,4,5,6
Rat 3 is given a mixture of 1,3,5,7

If rat 1 dies, number 2 contains the poison
If  rat 2 dies, number 6 contains the poison
If rat 3 dies, the number  7 contains the poison
If  all the 3 rats die, then number 3 contains poison
If  only 1 and 2 die the number 4 contains poison
If none dies number 8 contains the poison

Hence till now with 3 rats, I can check 8 bottles.
I can notice the pattern,
If there is 1 rat then the number of bottles check is 2
If there are 2 rats then the number of the bottles checked is 4
If there are 3 rats then the number of the bottles checked is 8

Therefore 2^n( 2 to the power n) where n is the number of rats.
hence 10 rats are enough to check 1000 bottles as 2^10= 1024
but for 9 rats I am not able to figure out as only 512( 2^9) bottles can be checked.



No comments:

Post a Comment