Gurmeet.Net
Gurmeet.Net
Puzzles
Puzzles

Poisoned Wine Barrels

Puzzle

An enemy spy has poisoned one out of 1000 barrels of wine in a king's cellar. Even a sip of the poisoned wine has potency to kill. However, the effects of the poison show only in 30 days. The king asks the royal jailor to identify the poisoned barrel within 30 days. What is the least number of prisoners the jailor must employ to identify the poisoned barrel?

Source

Solution

The jailor prepares 10 mixtures labeled 0, 1, 2, ..., 9. Wine from the i-th barrel is added to those mixtures that correspond to 1's in the binary representation of i. Thus it takes exactly 10 prisoners to find out the poisoned barrel.

Previous Puzzle: Perplexing Polynomial

Alice is allowed to choose an arbitrary polynomial p(x) of any degree with nonnegative integer coefficients. Bob can infer the coefficients of p(x) by only two evaluations as follows. He chooses a real number a and Alice communicates p(a) to him. He then chooses a real number b and Alice communicates p(b) to him. What values of a and b helped Bob succeed and how?

With two eggs and a building with 100 floors, what is the optimal strategy for finding the lowest floor at which an egg will break when dropped? Followup: What if the number of floors of the building is unknown?

12 Sep 2008
© Copyright 2008—2017, Gurmeet Manku.