29. Poison Bucket Puzzle There are 1,000 buckets,One of them contains poison,The rest of them are filled with water. They all look the same.If a pig drinks that poison, it will die within 30 minutes.What is the minimum number of pigs you need to figure out which bucket contains the poison within one hour? Added 10 April 2014 Show Hint Show Solution Hint: Consider using binary representation to identify the buckets. Solution: You need a minimum of 10 pigs.Label the buckets from 0 to 999 in binary (which requires 10 bits). Each pig can represent a bit in the binary number. If a pig drinks from a bucket and dies, it indicates a '1' for that bit position; if it lives, it indicates a '0'. By testing all 10 pigs, you can determine the exact bucket containing the poison.
Comments (0)
No comments yet. Be the first!
Add a Comment or Suggest an Answer