🔴 Riddle #76 of 240
An 8-litre jug is full of water; a 5-litre jug and a 3-litre jug are empty. There is no tap and no drain — water can only be poured between jugs, and none may be spilled. How do you end with exactly 4 litres in the 8-litre jug and 4 litres in the 5-litre jug?
Think about it first. When you're ready:
Seven pours
Pour 8 into 5, 5 into 3, 3 into 8, 2 into 3, 8 into 5, 5 into 3 and 3 into 8, reaching (4, 4, 0); a breadth-first search confirms seven pours is the minimum.