The Water Jugs

Fill, empty, pour — measure exactly 4 gallons with jugs of 3 and 5 (a police-grade emergency, according to Die Hard 3). The state space of two jugs folds into a triangular billiard table where every legal move is a bounce, and the reachable measurements are exactly the multiples of one number the two jugs agree on.

view
Goalexactly 4 gallons in a jug0 moves

Simon says: put exactly four gallons on the scale. You have a 3-gallon jug, a 5-gallon jug, an infinite fountain and a drain. Nothing is marked. You may fill a jug to the brim, empty one out, or pour one into the other until the source runs dry or the target is full — never a dribble more.

lens
Two jugs with their current water levels0of 3 gal40of 5 gal
The tick marks are ours, not the jug's — a real jug is a smooth glass cylinder. Only "brim full" and "bone dry" are measurable events.
moves
shots
no moves yet
Step 1 of 5 — A fountain, two jugs, no markings

A jug with no markings can only tell you two things: "I am full" and "I am empty". So every amount you can ever produce is built by adding whole 3s and whole 5s and taking whole 3s and 5s away — never a splash more or less. Pouring cannot invent a fraction.

That means the amounts you can reach are exactly the whole-number combinations 3x + 5y. Three and five share no common factor beyond 1, so those combinations cover every whole number: 3 + 3 + 3 − 5 = 4, and there is your fourth gallon.

Swap in a 4 and a 6 and the arithmetic turns hostile. Both are even, so every fill and every dump moves an even number of gallons, and every level you can ever produce is even. Five is odd. No amount of cleverness, patience, or Samuel L. Jackson changes that.