In the Hollywod blockbuster "Die Hard 3 - With a Vengeance", Bruce Willis and Samuel L. Jackson characters are faced
with a challenge to diffuse a bomb:
In a fountain of water there's a bomb with a
weight meter, which only gets deactivated if it detects the weight of a vase with four gallons of water.
In the pond there are two empty vases, one with five gallons capacity, another with three gallons of capacity.
Our Hollywood heroes can only use these to achieve the four gallons of liquid weight filling them with water from the fountain.
There's only a few minutes to place exactly four gallons (one once to much or too less and it's boom) of water weight on top of a bomb's (de)activating weight-meter.
What's the solution?
It's not very clear in the movie, but there is indeed one:
Fill the 5 gallons vase to top, then drop it to fill the 3 gallons. The 5 gallons vase will now have two remaining gallons of water, and the 3
gallon vase will be filled.
Now empty the 3 gallons vase.
After emptying it, pour the two gallons that are still in the 5 gallon vase into the, now empty, 3 gallons vase.
The 3 gallon vase now has two gallons of water, and the 5 gallons vase is empty.
Fill the 5 gallons vase to top.
Since the 3 gallons vase still has two gallons of water, from our previous operation, it will only allow for 1 gallon more. Pour the 5 five gallons vase into the 3 gallons one.
Notice that you'll only be able to pour up to one gallon, to fill the 3 gallons vase, and once you're done, the 5 gallons vase will have exactly the needed... Four gallons of water.
Place the vase in the weight meter, bomb is off and you can go on to Live Free or Die Hard.
© Alvaro M. Rocha - All rights reserved.
http://www.alvaromrocha.com