Question:

How to measure 6 litre exactly with 5 litre and 7 litre containers?

by  |  earlier

0 LIKES UnLike

For more details click here: http://www.glprogramming.com/gololina2.swf

 Tags:

   Report

2 ANSWERS


  1. Here is how I would do it:

    Start with both containers empty.

    Fill up the 5 liter container and pour into the 7 liter container

    Fill up the 5 liter container again and add to 7 liter container until it is full.

    You should now have 3 liters left in the 5 liter container.

    Empty the 7 liter container and pour the 3 liters of water from the 5 liter container into the 7 liter container.

    Fill up the 5 liter container again and pour water into the 7 liter container until it is full again.

    You should now have 1 liter of water left in the 5 liter container.

    Empty the 7 liter container and pour the 1 liter of water from the 5 liter container into the 7 liter container.

    Fill up the 5 liter container again and add the entire contents to the 7 liter container.

    You should now have exactly 6 liters in the 7 liter container.


  2. If you start with the 5, it takes 12 steps,

    counting each separate fill, empty,

    or pour from one to the other as a step.

    This way takes 10:

    5L jug | 7L jug

    --- ---- --- -- -- --

    0. 0 | 0 start

    1. 0 | 7 fill the 7

    2. 5 | 2 pour into 5 from 7

    3. 0 | 2 empty the 5

    4. 2 | 0 pour into 5 from 7

    5. 2 | 7 fill the 7

    6. 5 | 4 pour into 5 from 7

    7. 0 | 4 empty the 5

    8. 4 | 0 pour into 5 from 7

    9. 4 | 7 fill the 7

    10. 5 | 6 pour into 5 from 7, leaving 6 in the 7L jug

    .

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.