My friend posed this question to me:
I have a glass with 8 litres of water along with one empty 3 litre and an empty 5 litre glass. I have to pour 4 litres of water into his glass in one go. His glass is not calibrated. We do not know how much volume of water it can hold(but it is more than 4). I solved the problem in this way:
$\begin{matrix} 8 & 0 &0 \\ 3&5&0\\ 3&2&3\\ 6&2&0\\ 6&0&2\\ 1&5&2\\ 1&4&3\\ \end{matrix}$
Now I can pour the 4 litres from the 5 litre glass.
My question is that can I generalise this problem?
If I have $V_1$ volume of water in a glass which has a capacity of $V_1$ along with 2 other glasses of volume $V_2$ and $V_3$ such that ($V_2$ and $V_3$ $\lt$ $V_1$).My friend needs $V$ volume of water in one go.
And under what conditions will this generalisation fail?