once upon a time a king planned for a party.. he invited so many people including kings from near and far kingdoms he ordered 1000 bottle of wine for the party. 24 hours before the party began; the king found a piece of paper in one of the wine boxes, the paper says that one bottle from the 1000 is poisoned. one drop of this bottle is enough to kill a person but after nearly 12 hours. the king was not able to cancel the party; thus he decided to test the bottles on his prisoners. what is the minimum number of prisoners he needs to determine the poisoned wine bottle???
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.
lets suppose we have 3 prisoners.. we will give a drop from a bottle to the first prisoner, from another bottle to the second and from another one to the third, then from another bottle to the first and second prisoners, to the second and third, then to first and third prisoners, and finally to the three of them. so we have tested (2^3)-1 bottles. if we have 1000 bottle we need 10 prisoners. note that (2^9)-1=511 and (2^10)-1=1023.