Two Jugs: 3 L and 5 L
Read the puzzle
There is a 3 L jug, a 5 L jug, a tap and a drain. Filling a jug from the tap, emptying a jug down the drain, or pouring one jug into the other each counts as 1 move. A pour stops when one jug is empty or the other is full. The jugs have no markings. What is the fewest number of moves to end with exactly 4 L in the 5 L jug?
Filling, emptying or pouring a jug counts as 1 move each. Fewest moves to get exactly 4 L in the 5 L jug?
Start by filling the big jug.
6 moves
Fill 5, pour into 3, empty 3, pour the 2 L into 3, fill 5, top up 3: 4 L stay in 5.
How to solve it
Write the state as (3 L jug, 5 L jug) and track it after every move.
Start by filling the big jug: (0, 5). Pour it into the small jug until that is full: (3, 2). Empty the small jug: (0, 2). Pour the 2 L across: (2, 0). Fill the big jug again: (2, 5). Top up the small jug, which only needs 1 L: (3, 4). That is 6 moves, and the 5 L jug holds 5 - 1 = 4 L.
The usual wrong answer comes from starting with the small jug. Fill 3, pour, fill 3, pour (the big jug takes only 2 L, leaving 1 L), empty 5, pour the 1 L across, fill 3, pour: that also reaches 4 L, but in 8 moves. Another slip is forgetting to count the empty or the pour steps.
The answer is 6 moves. Quick check: 4 = 5 + 5 - 3 - 3, so the big jug is filled twice and the small jug is filled from it twice, with one empty and one transfer in between.
Learn the method: How to Solve Water Jug Puzzles, Step by Step