Wednesday, January 02, 2008

Water Jug Puzzle

Hi All,
So I am back with a classic water jug puzzle - Courtesy Vaibhav Gupta.
--- Problem ---
I have 3 jars of capacity 19 L, 13 L and 7 L.
13 L and 7 L are completely filled with water.

Give me two jars of 10 L of water.

You are given only 20L water so no spilling is allowed.

--- Solution 1 by vaibhav ---
19L, 13L, 7L (In same order)
Initial conf ==> 0 , 13, 7

0, 13, 7
13, 0, 7
19, 0 , 1
19, 1, 0
12, 1, 7
12, 8, 0
5, 8, 7
5, 13, 2
18, 0, 2
18, 2, 0
11, 2, 7
11, 9, 0
4, 9, 7
4, 13, 3
17, 0, 3
17, 3, 0
10, 3, 7
10, 10, 0
Done. :D

-- Solution 2 by achyut ---

Tilt 13L jar and pour water into 19L upto the point where water surface coincides with the diagonal of the jar, thus exactly pouring half of the water ( 6.5L ) into 19L jar.

Do the same with 7L jar thus we will have 10L ( 6.5L + 3.5L ) in 19L jar.

Pour the remaining 3.5L from 7L jar into 13L jar again making 10L ( 6.5L + 3.5L ).

Now that is called out of the box thinking !!!
------------

5 comments:

Anoop said...

Solution by Achyut is not possible practically

Saurabh Joshi said...

it is very well possible practically

Anoop said...

If after 1st step, 19L jug has 6.5lts and 13L jug has 6.5L, How can we divide 7L jug to 2 3.5lts each. Are u assuming u have another jug or what??

Saurabh Joshi said...

okay, now please read carefully. Initially I have 13L and 7L full and 19L empty.

I tilt 13L by angle tan-inverse (height of jug / diameter of jug ) so that diagonal of the jug will exactly co-incide with water surface. At this time 13L jug will have 6.5L and rest ( during the tilting ) has been poured into 19L.

I tilt 7L in a similar way and the 3.5 L during the tilt will fall into 19L making total of 10L in 19L jug.

Remaining 3.5L in 7L I will pour in 13L making 10L in 13L

Unknown said...

thanks, it's really working