S
shivshikha
Guest
You have 8 litres of milk and you have an 8 litre can, 5 litre can and a 3 litre can.
How can u get 4 litres of milk ?
How can u get 4 litres of milk ?
Ashok Kumar Dabas (May 19, 2003 03:04 p.m.):
Let me try,
1. Fill 5 litre can with 5 liter
2. Fill 3 litre can from 5 litre can. Now 2 litre is left in the 5 litre can. put into 8 litre can.
--Don't forget the 8 litre can......
3. Again fill the 5 litre can from 3 litre can and the remaining milk.
4. Again fill 3 litre can from 5 litre can. Put the remaining 2 litre in 8 litre can.
5. You got 4 litre in 8 litre can.
Anurag Kadyan (May 19, 2003 04:32 p.m.):
8 ltr (E); 5 ltr (F); 3 ltr (T)
State 1: 8 0 0
E ------> F
State 2: 3 5 0
F ------> T
State 3: 3 2 3
E <------ T
State 4: 6 2 0
F ------> T
State 5: 6 0 2
E ------> F
State 6: 1 5 2
F ------> T
State 7: 1 4 3
So now we have the 5 ltrs container that contains 4 ltrs of milk.
Shikha Chaudhary (May 19, 2003 07:08 p.m.):
Anurag,
Very elegant, explanatory and systematic approach !!!!
Good job!
Shikha
We use essential cookies to make this site work, and optional cookies to enhance your experience.