Sign up to mark as complete
Sign up to bookmark this question
The King's Party
Someone breaks into the wine cellar of a king, where he stores 1000 bottles of wine. This person proceeds to poison one of the 1000 bottles, but gets away too quickly for the king's guard. Nobody knows which one he poisoned. The king needs the remaining 999 safe bottles for his party in four weeks. The king has ten prisoners who deserve execution. The poison takes just less than four weeks to take effect. Any amount of the poisoned wine will kill whoever drinks it.
How can he figure out which bottle was poisoned in time for the party?
How can he figure out which bottle was poisoned in time for the party?
Hint
Think about binary strings.
Solution
Since every prisoner can end up dead or alive, there are 2^10 = 1024 possible outcomes. Since 1024 > 1000, it's actually possible to use an approach using binary strings.
Convert this binary number to a decimal and that gives you the number of the poisoned wine.
- The king assigns each servant a number from 1 to 10.
- The king assigns each bottle a number from 0 to 999.
- 0: 000000000
- 1: 000000001
- 2: 000000010
- 3: 000000011
- 4: 000000100
- ...
- 999: 1111100111.
Convert this binary number to a decimal and that gives you the number of the poisoned wine.
Related Questions
Title | Category | Subcategory | Difficulty | Status |
---|---|---|---|---|
1 to 7 | Brain Teasers | Out of the Box | Medium | |
Ants on a Stick | Brain Teasers | Out of the Box | Easy | |
Calendar Dice | Brain Teasers | Out of the Box | Medium | |
Door to Offer | Brain Teasers | Out of the Box | Hard | |
Escape Plan | Brain Teasers | Out of the Box | Medium | |
Fair Dice | Brain Teasers | Out of the Box | Easy | |
Four Switches | Brain Teasers | Out of the Box | Easy | |
Fruit Bags | Brain Teasers | Out of the Box | Medium | |
Good or Bad Candy | Brain Teasers | Out of the Box | Easy | |
Infinite Chessboard | Brain Teasers | Out of the Box | Hard | |
Message Box | Brain Teasers | Out of the Box | Easy | |
Trader's Salary | Brain Teasers | Out of the Box | Easy |
Discussion
(1)
Please log in to see the discussion.