Get the best out of our app
GFG App
Open App
Browser
Continue

Puzzle | Distribute the Water

Problem Statement: Suppose there are three containers; container I (3L), container II (5L), container III (8L). Container III is filled with 8L of water while the other two are empty. With the help of these 3 containers, how to distribute the water in equal volumes i.e. 4L in container II and, 4L in container III. Consider there is no loss of water when transferring it from one container to another.

Solution:
When there is no loss of water while transferring it from one container to another container. The only way to do the required task is to repeatedly transfer water from one container to another until one arrives at a favorable result.

Step 1: Fill the 8L container full.

Step 2: Pour water from an 8L to 3L container. Water in the 8L container is now 5L and the 3L container is now full.

Step 3: Pour water from 3L container to 5L container. Water in the 5L container is now 3L and the 3L container is now empty.

Step 4: Pour water from 8L container to 3L container. Water now in the 8L container is 2L and the 3L container is full.

Step 5: Pour water from a 3L to 5L container. The 5L container is now full and the water in the 3L container is now 1L.

Step 6: Pour water from 5L container to 8L container. The water in the 8L container is now 7L and the 5L container is now empty.

Step 7: Pour water from the 3L container into the 5L container. The 3L container is now empty and the water in the 5L container is 1L.

Step 8: Pour water from the 8L container into the 3L container. The water in the 3L container is now 3L and the water in the 8L container is 4L.

Step 9: Pour water from the 3L container into the 5L container. The 3L container is now empty and the water in the 5L container is now 4L.

Below is the table that summarizes the above solution:

My Personal Notes arrow_drop_up
Similar Reads