You have a 5-liter jug, a 3-liter jug, and an unlimited supply of water. You must measure out exactly 4 liters. You fill the 5L jug, pour it into the 3L jug until the 3L is full. You then empty the 3L jug. You take the remaining water from the 5L jug and pour it into the empty 3L jug. You fill the 5L jug entirely full one more time. To achieve exactly 4 liters remaining in the 5L jug, how many liters must you now pour from the 5L jug into the 3L jug?
Explanation: Let's trace the state of the jugs (5L jug, 3L jug):
Fill 5L -> (5, 0)
Pour to 3L -> (2, 3)
Empty 3L -> (2, 0)
Pour remaining 2L into 3L -> (0, 2). The 3L jug now holds 2 liters, meaning it has exactly 1 liter of free capacity remaining.
Fill 5L -> (5, 2)
Pour from the 5L jug into the 3L jug until it is full. Since the 3L jug only has 1 liter of space left, you pour exactly 1 liter from the 5L jug. The 5L jug now contains 5 - 1 = 4 liters. The answer is 1 liter.