A man runs his car out of gas thereby completely emptying his 16 gallon tank. He only has a 3, a 6, and a 11 gallon container (and fortunately a wagon to carry the containers in) in his trunk. He has nothing else in which he can carry gas. He walks a few miles to a gas station, and as luck would have it the gauge on the pump is broken so he can not use that to measure the fuel. He is in a pretty remote area with only one gas station for miles. Gas costs $3.09^{9}, and he only has a $50. Using only the containers provided, and only walking once to and from the gas station, how can he get exactly 16 gallons of gas into his car?
There is actually one more conainer that is exactly 16 gallons: the gas tank.
Give the gas station $50. and ask for $50. worth of gas. Put it in the largest two containers. It's the gas station's problem that their gauge is broken, so either they can figure out some other way to give you an exact amount (either 16 gallons, or $50. worth which is about 16.13 gallons), or just get 17 gallons with the promise of giving back one gallon later.
When back at the car, fill up the gas tank with 16 gallons. The remainder will be in one of the containers.
The problem didn't say you had to transport exactly 16 gallons

Posted by Larry
on 20070924 00:03:16 