1000 bottles and 10 mice problem

There are 1000 identical bottles, of which 999 are ordinary water and one is poison. Any creature that drinks the poison will die after a week. Now, you only have 10 guinea pigs and a week, how do you find out which bottle has poison in it?

According to 2^10=1024 , so 10 rats can determine which bottle is poisonous in 1000 bottles. The specific implementation is the same as the principle of 3 mice determining 8 bottles.

000=0

001=1

010=2 

011=3 

100=4 

101=5 

110=6 

111=7
One bit represents a mouse, 0-7 represents 8 bottles. That is to say, mix the medicines in bottles 1 , 3 , 5 , and 7 for rat 1 (see the first column from the right); mix the medicines in bottles 2 , 3 , 6 , and 7 for rat 2 ; Mix the medicines in bottles 5 , 6 and 7 and give it to rat 3 , whichever rat dies is marked as 1 . If rat 1 is dead, rat 2 is not dead, and rat 3 is dead, then bottle 101=5 is poisonous. In the same way , 10 mice can identify 1000 bottles. [The title made a clever blindfold,
Change 1024 to 1000

 

If you have two weeks (in other words you can do two rounds of the experiment), how many mice do you need at least to find the poison from 1000 bottles? Note that mice that died in the first round of experiments could not continue to participate in the second experiment.

Answer: 7 mice are enough. In fact, 7 rats are enough to find poison from 3^7 = 2187 bottles. First, number all bottles from 0 to 999 , then convert all to 7 -digit ternary numbers. Now, let the first mouse drink all the bottles whose ternary numbers are 2 from the right , the second mouse drink all the bottles whose ternary numbers are 2 from the right , and so on. After a week, if the first rat is dead, you know that the ternary number of the poison bottle is 2 ; if the second rat is not dead, you know that the ternary number of the poison bottle is 2. The second digit from the right is not 2 , it can only be 0 or 1... That is to say, each dead mouse is determined with its own life, and the digit in the ternary number that it is responsible for is 2 ; but Each living rat can only be sure that the bit it is responsible for is not 2 .

So, the problem is reduced to the situation when there is only one week left. In the second round of experiments, let each living mouse continue its unfinished task and drink all the bottles whose responsible one is 1 . In a week's time, the ternary numbers for the poison bottles will all be revealed.

Summary: n mice and t weeks can detect poison (one bottle) from (t+1)^n bottles. (

 

8 bottles, 1 mouse but 3 lives, time limit of 3 weeks

Rats first drink the medicine with the number 1 as 1 from the right , and then shrink to the bottle number 1 , 3 , 5 , and 7 when they die , and use it for one week; the second week, and the bottle with the number 1 as the second from the right, and so on.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326873703&siteId=291194637