Topic:
There are 1000 barrels of wine, of which 1 barrels are poisonous. And once eaten, the toxicity will occur after 1 weeks. Now we use small mice to do the experiment, in 1 weeks to find the barrel of poison, ask the minimum number of mice, how to detect (the less the use of mice the better, note that the toxicity of 1 weeks before the seizure, and a week after the results must be, so time is tight)
Ideas:
Why need mice to do experiments, obviously according to the Rat's life and death to determine the toxicity of alcohol, each mouse only 2 states, dead and alive, n mouse is this n dead or alive state, should be sensitive to the binary system, vaguely to perceive 1000 this number and n relationship, 2^n can express how much information? 2^10=1024, think of here we can try to use 10 mice to do some experiments.
Steps:
1000 barrels of wine in 10-bit binary number, from 0000000001 to 1111101000, from the 1000 binary number of the search for poison, the poison must also be a combination of 0 and 1, so the question into how to figure out how each of this combination is, We first think about how to get the first (right to left) is 0 or 1, the conclusion is as long as all the first is 1 of the wine to a mouse to drink, if the mouse eventually died, the poison must be the first bit 1, if the mouse is still alive, The first place of the poisoned wine must be 0. And so on, we use 10 mice to determine how much each of the poisoned poison is. In order to get the poison of the binary number, converted into 10 binary is only the first few barrels.
Reprinted from: http://site.douban.com/196781/widget/forum/12602268/discussion/51922413/
1000 barrels of wine to find a bucket of poison algorithm