Can you make exactly 4 liters using only a 3-liter jug and a 5-liter jug? No scale, no measuring lines — just those two jugs. This famous puzzle became even more widely known after appearing in the movie "Die Hard 3" as a bomb-defusing problem, but it's actually a classic math puzzle passed down from long before that.
The rules are simple. You can only fill a jug all the way, empty it completely, or pour from one jug into another (until the receiving jug is full or the pouring jug is empty) — just these three moves. With no measuring cup or markings, you have to repeat these three moves to make an exact amount. For the 3L/5L problem: fill the 5L jug, pour it into the 3L jug — that leaves 2L in the 5L jug. Empty the 3L jug, transfer that 2L over, refill the 5L jug, and pour into the 3L jug (which already has 2L, so it only takes 1L more) — that leaves exactly 4L in the 5L jug.
There's a surprising mathematical fact hidden in this puzzle. If the two jugs hold a and b liters, every amount you can make with them is exactly a multiple of the greatest common divisor (GCD) of a and b. Since the GCD of 3 and 5 is 1, in theory you can make any whole-number amount starting from 1L. But if you used a 4L and a 6L jug instead, the GCD would be 2, so you could never make an odd number of liters (1L, 3L, 5L…) — only even amounts.
Why is that? No matter how many times you repeat fill, empty, and pour, the amount of water in a jug can always only be expressed as "some whole multiple of a liters plus some whole multiple of b liters" (adding or subtracting). And it's a known mathematical fact that the set of numbers you can build from such combinations is exactly the multiples of the GCD of a and b (this is called "Bézout's identity"). That's why a GCD of 1 lets you make every whole number, while a GCD of 2 or more restricts you to its multiples.
This kind of "make an exact amount with limited tools" problem shows up in real life too — measuring out an amount using whatever containers you have on hand when there's no exact measuring cup, or splitting an exact amount of liquid using only two differently-sized bottles. A similar principle appears in computer science as well — the Euclidean algorithm (the method for finding the GCD) comes from exactly this same idea of "repeatedly subtracting to find the answer."
When solving this with kids, it's good to let them try trial and error on their own first, without hints. After some fumbling, they'll find the "oh, this is how it works" feeling themselves — and that process itself is great practice for logical thinking. If they get stuck, use the hint button to check just the next step, then let them pick up and keep solving on their own — that way they still get the sense of achievement.
On our activity page, you can take on a new puzzle every time, with the two jug sizes and target amount randomized. Click the fill, empty, and pour buttons to make the target amount, and check across several combinations whether only multiples of the GCD really are achievable.