The Emperor

Logic Level 3

You are the ruler of a medieval empire and you are about to have a celebration tomorrow. The celebration is the most important party you have ever hosted. You've got 1000 bottles of wine you were planning to open for the celebration, but you find out that one of them is poisoned.

The poison exhibits no symptoms until death. Death occurs within ten to twenty hours after consuming even the minutest amount of poison.

You have over a thousand slaves at your disposal and just under 24 hours to determine which single bottle is poisoned.

You have a handful of prisoners about to be executed, and it would mar your celebration to have anyone else killed.

What is the smallest number of prisoners which have to drink from the bottles to be absolutely sure to find the poisoned bottle within 24 hours?

Hint: It is much smaller than you first might think. Try to solve the problem first with one poisoned bottle out of eight total bottles of wine.

Image credit: Wikipedia Garitan


The answer is 10.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Peter Macgregor
Jul 2, 2015

Let's follow the hint and construct a solution with one poisoned bottle out of eight. We will show that only three slaves are needed to find the poisoned bottle.

First of all label each bottle in binary starting from zero and ending at seven

000... 001... 010.. . 011... 100... 101... 110... 111

Now make up three different potions.

For the first slave include liquid from every bottle with a one in the first position.

For the second slave include liquid from every bottle with a one in the second position.

For the third slave include liquid from every bottle with a one in the third position.

Now wait twenty hours and see which slaves have died.

If the first slave has died the poisoned bottle's label must have a one in the first position (or a zero if the slave is still alive).

If the second slave has died the poisoned bottle's label must have a one in the second position (or a zero if the slave is still alive).

If the third slave has died the poisoned bottle's label must have a one in the third position (or a zero if the slave is still alive).

Each of the eight possible outcomes for the slaves thus produces one of the eight labels and so indicates the poisoned bottle.

In an exactly similar way you can find one poisoned bottle out of 1024 = 2 10 1024=2^{10} bottles using 10 prisoners. Since we have only 1000 bottles, just add (or imagine) another 24 bottles of unpoisoned wine (or water)!

Moderator note:

For completeness, you have to show why 10 is the smallest. IE, that there isn't a "magical way" to only use 9 slaves.

This is because 9 slaves can only show at most 2^9=512 kinds of combinations.

IP WING CHUN ARIEL - 1 year, 2 months ago
Vishwa Tej
Jul 2, 2015

10 prisoners must sample the wine. Bonus points if you worked out a way to ensure than no more than 8 prisoners die.

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.

Here is how you would find one poisoned bottle out of eight total bottles of wine.

In the above example, if all prisoners die, bottle 8 is bad. If none die, bottle 1 is bad. If A & B dies, bottle 4 is bad.

With ten people there are 1024 unique combinations so you could test up to 1024 bottles of wine.

Each of the ten prisoners will take a small sip from about 500 bottles. Each sip should take no longer than 15 seconds and should be a very small amount. Small sips not only leave more wine for guests. Small sips also avoid death by alcohol poisoning. As long as each prisoner is administered about a millilitre from each bottle, they will only consume the equivalent of about one bottle of wine each.

Each prisoner will have at least a fifty percent chance of living. There is only one binary combination where all prisoners must sip from the wine. If there are ten prisoners then there are ten more combinations where all but one prisoner must sip from the wine. By avoiding these two types of combinations you can ensure no more than 8 prisoners die.

One viewer felt that this solution was in flagrant contempt of restaurant etiquette. The emperor paid for this wine, so there should be no need to prove to the guests that wine is the same as the label. I am not even sure if ancient wine even came with labels affixed. However, it is true that after leaving the wine open for a day, that this medieval wine will taste more like vinegar than it ever did. C'est la vie.

No one has else has to die. If we know that one bottle is poisoned. And that only one bottle is poisoned. Then that bottle has already been opened and drank from.

Christopher Felch - 5 years, 10 months ago

That is copied from http://www.folj.com/puzzles/very-difficult-analytical-puzzles.htm

activey the miner - 3 years, 1 month ago
Daniel Liu
Jul 2, 2015

Note that each prisoner will either die, or not die, giving you one bit of information. It takes 10 bits to represent all the positive integers 1024 \le 1024 , so certainly it can represent the first 1000 1000 positive integers (glasses) so you need 10 prisoners.

Moderator note:

Note that there are 1000 wine bottles, not 1024.

Suppose you have x x prisoners (designated by the letters A, B, C, D, etc.) You can assign each combination (A, B, ABC, BDF, AEFG, etc.) to a bottle. Therefore, the problem is to solve

n = 1 x ( x n ) = 1000 \sum_{n=1}^{x}\binom{x}{n}=1000 , where x x is the number of prisoners required to test 1000 bottles

Now, since n = 1 x ( x n ) = 2 x 1 \sum_{n=1}^{x}\binom{x}{n}=2^x-1 , it follows that

2 x = 1001 2^x=1001 , and

x = log 1001 log 2 x=\frac{\log{1001}}{\log{2}}

So the answer is 10 prisoners.

Sharky Kesa
Jul 2, 2015

Number each bottle in binary with each number having 10 digits. e.g. 1 = 0000000001, 59=0000111011, 498=0111110010, etc.

Let the first digit correspond to the first prisoner, the second digit to the second prisoner, the third digit to the third prisoner and so forth. If the digit is a 0, do not give the corresponding prisoner the bottle but if the digit is 1, give it to him.

After the time has passed, record the prisoners which have died and their corresponding digit place. This will give you the binary number for the bottle which has been poisoned.

Therefore, only 10 prisoners are needed. I guess you can prove that no lesser way can be done by bashing it out.

You can prove that 9 9 prisoners are not sufficient by the same method in my solution. 9 9 prisoners will give you 9 9 bits of information, which can cover at most 512 512 integers (glasses), which is not enough.

Daniel Liu - 5 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...