You have a 3-litre jug and a 5-litre jug, and as much water as you need. How do you measure out *exactly* 4 litres using only these two jugs?

This is a classic logic puzzle, sometimes used in finance and engineering interviews many years ago. It also was featured in the movie Die Hard with a Vengeance!

#### Solution

- Fill up the 3-litre jug, and pour it all into the 5-litre jug
- Fill up the 3-litre jug again, and use it to fill up the 5-litre jug – the 3-litre jug now has exactly 1 litre left
- Empty out the 5-litre jug
- Pour the 1 litre from the 3-litre jug into the 5-litre jug
- Fill up the 3-litre jug, and pour it all into the 5-litre jug (which already had 1 litre in it) – the 5-litre jug now has exactly 4 litres in it!

Alternate solution:

- Fill up the 5-litre jug, and use it to fill up the 3-litre jug. The 5-litre jug now has exactly 2 litres left.
- Empty out the 3-litre jug
- Pour the remaining 2 litres in the 5-litre jug into the 3-litre jug.
- Fill up the 5-litre jug again, and use it to fill up the remaining capacity of the 3-litre jug – the 5-litre jug now has exactly 4 litres in it!