[Math] Minimum number of objects required to figure out the issue

puzzlerecreational-mathematics

There 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 to you need to figure out which bucket contains the poison within one hour?

Best Answer

You can do it with $10$ pigs, based on the binary representation of a number. Mark the pigs $1, 2, ..., 10$. Given bucket number $n$, write $n$ in binary; every time the $k$th digit is $1$, have pig #$k$ drink.

Wait for pigs to die. Form the appropriate number, putting $0$'s for every living pig in the appropriate place, and $1$'s otherwise. The number formed marks the bad bucket.

Note that I'm assuming that the pigs can drink from a lot of buckets quickly, and that more than one pig can drink from a bucket.

Related Question