Water Bucket Problem Good for Grades 2-12

NCTM President Michael Shaughnessy
NCTM President Michael Shaughnessy

See http://www.nctm.org/about/content.aspx?id=26070 for the full article, from NCTM's president, Mike Shaughnessy.

Problem to Ponder—Water Bucket Conundrum:

This problem has crossed my path a number of times in various guises. Perhaps you have also seen a version of it.

You are staying at a rural cabin, and the only method to get water is to draw it from a well. A 4-gallon bucket and a 9-gallon bucket are the only containers for carrying water to the cabin. In one trip to the well, what whole number amount of water in gallons could you bring back to the cabin in the buckets? No other markings are on the pails, and you can’t do any estimating—you need to supply exact whole number amounts only!

What if you had a 4-gallon bucket and a 10-gallon bucket?
What if you had an n-gallon bucket and an m-gallon bucket?