Skip to content

Two pints from 7 and 11 pint jugs

Question

You need exactly 22 pints of water from a stream, but only have an unmarked 77-pint jug and an unmarked 1111-pint jug. A move is filling a jug, emptying a jug, or pouring from one jug into the other. What is the smallest number of moves that leaves exactly 22 pints in one jug?

Short answer

14. Repeatedly fill the 77-pint jug and tip it into the 1111, emptying the 1111 whenever full; the amounts left behind go 3,6,23,6,2 (adding 77 modulo 1111). A breadth-first search over jug states confirms that 1414 moves is the minimum.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution