Water jugs
A 3-litre jug, a 5-litre jug and a tap: can you measure exactly 4 litres, and in how few steps? Decide by the gcd rule; count by the shortest route.
How it plays
Two jugs with no marks, a tap and a drain. A step fills a jug to the top, empties it, or pours one into the other until the first is empty or the second full. Can you end with exactly the amount asked in one jug — and how few steps does it take?
The rule: only multiples of the jugs’ greatest common divisor can ever appear, because filling and emptying add or remove whole jugfuls and pouring only moves water between them. Every such multiple up to the larger jug can be made.
Levels make the jugs bigger without end. The fewest steps are found by searching every sequence, shortest first; the shortest always turns out to be one of the two simple routines — keep filling one jug and pouring it into the other — and the working says which.
Keys
Space starts and skips ahead · 1–9 pick · Enter submits · Esc stops. On a phone, tap.
What it trains
This practises the gcd argument and planning short sequences of moves, on jug puzzles. It claims nothing wider.
Learn
How to get better at water jugs: the method, the techniques, what each new level asks of you, and the traps the wrong answers are made of.
Your approach to each question
- Read the two jug sizes and the amount asked for. First check the size: if the amount is more than the larger jug holds, it can never be in one jug.
- Find the greatest common divisor of the two sizes. Every amount you can ever make is a multiple of it, and every multiple up to the larger jug can be made. That settles any “can you?” question.
- For “fewest steps”, run the two simple routines in your head — keep filling the small jug and pouring it into the large, or keep filling the large and pouring it into the small — and count the steps each takes.
- The fewer of the two is the answer. A search of every sequence confirms the shortest is always one of these two routines, so there is nothing cleverer to find.
Techniques and tricks
Euclid for the gcd
Replace the larger size by the remainder when divided by the smaller, and repeat until one is 0. The other is the gcd. Most pairs here come out at 1, which means every amount up to the large jug is possible.
e.g. gcd(8, 12): 12 ÷ 8 leaves 4, 8 ÷ 4 leaves 0, so 4. With 8 and 12 you can make 4, 8 and 12 litres, nothing else
The multiples test
If the amount is not a multiple of the gcd, the answer is no — however many steps you try. Filling and emptying move whole jugfuls, and pouring only shifts water between jugs.
e.g. 6 and 9 litres, asked for 4: gcd is 3, and 4 is not a multiple of 3. No
Fill the large, pour off the small
Fill the large jug, pour it into the small one, empty the small, pour again. The large jug then holds the large size minus one, two, three … small jugfuls — fast for amounts like that.
e.g. 4 and 9, asked for 1: fill 9; pour into 4, leaving 5; empty the 4; pour again, leaving 1. Four steps
Fill the small, pour into the large
Fill the small jug, pour it into the large one, repeat; empty the large whenever it is full. The large jug collects small jugfuls, wrapping round its own size — fast for amounts near a few small jugfuls.
e.g. 3 and 5, asked for 1: fill 3, pour; fill 3, pour until the 5 is full, leaving 1. Four steps
Count both, keep the smaller
Count every fill, every pour and every empty as one step. Work both routines to the end and take the lower count; the other is one of the wrong options.
e.g. 3 and 5, asked for 4: from the large jug it takes 6 steps — fill 5, pour, empty 3, pour, fill 5, pour — and from the small one 8. So 6
As the levels climb
- Each level makes the jugs bigger. “Can you?” questions start with jugs up to about 8 litres and grow by about 2 litres a level, without end.
- After the first two levels, “can you?” pairs may share a factor of 4, 5 or 6, not just 2 or 3. Euclid becomes worth doing properly rather than by eye.
- “Fewest steps” questions grow too, but stop at jugs of about 14 litres: past that the counts run to dozens and stop being a puzzle. If you untick “Can it be measured?”, the ladder ends there.
- If Time pressure is on, each question gets 25 seconds plus 1.5 for each level. Do the gcd before anything else; it is the quickest way to a “no”.
Traps to avoid
- Saying yes because the amount fits. 4 litres fits in a 9-litre jug, but with jugs of 6 and 9 it is still impossible: check the gcd, not just the size.
- Saying yes because the gcd divides it, when the amount is bigger than both jugs. The answer is about one jug, and no jug holds more than its size.
- Picking the first routine you think of. The count from the other routine is always among the options; the shortest is whichever routine is shorter for this amount.
- Not counting the empties. Emptying a jug down the drain is a step like any other. Leaving one out gives a count one short, and that count is offered too.
How to practise
- Use “Kinds of question” to practise “Can it be measured?” alone until the gcd is instant, then “In how few steps?” alone to drill the two routines.
- Switch “Answer steps by” to “Typing the number” once you choose right every time. With options shown, the two routine counts sit side by side; typing makes you finish both yourself.
- Track each routine as a pair of numbers — 0,0 → 0,5 → 3,2 — not as a story. The working writes the shortest route the same way, so you can check yours step by step.
Levels
It is untimed unless you turn the clock on. There is no last level: at least one dial turns without end. Your level is judged on your last ten answers, every ten: 90% moves you up, below 80% moves you down, which holds most people near four in five right.
All of it is in the settings beside Start — how many answers a judgement looks at and how often it recalibrates, the thresholds, the time, which questions, how many options, and whether you see each verdict at once or review them together at the judgement. You can also jump to any level.
More logic
All games →Trap questions
Bat-and-ball questions with fresh numbers every time: the first answer that comes to mind is wrong. Catch it, then work it out.Codebreaker
Deduce a hidden code from ● and ○ clues. Each turn, pick the guess that fits every clue so far. Longer codes and more letters, without end.Higher or lower
Find a hidden number from what each guess says: higher or lower. Halve what is left each time and you never need more than log₂ guesses.Lights Out
Each press flips a cell and its four neighbours. Turn every light off in the fewest presses — par is the exact optimum, solved over GF(2).Sliding tiles
Slide the numbered tiles into order, one into the gap at a time, within a par set by the exact fewest moves — 2×3 up to 3×4 boards.River crossing
Wolf, goat and cabbage; missionaries and cannibals; soldiers and boys. Get everyone across without breaking a rule, in the fewest crossings.