Water Jug Puzzle
0 movesMeasure exact amounts with unmarked jugs
Split 8L into 4L · 4L · 0L
How to play the water jug puzzle
- Pour liquid between jugs that have no markings until the jugs hold the amounts the puzzle asks for. The number on a jug shows how much it holds right now.
- Tap a jug to pick it up, then tap the jug you want to pour into. You can also drag one jug onto another. On a computer, keys 1–4 pick the jugs from left to right, and Ctrl+Z (⌘Z on a Mac) undoes a move.
- Liquid keeps flowing until the jug you pour from is empty or the other jug is full. You can’t stop halfway: with no markings, there is no way to tell when you have poured “half”.
- In the tap puzzles (blue water), “Fill” fills a jug from the tap and “Empty” pours it away. Filling and emptying count as moves too.
- There are 20 puzzles each in Easy, Medium and Hard, plus a daily puzzle that is the same for everyone. Each puzzle shows the fewest moves possible. Solve it in that many and you get a ★.
- Stuck? “Hint” lights up the next move of the shortest solution from where you are. “Solve” plays the shortest solution one move at a time. If you use Solve, that round doesn’t count toward your record or the daily puzzle (hints are fine). If you close the page, you can pick up where you left off.
How to solve water jug puzzles
- Keep pouring around in one direction. With three jugs, always pour in the same order: big → middle → small → back to big. If the middle jug is empty, fill it from the big jug. Otherwise pour the middle jug into the small one, and whenever the small jug is full, pour it back into the big jug. Repeat, and you will reach the goal.
- Try the other direction too. You can also go big → small → middle. For every three-jug and tap puzzle in this game (including the daily puzzles), the shorter of the two directions is the fewest moves possible — we checked by searching every possible state. For the four-jug puzzles that split into three equal parts, start by making one part with two of the jugs.
- Tap puzzles work the same way. Fill the small jug, pour it into the big jug, and empty the big jug whenever it is full. Repeat (or do it the other way around, filling the big jug first).
- Which amounts can be measured? Only multiples of the greatest common divisor of the jug sizes. With 4L and 6L jugs, for example, you can never get an odd amount. Every puzzle in this game can be solved.
Water jug puzzle answers
8, 5 and 3: split 8 into 4 and 4 (7 moves)
The best-known version: an 8L jug is full, and the 5L and 3L jugs are empty. It is Easy puzzle 10 in this game.
| Move | 8L | 5L | 3L | Pour |
|---|---|---|---|---|
| 0 | 8 | 0 | 0 | Start |
| 1 | 3 | 5 | 0 | 8L → 5L |
| 2 | 3 | 2 | 3 | 5L → 3L |
| 3 | 6 | 2 | 0 | 3L → 8L |
| 4 | 6 | 0 | 2 | 5L → 3L |
| 5 | 1 | 5 | 2 | 8L → 5L |
| 6 | 1 | 4 | 3 | 5L → 3L |
| 7 | 4 | 4 | 0 | 3L → 8L |
3 and 5: measure exactly 4 (the Die Hard 3 riddle, 6 moves)
With a tap, a 3-gallon jug and a 5-gallon jug, get exactly 4 gallons. In this game it is Easy puzzle 4, in liters.
| Move | 3L | 5L | Action |
|---|---|---|---|
| 0 | 0 | 0 | Start |
| 1 | 0 | 5 | Fill 5L |
| 2 | 3 | 2 | 5L → 3L |
| 3 | 0 | 2 | Empty 3L |
| 4 | 2 | 0 | 5L → 3L |
| 5 | 2 | 5 | Fill 5L |
| 6 | 3 | 4 | 5L → 3L |
About the water pouring puzzle
Water pouring puzzles, also called water jug problems, decanting problems or measuring puzzles, date back to medieval times and appear in Bachet’s 17th-century mathematics book. Splitting 8 into 4 and 4 with 8-, 5- and 3-unit jugs is the classic example. A version with a tap and two jugs, 3 and 5 gallons, appears in the 1995 movie Die Hard with a Vengeance.
In Japan the puzzle is called aburawake-zan, “oil splitting”, after a problem in Jinkōki (1627), a best-selling math book of the Edo period by Yoshida Mitsuyoshi: split 10 measures of oil into 5 and 5 using 7- and 3-measure containers. That is Medium puzzle 1 here (9 moves). This is why the splitting puzzles in this game use golden oil, while the tap puzzles use water.
FAQ
How is the fewest number of moves worked out?
The game checks every state the puzzle can reach and finds the shortest way to the goal. “Hint” and “Solve” use the shortest solution from where you are now.
Why can’t I stop pouring halfway?
The jugs have no markings, so you can’t tell when you have poured exactly half. Pouring until one jug is empty or the other is full is the only way to know the amounts for sure. That is the rule of the puzzle.
When does the daily puzzle change?
Once a day, at midnight Japan time (15:00 UTC). Everyone gets the same puzzle that day. It rotates between halving, tap and three-way split puzzles. Solve it every day to build a streak.