Water Pouring Puzzles
Classic brain teasers where you measure exact amounts using unmarked containers through filling, emptying, and pouring.
Water Pouring Puzzles
Water pouring puzzles are classic brain teasers where you have to measure an exact amount of liquid using only a few unmarked containers. You can fill them, empty them, or pour from one to another—but only until one is completely full or completely empty.
They look simple at first, but solving them takes careful thinking and a bit of creativity. That's why they're a favourite both for children who love puzzles and for teachers looking for engaging problem-solving activities.
The Story
Imagine stepping into an alchemist's laboratory. The shelves are packed with jars, bottles, and flasks, but not a single one has markings to measure with. To finish the experiment, you must measure the ingredients exactly. One drop too many, and the potion fails!
This is the world of water pouring puzzles.
Example Puzzle
A river flows beside the lab. You have two barrels: one holds 3 gallons, the other 5 gallons.
How can you measure exactly 4 gallons of river water?
Rules
You can:
- Fill any container completely from the river (infinite source)
- Empty any container back into the river
- Pour from one container to another (until the source is empty or the target is full)
Solution
- Fill the 5-gallon barrel from the river
- Pour into the 3-gallon barrel until full (leaves 2 gallons in the 5-gallon barrel)
- Empty the 3-gallon barrel
- Pour the 2 gallons from the 5-gallon barrel into the 3-gallon barrel
- Fill the 5-gallon barrel again
- Pour into the 3-gallon barrel until full (only 1 gallon fits)
- The 5-gallon barrel now has exactly 4 gallons!
Key Insights
The GCD Rule
The amounts you can measure are multiples of the greatest common divisor (GCD) of the container capacities.
For containers of 3 and 5 gallons:
- GCD(3, 5) = 1
- So you can measure any integer from 1 to 8 gallons!
Variations
Water pouring puzzles come in many flavours:
| Variation | Description |
|---|---|
| With river | Unlimited water source—you can fill and empty freely |
| Without river | Fixed amount of water—you can only pour between containers |
| Move limits | Must solve in a maximum number of pours |
| Forbidden amounts | Certain amounts are not allowed in any container |
| Multiple goals | Split water into equal portions |
Try It Yourself
Use the sandbox below to create your own water pouring puzzles:
- Choose 2, 3, or 4 containers
- Set their capacities
- Optionally prefill them with water
- Enable or disable the "river" (infinite source)
- Set a goal and try to solve it!
Practice with the linked problems below, or create your own custom puzzles to challenge friends.
Mathematical Background
Water pouring puzzles are related to:
- Bézout's identity: For integers (a) and (b), there exist integers (x) and (y) such that (ax + by = \gcd(a, b))
- State-space search: The puzzle can be modelled as a graph where each state is a tuple of water levels
- Invariants: The total water (in closed systems) remains constant
These connections make water pouring puzzles excellent for developing mathematical thinking and algorithmic reasoning.
Design custom puzzles with 2-4 containers, set capacities and initial water levels, enable or disable the river, and add constraints like move limits or forbidden amounts. Share your puzzles with friends via a link!
Open Sandbox