Question:

A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighboring queen plots to kill the bad king and sends a servant to poison the wine. Fortunately (or say unfortunately) the bad king’s guards catch the servant after he has only poisoned one bottle. Alas, the guards don’t know which bottle but know that the poison is so strong that even if diluted 100,000 times it would still kill the king. Furthermore, it takes one month to have an effect.

The bad king decides he will get some of the prisoners in his vast dungeons to drink the wine. Being a clever bad king he knows he needs to murder no more than 10 prisoners – believing he can fob off such a low death rate – and will still be able to drink the rest of the wine (999 bottles) at his anniversary party in 5 weeks time. Explain what is in mind of the king, how will he be able to do so ? (of course he has less than 1000 prisoners in his prisons)

.

.

C

A

P

T

A

I

N

I

N

T

E

R

V

I

E

W

.

.

Solution: This is a very old problem and it’s more difficult if you don’t tell what’s the minimum numbers of prisoners required.

Firstly the question states – he knows he needs to murder no more than 10 prisoners, which is incorrect, the minimum number of prisoners he needs to murder is simply 1, since I can take 1000 prisoners and give them a sip from one bottle each, and at the end of the month only 1 prisoner will die and I will know which bottle contains the poison.
So you need to rephrase your question as – he knows he needs no more than 10 prisoners and the answer for this is- Number all bottles using binary digits. Assign each prisoner to one of the binary flags. Prisoners must take a sip from each bottle where their binary flag is set. You will need almost 10 prisoners and you can number the prisoners such that no more than 8 of those prisoners die.