Combine the Jugs
Goldman Sachs
You have a 5 gallon jug and a 3 gallon jug. How would you measure exactly 4 gallons of water?
Answer
To start with, we only know the measures of 3 and 5 gallons, without an obvious way to combine these to get 4. So let's see what else we can get by combining them, and perhaps then the path towards 4 will show.
If we take away 3 from 5 we can in theory get a 2 gallon measure. How to do this in practice? First fill the 5 gallon jug to the top, and then pour from it into the 3 gallon jug until the 3 gallon jug is full. There is now 2 gallons left in the 5 gallon jug. To preserve this, we pour out the liquid from the 3 gallon jug and pour in the 2 gallons from the 5 gallon jug.
Okay now we have a measure of 5, 3, 2, but also 1 gallon (difference btween the 3 gallon jug and the 2 gallons currently sitting in it). We know $5-1=4$ so let's just take away this one gallon measure from the 5 gallon measure. In pracice, fill again the 5 gallon jug to its top, and then pour out into the 3 gallon jug (which already contains 2 gallons of water) until it's full. We will have emptied 1 gallon from the 5 gallon jog and are left with 4 gallons.