Logic puzzle : Smallest number of prisoners required?

  • Context: Undergrad 
  • Thread starter Thread starter atom jana
  • Start date Start date
  • Tags Tags
    Logic Puzzle
Click For Summary

Discussion Overview

The discussion revolves around a logic puzzle involving determining the smallest number of prisoners required to identify a single poisoned bottle out of 1000 within a 24-hour timeframe. The conversation explores various strategies, assumptions about the poison, and the implications of additional factors such as disease affecting the prisoners.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants propose that 10 prisoners are needed, using a binary numbering system for the bottles where each prisoner represents a bit position.
  • Others question the practicality of the solution, suggesting that feeding large quantities of wine to prisoners could be harmful, even if the poison does not kill them.
  • A participant raises concerns about false positives, arguing that if a prisoner dies for reasons unrelated to the poison, it complicates the identification of the poisoned bottle, suggesting that 1000 prisoners would be necessary to eliminate ambiguity.
  • One participant introduces a variation of the puzzle, stating that if prisoners have a 10% chance of dying from a disease, a larger number of prisoners would be required to maintain a 99% certainty of identifying the poisoned bottle, proposing a method involving multiple sets of prisoners.
  • Another participant suggests the possibility of diluting the poisoned bottle with the others to avoid fatalities, prompting a humorous response about engineering perspectives.

Areas of Agreement / Disagreement

Participants express differing views on the number of prisoners required, with some supporting the initial calculation of 10, while others argue for a higher number due to the risk of false positives and the introduction of disease. The discussion remains unresolved regarding the optimal number of prisoners needed under the new conditions presented.

Contextual Notes

Assumptions about the poison's effects, the health of the prisoners, and the implications of false positives are not fully resolved, leading to varying interpretations of the problem's requirements.

atom jana
Messages
13
Reaction score
1
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 you must have to drink from the bottles to be absolutely sure to find the poisoned bottle within 24 hours?
 
Mathematics news on Phys.org
Since ##\log_2(1000) = 9.96##, you'll need ##10## prisoners.
 
So I'd say 10 prisoners are needed where you'd number the bottles in binary and associate a each bit position with a prisoner.

They drink multiple bottles based on whether their bit is a 1 in the bottles number and after 24 hours the prisoners who died are used set the 1 bits of the bottle in question.

Now you can sing the song:

999 bottle of wine on the shelf, 999 bottles of wine... take one down and pass it around ... 998 bottles of wine on the shelf...
 
10

You assign each of the 10 prisoners a power of 2, from 20 = 1 to 29 = 512. You label each bottle by a number from 1 to 1000 in binary. Then you make the 10 prisoners drink from each bottle for which they would represent a one in the binary number. Once they have died, you read off the bottle number from who died.
 
Are we really going to feed 500 glasses of wine to each prisoner? If the poison doesn't kill them, that will!
 
The other answers came in as I was typing. Now I look like an idiot for using spoiler tags :oops:
 
  • Like
Likes   Reactions: ProfuselyQuarky
micromass said:
Are we really going to feed 500 glasses of wine to each prisoner? If the poison doesn't kill them, that will!
atom jana said:
after consuming even the minutest amount of poison
I guess a drop of each bottle will suffice.
 
atom jana said:
What is the smallest number of prisoners you must have to drink from the bottles to be absolutely sure to find the poisoned bottle within 24 hours?
Actually, you have to be careful about false positives: what if a prisoner dies, but for a reason unrelated to the poison? To be absolutely sure, you would need 1000 prisoners, each assigned to a bottle, and eliminate all bottles for which a prisoner dies in case of multiple deaths.
 
  • Like
Likes   Reactions: Pepper Mint and jedishrfu
  • #10
So, since this puzzle is clearly too easy for PF:
There is also a disease at the prisons and all prisoners are affected. The probability of any prisoner dying withint 24 hours is ##0.1##. How many prisoners do you need now so that you are ##99\%## certain that you identify the correct wine?
 
  • Like
Likes   Reactions: jedishrfu and DrClaude
  • #11
DrClaude said:
I guess a drop of each bottle will suffice.

Hard to tell, it is the dose that makes the poison.
 
  • Like
Likes   Reactions: jedishrfu and DrClaude
  • #12
And now the Princess Bride:

 
  • Like
Likes   Reactions: Evo, Pepper Mint and DrClaude
  • #13
micromass said:
So, since this puzzle is clearly too easy for PF:
There is also a disease at the prisons and all prisoners are affected. The probability of any prisoner dying withint 24 hours is ##0.1##. How many prisoners do you need now so that you are ##99\%## certain that you identify the correct wine?

Let me try to solve this in a few ways. We again need to use 10 persons to test the wines are previously specified. But now, a person can also die of the disease and not only of the wine. An obvious but naive solution would be to duplicate the number of prisoners. So instead of using 10 prisoners, we will use ##10n## prisoners for ##n\geq 1## an odd natural number. We arrange the prisoners as follows, the first set of ##10## is ##(a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1)## and the last set of ##10## prisoners is ##(a_n, b_n, c_n, d_n, e_n, f_n, g_n, h_n, i_n, j_n)##.

So we get ##10n## prisoners for ##n## odd and we wait for ##24## hours. Then we will look at the ##a##-prisoners: ##a_1##, ..., ##a_n##. If the majority lives, then we will say that the ##a## prisoners live. We do the same with the ##b## prisoners, the ##c## prisoners, etc. In this way, we form a virtual prisoner ##(a,b,c,d,e,f,g,h,i,j)## which is the average of the ##10n## prisoners. This prisoner is then used to find the poisoned wine.

So let's find out how big ##n## should be. The wrong wine is picked if ##a## is decoded incorrectly or if ##b## is decoded incorrectly, etc. Let's find the probability for ##a## being decoded incorrectly:

Let's say the correct value of ##a## is dead. Then there is no way that there could be an error.
Let's say the correct value for ##a## is living. There could be an error if more than ##n/2## people die. The probability of one person dying is ##0.1##. The probability of more than ##n/2## people dying can be found by ##\mathbb{P}\{X>n/2\}##, where ##X## is a binomially distributed random variable with ##n## trials and with ##p=0.1##. We can find this exactly by ##\sum_{n/2<k\leq n} \binom{n}{k} (0.1)^k (0.9)^{n-k}##. We use the central limit theorem however to see that ##X\sim \frac{Z - n\cdot 0.1}{\sqrt{n\cdot 0.1\cdot 0.9}}##, to find that the probability is essentially ##\xi :=\mathbb{P}\{Z> \sqrt{n\cdot 0.1\cdot 0.9}\frac{n}{2} +n\cdot 0.1\}##, where ##Z## is the standard normal distribution. So this value ##\xi## is the probability for error in the worst possible ##a## case.

Now we need to find the probability of error in the total code. There is no error if all of ##a##, ##b##, ##c##, ... are decoded correctly. This happens with probability ##(1-\xi)^{10}##. We wish this probability to be ##>0.99##. So we wish to find ##n## such that
1-\xi = \sqrt[10]{0.99} = 0.9989955
By using a normal distribution table, we find that this is true iff
\sqrt{n\cdot 0.1\cdot 0.9}\frac{n}{2} +n\cdot 0.1 &gt; 3.088899
Some easy computations gives us ##n=7##. So in this case, we need ##70## people.

Of course, other systems are possible of coding this information. This is the research field of error detection and correction. In this field, there is an immense amount of possible codes that might apply to this situation. https://en.wikipedia.org/wiki/Error_detection_and_correction
 
  • Like
Likes   Reactions: jedishrfu and Choppy
  • #14
Can you dilute the poisoned bottle with the other 999 and serve all 1000 without killing anyone?
 
  • #15
tobyr65 said:
Can you dilute the poisoned bottle with the other 999 and serve all 1000 without killing anyone?

You must be an engineer...
 
  • Like
Likes   Reactions: jedishrfu and jackwhirl

Similar threads

Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 67 ·
3
Replies
67
Views
16K
  • · Replies 28 ·
Replies
28
Views
10K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 21 ·
Replies
21
Views
6K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 91 ·
4
Replies
91
Views
48K
  • · Replies 7 ·
Replies
7
Views
4K