There are 30 cans, one of which is poisoned. A person who tastes even a small…

2025

There are 30 cans, one of which is poisoned. A person who tastes even a small amount of the poison will die within 14 hours, so instead they decide to test the cans using mice. A mouse that drinks the poison dies within 24 hours, and the entire testing must be completed within 24 hours. What is the minimum number of mice required to identify the poisoned can?

  1. A.

    29

  2. B.

    15

  3. C.

    6

  4. D.

    5

Attempted by 2 students.

Show answer & explanation

Correct answer: D

Concept: To identify one poisoned item among N possibilities using test subjects whose only observable outcome is “dies” or “survives” within the time limit, use binary encoding: assign each possibility a unique binary code, and let each test subject represent one bit. With k test subjects there are 2k distinct die/survive patterns, so k subjects are enough to uniquely identify one item among N possibilities exactly when 2k ≥ N.

Application:

  1. There are 30 cans, and exactly one is poisoned; each can must get a unique die/survive signature across the mice used.

  2. With k mice there are 2k possible signatures, so we need 2k ≥ 30.

  3. Check k = 4: 24 = 16, which is less than 30 — not enough signatures to cover every can.

  4. Check k = 5: 25 = 32, which is at least 30 — enough signatures.

  5. Assign each can a distinct 5-bit binary code between 1 and 30. For a given can, feed its liquid to every mouse whose bit is 1 in that can's code.

  6. Within the 24-hour window, observe which mice die; reading the die/survive pattern as a binary number identifies exactly which can was poisoned.

  7. So the minimum number of mice required is 5.

Cross-check: The number of cans that can be distinguished grows as a power of two with the number of mice, not linearly.

Mice (k)

Maximum distinguishable cans (2k)

Enough for 30 cans?

3

8

No

4

16

No

5

32

Yes

This confirms that 5 mice are both necessary and sufficient, while 3 or 4 mice fall short.

Explore the full course: Tcs Live Preparation