5
$\begingroup$

Given three containers of specified volume, how many different volumes can you measure ?

For example, suppose we have cans with capacities 2, 3, 4 litres. We can measure :

1 litre by filling the 3 litre can and pouring it in the 2 litre can.

2, 3, 4 litres are trivial.

5 litres by filling both the 2 and 3 litre cans.

6 litres by filling the 4 litre can with 3 litres and filling the 3 litre can fully or filling the 2 and 4 litre cans.

7 litres by filling the 3 and 4 litre cans.

8 litres by getting 6 litres and filling the 2 litre can.

9 litres by filling all the cans.

The answer for this case is 9.

Is there a general way to answer this for three capacities a, b, c?

2 Answers 2