There is a king who wants to throw a party in 48 hours and he wants to serve a total of 240 barrels of wine at the party. Unfortunately, he knows that one of the barrels have been poisoned and he does not know which one. When imbibed, the poison takes up to 24 hours to kill.
In order to determine which barrel the poison is in, the king wants to use his prisoners as taste testers. Now, since he wants to be an example of mercy and kindness in his kingdom, he wants to use the fewest number of prisoners to test the barrels. How many prisoners should he use?
Note: 240 is not necessarily the maximum number of barrels required to test with this number of prisoners.
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.
But if the king is so merciful, he should have used 120 prisoners. First day, each takes a barrel. If all survive they take another one. Only one dies.
Log in to reply
@Alija Bevrnja If all survive the first day, then have 119 prisoners try 119 of the remaining barrels. 0.8% chance that noone will die, because if noone dies the last remaining barrel must be poisoned. :D
yes and also drinking wine for a prisoner is not any harm
they are drinking wine that was prepared for a royal feast
as at the end of the day only one person dies
so why not bring all the prisoners to drink it
@Sharky Kesa Why can't he give each barrel to the same prisoner after a gap of 1 second and find the "exact" time he dies and then subtract "exact" 24 hours? This will only use 1 prisoner.
Log in to reply
No, it takes about 24 hours, not exactly. A fever doesn't last exactly 2 days, but maybe between 18 to 60 hours..
Now i know that this might be stupid but since there is literally only one poisoned barrel he could easily take 240 prisoners give them a number let all of them drink a glass of wine from the barrel with their number on and then see which one of them dies in the next 24 hours. I mean no matter how you see it one guy will die.
Is there a way to prove that 5 is the minimum? I'm getting stuck on this part.
Log in to reply
Bash it out.
Log in to reply
hmmm...if there were more days, we can generalise by writing the numbers in higher bases too.For instance, if there were 9 days, we can write them as decimals.
Wonderful resolution
The king used the least number of prisoners, but killed more prisoners that necessary.
In the practical sense, it will not have the same effect on all the testers and if someone dies an hour early or later, the king would have the wrong barrel lol.
Drinking that much wine:
might empty the barrel :-P
might make it take much less than 24 hours.
Best solution I think is getting 119 testers to taste the wine. 1/200 chance no one dies. ;-)
Clever answer. :)
But king is not an example of mercy and kindness, I'll do far better.
Why not 1?. 1 prisoner can be forced to take a barrel at time interval of 6 mins or less.so in 1st 24 hr prisoner would tested all the barrels and in next 24 hrs time of death can be observed. E.g-if the prisoner dies in 18 mins of next 24 hrs then barrel no.3 is poisoned
If 30 mins is the observation gap that can decide which barrel is the cause of death, then 5 prisoners are enough to find the poisoned barrel. Each prisoner tastes a barrel of wine every 30 mins. So a prisoner can taste 48 barrels in 24 hours. 5 prisoners can taste all 240 barrels in 24 hours. 2 24 5 = 240.
PS: those remaining 239 prisoners are very lucky to taste 48 barrels of wine continuously every half and hour in a day.
Log in to reply
I agree with you it is ingenious the answer is 5. But I found better than 5.
waiting for the confirmation of the delay of killing time between 23 to 24 hours to write my solution.
Log in to reply
The wine takes 24 hours to kill. But you get just enough time to take it out before the party starts. That's why slightly less than 24 hours.
you said in the question : "... the poison takes slightly less than 24 hours to kill." this means some time between 23 and 24 hours. Yes or No?
Log in to reply
I didn't write that. The problem statement has been modified by other moderators. I have fixed the wording back to what it should be. Is it clearer?
Log in to reply
I see your modification. still the same question do you accept 23 to 24 hours as good interval of time to kill the wine tester?
Log in to reply
@Mr X – Yes, but you are not able to measure it.
Log in to reply
@Sharky Kesa – how come I can't measure it!!! I found a better solution than 5 prisoners. with the delay of 23 to 24 hours for the poison to kill.
Log in to reply
@Mr X – Because then it ruins the problem. That was the original wording, but people kept reporting it. It had been removed but people are still getting confused. I've added it back. To use measurement is to 'cheat'.
Log in to reply
@Sharky Kesa – and what you are doing is not measuring time?!!
anyway it is too late your changes for me. my answers were considered wrong because of a not well formulated text.
Log in to reply
@Mr X – No, I'm waiting for when the prisoners die. There's enough time difference (1 whole day) so you know the difference in time when the prisoners die.
Log in to reply
@Sharky Kesa – tell me frankly, which is the smallest interval of time you can distinguish? 2 hours? 3 hours? or 4 hours? than I may give you a better solution than yours.
Log in to reply
@Mr X – The time interval you can differentiate is a day. The time interval you can differentiate is not necessary for this logic problem. You use your logic!
label barrels in a grid (1,1) through (24,24) so it works even for 24^2 barrels. Prisoner x drinks the barrels labelled (1,n) in the first hour, (2,n) in the second etc... And the hour he dies subtract 24 to get the x value. Same for prisoner y but he drinks from barrels labelled (m,1) in the first hour, (m,2) in the second etc... You can get through up to 625 barrels if you extend the grid to a 25x25. The barrel labelled (x,y) is poisoned where x=hour of prisoner x's death-24 and y=hour of prisoner y's death-24
@Sharky Kesa please check my solution for why the answer is actually 2
It says UP TO 24 hours.. so it could be shorter.. so you'd have no way of knowing which barrel it was.. so you'd need at least 120 prisoners to be sure. This is stupid. How can I solve logic puzzles if the logic in the fomulation of the question is faulty!? And then the "note" should say: 240 is not necessarily the maximum number of barrels you are ABLE to test with this number of prisoners in this method. Using "required" here implies you could test less barrels and still know.
WRONG! it is far more then 5 ot says kills within 24 hrs- not kills at 24 hours that means they could die anytime within 24 hours- making the number of prisoners needed much higher
no of barrels=240 no of days =2 if 1day =24 hrs so 2 days=48 hrs n o of prisoners= 240/48=5 The question is done in hours because according to the question its given that poisoned drink kills aperson within 24 hrs
This is not a correct solution.
I agree that the question is a little bad. But i;m not agree with your logic , the question say that he have 48 hours from now , right? If i drink a glass of wine now ,possibly poissoned , i will die over 24 hours , if i will drink another glass with wine over 1 hour(from now) i will die over 24 hours (25 from now) . So , if will drink over 23 hours a poissoned wine ,defintely i will die over 47 hours from now. So i think the answear is probably 10 prisoners .
It says UP TO 24 hours.. so it could be shorter.. so you'd have no way of knowing which barrel it was..
I believe that this is a poor problem. If you really wanted to minimize the number of endangered prisoners, you would feed each prisoner a glass of wine from barrels 1 - 120, and wait 24 hours. If a prisoner dies, you have found your poisoned wine. If not, each prisoner should then drink all but one of the remaining bottles. If one of them dies, you have again found your poisoned wine. If not, the final bottle is poisoned. In this way, you will lose at most one prisoner, and there is a 1/200 chance that no one will die at all.
Problem Loading...
Note Loading...
Set Loading...
There is a really ingenious reason why the answer is 5.
The king numbers the barrels in 5 digit ternary. The first digit refers to the first prisoner, second to second, and so forth. Now, each digit is either a 0, 1 or 2. If the digit is 0, don't give it to the prisoner. If the digit is 1, givde it to the prisoner at the start. If the digit is 2, give it to the prisoner after 24 hours.
He records which prisoners die at which hour. This will be the key to the poisoned barrel.
Say that the 2nd prisoner died at 24 hours, the 3rd prisoner died at the 48th hour and the 5th prisoner died at 24 hours. The key for the barrel would be 01201, which is the 46th barrel. Overall, there can be a maximum of 243 barrels.