29.6k views
3 votes
If anybody has 8 litres full of oil and there are two 5 and 3 litres empty jerry can where as there is no another jerry can out of those. How we can divide the oil in 4 and 4 in jerry can?​

User AlgoRythm
by
3.3k points

1 Answer

3 votes

At the start, each can holds

• 5 L can : 0 L of oil

• 3 L : 0 L

Fill up the 5 L can completely:

• 5 L : 5 L

• 3 L : 0 L

Pour as much of the oil from the 5 L can into the 3 L can. This leaves you with

• 5 L : 2 L

• 3 L : 3 L

Empty the 5 L can:

• 5 L : 0 L

• 3 L : 3 L

Transfer the 3 L of oil into the 5 L can:

• 5 L : 3 L

• 3 L : 0 L

Fill up the 3 L can again:

• 5 L : 3 L

• 3 L : 3 L

Transfer as much of the oil as possible from the 3 L can into the 5 L can:

• 5 L : 5 L

• 3 L : 1 L

Empty the 5 L can:

• 5 L : 0 L

• 3 L : 1 L

Again, transfer the oil from the 3 L can to the 5 L can:

• 5 L : 1 L

• 3 L : 0 L

Fill up the 3 L can completely:

• 5 L : 1 L

• 3 L : 3 L

Transfer all the oil from the 3 L can to the 5 L can:

• 5 L : 4 L

• 3 L : 0 L

User Dumitru Hristov
by
3.3k points