Three Litres, Five Litres, Four Wanted

  • Easy
  • Measuring and weighing
  • Tests: Reachable amounts and the greatest common divisor

The puzzle

You have a three-litre jug and a five-litre jug, neither with any markings, and a tap with as much water as you like.

You can fill a jug to the top, empty one completely, or pour from one into the other until either the source is empty or the destination is full. Measure exactly four litres.

Stuck?

One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.

Hint 1

Every amount you can produce is a whole number of litres. Which whole numbers?

Hint 2

Getting one litre into the three-litre jug is the useful intermediate step.

Show the answer Hide the answer

Fill the five, pour into the three (two left in the five), empty the three, move the two across, fill the five again, and top up the three - which takes one litre and leaves four.

How to get there

Fill the five-litre jug. Pour from it into the three-litre jug until that is full; two litres remain in the five.

Empty the three-litre jug, then pour the two litres into it. The three-litre jug now holds two and has room for exactly one more.

Fill the five-litre jug again, and pour from it into the three-litre jug. It accepts only one litre before it is full - leaving exactly four litres in the five-litre jug.

The technique worth keeping

Every amount reachable with two jugs is a multiple of the greatest common divisor of their sizes. Here that is gcd(3,5) = 1, so every whole number up to five is reachable and the puzzle must be solvable. With a four and a six the gcd is two, and no odd amount is possible at all - which is worth knowing before you spend ten minutes pouring.