Two pints using 7 and 11 pint jugs
Question
You have two unmarked containers holding exactly and pints, plus an unlimited water source. One operation is filling a container completely, emptying it completely, or pouring from one into the other until the source is empty or the target is full. What is the fewest operations needed to end up with exactly pints in one of the containers?
Short answer
. Repeatedly fill the 7, pour it into the 11, and empty the 11 whenever it fills; the 7-pint jug then holds , then the 11 holds , then , and finally the 7 is left with after the 14th operation. A breadth-first search over jug states confirms no shorter route exists.
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