Water Jugs

Measure the target amount using two jugs. You can only fill, empty, or pour until one jug is full or empty.

Goal: 4 L in either jug

Left · 3 L
Right · 5 L

Measure by moving water.0 moves / minimum 6

Explore the state graph

Each line is a legal move. The largest dot is your current state; medium dots and solid lines mark your trail.

03 L →↑ 5 L0 L / 0 L3 L / 0 L0 L / 5 L3 L / 5 L0 L / 3 L3 L / 2 L3 L / 3 L0 L / 2 L1 L / 5 L2 L / 0 L1 L / 0 L2 L / 5 L0 L / 1 L3 L / 4 L3 L / 1 L0 L / 4 L

Current state: 0 L / 0 L

The horizontal axis is the left jug; the vertical axis is the right. Dots show amounts reachable from empty jugs; arrows show move direction.

How to play

Fill, empty, or pour between the jugs until either jug holds the target. Pour until the source is empty or the destination is full; you cannot stop halfway. The water supply is unlimited.

Learn more

Read more about it: The story of the water jug puzzle →