8 days, 5 prisoners, 1 barrel of poisoned wine

Logic Level 3

A great king has eight days to prepare for a party where he would like to serve wine. Of the many barrels of wine in the cellar, one is poisoned, but he doesn't know which one.

He checks his prison, and realizes he has only five prisoners that he can use to test the wine.

One sip of wine from the poisoned barrel will cause a prisoner to die within 24 hours. (For the purposes of this problem, assume that in this day and age prisoners are expendable)

With only eight days to go before the party, what is the largest number of barrels of wine he can have in his cellar, and still be able to determine with certainty which one has the poisoned wine in time for the party?


Similar to, and inspired by, this problem by Arjen Vreugdenhil.
Image credit: http://www.bkwinetours.com/


The answer is 59049.

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.

1 solution

Geoff Pilling
Nov 22, 2016

For d d days and p p prisoners, the general solution to this type of problem is given by:

N ( d , p ) = ( d + 1 ) p = ( 8 + 1 ) 5 = 59049 N(d,p) = (d+1)^p = (8+1)^5 = \boxed{59049}

I will try to put together a more detailed explanation as to why this is the case, but meanwhile please take a look at the solution provided by Arjen here for some insights. His solution can be extrapolated to any number of days and any number of prisoners.

I think you want "die within 24 hours" instead of "die after 23 hours" (which potentially includes die after 1234 hours)

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

Ah, good point... Done.

Geoff Pilling - 4 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...