Current location - Training Enrollment Network - Mathematics courses - What is the principle of binary rat poison test?
What is the principle of binary rat poison test?
To accomplish a relatively large task with as few mice as possible, we should think of logarithmic decomposition of the problem.

So it is not hard to imagine that 210 =10242 {10} =10242?

10= 1024.

Solution:

Binary coding.

First of all, 1000 barrels of wine are binary coded according to 1~ 1000, because 2 10 2 {10} 2?

10 = 1024 & gt; 1000, so 10 bit binary is required.

So only 10 mice are needed, and each mouse only drinks the wine with the corresponding number 1.

Then give the following code to 10 mouse.

The first 00000000 1

The second 0000000 10

The third is 0000000 100.

Tenth place 100000000

Examples of results: The wine with the number1000100011is poisonous.

Using binary notation in electronic computers can save equipment.

Theoretically, it can be proved that ternary system saves the most equipment, followed by binary system. However, because binary has advantages that other binary systems, including ternary systems, do not have, most electronic computers still use binary systems. In addition, because only two symbols "0" and "1" are used in the binary system, Boolean algebra can be used to analyze and synthesize the logic circuits in the machine. This provides a very useful tool for designing electronic computer circuits.

The above contents refer to; Baidu Encyclopedia-Binary