Wednesday, November 18, 2009

The Jugs and the Ocean


You're at the beach and you have two opaque jugs. One holds 13 gallons, the other holds 7. For whatever reason, you need exactly 2 gallons. You have no other containers. How do you do it?

Fill the 7 jug and pour it all into the 13. Fill up the 7 again and pour into the 13 until the 13 is full. You will be left with 1 gallon in the 7 jug. Empty the 13 and pour the 1 gallon from the 7 into the 13. Now repeat the process: fill the 7 and pour it into the 13, then fill the 7 again and pour into the 13 until the 13 is full. Once the 13 is full, you will have 2 gallons left in the 7.

No comments:

Post a Comment