Back

Poisoned Wine (Extension)

Medium
Created: February 3, 2026

Before the king gets to administer the bottles of wine to the prisoners, an advisor stops him. He says that if more than 8 prisoners die, the townspeople might get angry and revolt. How can the king administer the wine so that no more than 8 prisoners die?

Hint

You still need 10 prisoners. Look at the binary representations that would cause 9 or 10 prisoners to die.

Solution

Answer: Relabel certain bottles to avoid binary numbers with 9 or 10 ones.

From the previous puzzle, we know that a minimum of 10 prisoners are needed to find the poisoned bottle. But let’s notice the following 10-digit binary numbers.

01111111112=51110111111112=76711011111112=89511101111112=95911110111112=99111111011112=100711111101112=101511111110112=101911111111012=102111111111102=102211111111112=1023\begin{aligned} 0111111111_2 &= 511 \\ 1011111111_2 &= 767 \\ 1101111111_2 &= 895 \\ 1110111111_2 &= 959 \\ 1111011111_2 &= 991 \\ 1111101111_2 &= 1007 \\ 1111110111_2 &= 1015 \\ 1111111011_2 &= 1019 \\ 1111111101_2 &= 1021 \\ 1111111110_2 &= 1022 \\ 1111111111_2 &= 1023 \end{aligned}0111111111210111111112110111111121110111111211110111112111110111121111110111211111110112111111110121111111110211111111112=511=767=895=959=991=1007=1015=1019=1021=1022=1023

These are the only bottles of wine that are fed to 9 or 10 prisoners: 10 of these numbers would require that the corresponding bottle be administered to 9 prisoners, and 1 number requires all 10 prisoners.

Only 5 of our bottles (511, 767, 895, 959, and 991) are affected by this, so we can relabel them to another number that doesn’t break our new rule. A simple relabelling would be:
511 → 1001 (1111101001)
767 → 1002 (1111101010)
895 → 1003 (1111101011)
959 → 1004 (1111101100) 991 → 1005 (1111101101)

With this new strategy, the king can find the poisoned bottle, with at most 8 prisoners dying.

Try These Next