135k views
1 vote
A 9litre jug is full of water. I have three cups which can hold 7litres, 2litres and 4litres respectively. Find a way to pour water from the jug between the cups so that I end up with exactly 3 litres in three of the vessels

1 Answer

2 votes

Step-by-step explanation:

Here's a solution in 8 pours. The list here has the form ...

from vessel ⇒ to vessel; (vessel contents for vessels 9, 7, 4, 2)

The starting state is (9, 0, 0, 0).

  1. 9⇒4 (5, 0, 4, 0)
  2. 4⇒7 (5, 4, 0, 0)
  3. 9⇒4 (1, 4, 4, 0)
  4. 4⇒7 (1, 7, 1, 0)
  5. 7⇒2 (1, 5, 1, 2)
  6. 2⇒9 (3, 5, 1, 0)
  7. 7⇒2 (3, 3, 1, 2)
  8. 2⇒4 (3, 3, 3, 0) . . . . desired ending state

Steps 6 and 8 can be swapped, as the order in which vessels 9 and 4 are filled to the 3 level doesn't matter.

User Knd
by
4.9k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.