**Problem :**

How to measure exactly 4 gallon of water from 3 gallon and 5 gallon jars, Given, you have unlimited water supply from a running tap.

**Solution:**

Step 1. Fill 3 gallon jar with water. ( 5p – 0, 3p – 3)

Step 2. Pour all its water into 5 gallon jar. (5p – 3, 3p – 0)

Step 3. Fill 3 gallon jar again. ( 5p – 3, 3p – 3)

Step 4. Pour its water into 5 gallon jar untill it is full. Now you will have exactly 1 gallon water remaining in 3 gallon jar. (5p – 5, 3p – 1)

Step 5. Empty 5 gallon jar, pour 1 gallon water from 3 gallon jar into it. Now 5 gallon jar has exactly 1 gallon of water. (5p – 1, 3p – 0)

Step 6. Fill 3 gallon jar again and pour all its water into 5 gallon jar**,** thus 5 gallon jar will have exactly 4 gallon of water. (5p – 4, 3p – 0)

We are done !

One more approach

- Fill 5 gallon jar.

- Pour all its water to 3 gallon jar, thus leaving exactly 2 gallon water in 5 gallon jar.

- Empty 3 gallon jar and pour all of 5 gallon jar water into it, thus now 3 gallon jar will have exactly 2 gallon of water.

- Fill 5 gallon jar again and pour its water to 3 gallon jar until that is full. So exactly 4 gallon water will remain in 5 gallon jar.

Good alternative!

although a correct solution, but this wastes 6 L of water whereas the one given by admin wastes only 5L. sometimes, they ask you the solution with minimum wastage.

fill 5L jar exactly to its half and then fill 3L jar exactly to its half and pour all the water in 3L jar to 5L jar.

Hey my idea and solution matches to yours

Fill 5 gallons jar first. Then fill 3 Gallon of jar completely using 5 gallon jar. So now you are left with 2 gallons in 5 Gallon Jar. Now empty 3 Gallon Jar completely. Now Fill that with remaining 2 Gallons of water from 5 Gallon Jar. Now fill 5 Gallon jar completely with water. Now fill remaining 1 Gallon in the 3 Gallon Jar from 5 Gallon Jar. You are left with exactly 4 Gallon of water in % Gallon Jar.