If there are 30 cans out of them one is poisoned if a person tastes very…

20252024

If there are 30 cans out of them one is poisoned if a person tastes very little he will die within 14 hours so they decided to test it with mice. Given that a mouse dies in 24 hrs. and you have 24 hrs. in all to find out the poisoned can, how many mice are required to find the poisoned can?

  1. A.

    29

  2. B.

    15

  3. C.

    6

  4. D.

    5

Attempted by 314 students.

Show answer & explanation

Correct answer: D

Key idea: use the fact that each mouse has two possible outcomes (alive or dead) in one 24-hour test. With m mice you can produce 2^m distinct outcome patterns, so you can distinguish up to 2^m different cans.

Compute the minimum m such that 2^m ≥ 30.

  • 2^4 = 16, which is less than 30, so 4 mice are not enough.

  • 2^5 = 32, which is at least 30, so 5 mice are enough.

Therefore the minimum number of mice required is 5.

Procedure to implement the test:

  • Label the 5 mice M1 through M5.

  • Assign each can a unique 5-bit binary code (for example, 00001, 00010, ..., up to 11110).

  • For each can, give a sample to mouse Mi if and only if the i-th bit of that can's code is 1.

  • After 24 hours, record which mice died. The pattern of dead/alive mice is the binary code for the poisoned can.

Brief example (smaller scale): with 3 mice you can distinguish up to 2^3 = 8 cans. Give samples according to 3-bit codes; the pattern of dead mice identifies which of the up-to-8 cans is poisoned.

Explore the full course: Tcs Preparation