You have a 5 L jug and a 3 L jug. By pouring water between them, what is the minimum number of steps to get exactly 4 L in one of the jugs?
Answer
6
The correct answer is 6 — Pour from the 5 L jug into the 3 L jug until the 3 L jug is full; the 5 L jug will then contain exactly 4 L (6).
Step-by-step solution
- Fill the 5 L jug (1).
- Pour from the 5 L jug into the 3 L jug until the 3 L jug is full (2).
- Empty the 3 L jug (3).
- Pour the remaining 2 L from the 5 L jug into the 3 L jug (4).
- Fill the 5 L jug again (5).
- Pour from the 5 L jug into the 3 L jug until the 3 L jug is full; the 5 L jug will then contain exactly 4 L (6).
Common mistake: Counting only fill and pour actions, missing empty step
Concept tested: Water jug algorithm
Published · How this solution was prepared and checked
← All Jugs and Mugs questions