Given three jugs with
pints in the first,
in the second, and
in the third, obtain a desired amount in one of the vessels by completely filling
up and/or emptying vessels into others. This problem can be solved with the aid of
trilinear coordinates (Tweedie 1939).
A variant of this problem asks to obtain a fixed quantity of liquid using only two initially empty buckets of capacities and and a well containing an inexhaustible supply of water.
This two bucket variant is used in the film Die Hard: With a Vengeance (1995). The characters John McClane and Zeus Carver
(played by Bruce Willis and Samuel L. Jackson) solve the two bucket variant
with two jugs and water from a public fountain in order to try to prevent a bomb
from exploding by obtaining 4 gallons of water using only 5-gallon and 3-gallon jugs.
General problems of this type are sometimes collectively known as "decanting problems."