Two rounds of experiments with mice tested for poison

Source: Internet
Author: User
Tags rounds

Everyone should have heard of this old topic: there are 1000 identical bottles, of which 999 are ordinary water and one bottle is poison. Any creature that drinks poison will die in a week. Now, you only have 10 mice and a week, how do you check out which bottle is poisonous?

The answer to this question is also classic: numbering the bottles from 0 to 999, then converting them all to 10-bit binary numbers. Get the first rat to drink. 1 to 1000 all binary digits the first is 1 of the bottle, let the second mouse drink all the binary number of the second is a 1 bottle, and so on. A week later, if the first mouse dies, the first digit in the binary number of the poison vial is 1; if the second mouse is not dead, you know the binary number of the poison vial, and the second one on the right is 0 ... The death of each mouse can determine the 10-bit binary number of one of them, so you can know the poison vial number.
Now, the interesting question is: 1, if you have two weeks (in other words you can do two rounds of experiment), in order to find the poison from 1000 bottles, how many mice do you need at least? Note that the mice that died in the first round of the experiment could not continue to participate in the second experiment.

Answer: 7 mice is enough. In fact, 7 mice were enough to find the poison from 3^7 = 2,187 bottles. First, all bottles are numbered from 0 to 2186, and then all are converted to 7-bit three-digit numbers. Now, let the first mouse drink all three decimal numbers. The first is a 2 bottle, let the second mouse drink all three decimal numbers and the second is 2 bottles, and so on. A week later, if the first mouse dies, he knows that the first digit of the poison vial is 2; If the second mouse is not dead, you know the third number of the poison vial, the second digit is not 2, it can be 0 or 1 ... That is to say, every dead mouse is determined by its own life, and the one who is responsible for the three-digit number is 2; but every living mouse can only be sure that the one that it is responsible for is not 2. As a result, the problem is about one weeks left. In the second round of experiments, let every living mouse continue his unfinished task and drink the one that is responsible for 1 of all bottles. In another week, the three-piece number of the poison vial will be revealed.

Similarly, we can prove that n mice T week time can be from (t+1) ^n a bottle to test the poison.

2, there are 700 bottles of water, a bottle of poisonous, small white mice drink a little, 20 hours dead, then at least how many mice will be able to find in 50 hours which bottle of water toxic?
Let's look at a topic that is simpler than this: how many mice would you use if you had only 20 hours to find out the poisonous potion?
Analysis: Only one round of experiments can be done in 20 hours. A mouse in the state after drinking any bottle of potions may only have two kinds: dead or not dead, apparently, death = drank poison, not Dead = not drinking poison. According to information theory, a small white mouse to do an experiment on the amount of information for I1=LOG2 (2) =1bit, and 700 bottles of potions found in a bottle of poison the amount of information required for I2=LOG2 (700), so the number of mice needed is i2/i1=log2 (700), rounded up to 10, That would theoretically require at least 10 mice. But how do you find out about this bottle of poison?
Algorithm: 10 mice in a row, each equivalent to a binary number of one, which can be set 0 = Not Dead = Not drinking poison, 1 = Dead = Drank poison. 10 mice can represent the number of States 2^10=1024>700, so enough. The 700 bottles are numbered in binary order, and the corresponding bits of the bottle are given a corresponding bit of white mouse to drink according to their number. For example, the 6th bottle of the binary code of 110, so from right to left 1th mice do not drink, and the 2nd, 3 mice are to drink a mouthful. If, after 20 hours, the 1th mouse is hung, and the 2nd and 3 mice are hung, the poison is numbered 110, or 6th bottles.

Back to the original question, the difference between the original question and the previous question is 50 hours, you can do two rounds of experiment. Of course, if the first round of experiments on the dead mice will not be able to do a second round of experiments, but this is no harm, can be solved in the same way. Theoretically, a small white mouse to do two rounds of experiments, there may be three kinds of states: the first round of hanging, the first round of wood hanging and the second round hung, from beginning to end all the wood hanging. Therefore, a small white mouse to do two rounds of experimental information is I1=LOG2 (3), and 700 bottles of the information needed to find a bottle of poison is still i2=log2 (700), so the need for mice for I2/I1=LOG3 (700), rounded up to 6 mice.
As for the specific algorithm is the same, but this time the code is 3 binary, we can set 0 = not die from beginning to end, 1 = The first round is not dead the second round died, 2 = The first round died. The corresponding bit of the small white mouse to drink the corresponding bit of the bottle 2. After 20 hours, if there is a small white mouse dead, you can determine the poison vial number some bit is 2, and the remaining bit may be 1, or 0, so the second round of experiment is the same as the binary system, can be the corresponding bit 2 of the bottle left, and then re-numbered to do the experiment. Theoretically the remaining number of mice is enough to complete the experiment.

Two rounds of experiments with mice tested for poison

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.