Results 1 to 7 of 7

Thread: filling water problem[3]

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    filling water problem[3]

    You have 5 liter jug, 11 liter jug, 13 liter jug and 24 liter jug. 24 liter jug have full of water.

    Your goal is finally the 11 liter, 13 liter jug and 24 liter contains 8 liter waters and 5 liter jug contains no water. You have only 24 liter water and you are not getting more water from any other resources.

    How can you fill the water?

    ------------------
    suresh


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: filling water problem[3]

    (5 , 11 , 13 , 24) ======>>>>>
    ======>>>>>(0 , 0 , 0 , 24) ======>>>>>(0 , 11 , 13 , 0) ======>>>>>(5 , 6 , 13 , 0)======>>>>> (5 , 0 , 13 , 6) ======>>>>>(5 , 11 , 2 , 6) ======>>>>>(5 , 11 , 0 , 8) ======>>>>>(5 , 0 , 11 , 8) ======>>>>>(0 , 3 , 13 , 8)======>>>>>(5 , 3 , 8 , 8) ======>>>>>(0 , 8 , 8 , 8)

    Last edited by jamesravid; 02-13-2007 at 08:09 AM.

  3. #3
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: filling water problem[3]

    James you are correct...but you are using 10 steps to acheive the result.

    Find the minimum number of steps to reach the goal. 10 is not a minimum.


    -------------------
    suresh


  4. #4
    Junior Member
    Join Date
    May 2006
    Answers
    2

    Re: filling water problem[3]

    24lit 13 lit 11lit 5 lit
    24 0 0 0
    0 13 11 0
    0 8 11 5
    8 8 3 5
    8 8 8

    Total 4 steps


  5. #5
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: filling water problem[3]

    Your answer is...

    24lit 13 lit 11lit 5 lit
    24 0 0 0
    0 13 11 0
    0 8 11 5
    8 8 3 5
    8 8 8

    1. You are not using 4 steps...Because you are combined these (11 13 0 0 and 0 13 11 0 ) into one step (0 13 11 0).

    2. Your answer is wrong.

    Explanation....

    Look at this step. (0 8 11 5). From this step you are acheiving the next step (8,8,3,5). How you change exactly 8 liter water from 11 liter jug to 24 liter jug ?

    Find the correct one...

    ---------------------
    suresh


  6. #6
    Expert Member
    Join Date
    Jan 2007
    Answers
    249

    Smile Re: filling water problem[3]

    Answer

    A=24L B=13L C=11L D=5L


    A B C D
    24 0 0 0
    13 0 11 0
    8 0 11 5
    8 5 11 0
    8 13 3 0
    8 8 3 5
    8 8 8 0

    Thanks
    Manoj


  7. #7
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: filling water problem[3]

    Well answered Manoj. Thought of replying to this thread, but finally decided against it as I have limited time and better threads to answer to (That doesn't mean this thread is no good. No. It is just that other threads had higher priority). Now, that I do have time, I will explain the logic to solve these kind of problems.

    A general thumb rule for this kind of problems is, try to get the required amount of water in the largest first.
    In this case we need to get 8 lts of water in 24 ltr Jug.
    it will be (24-11-5)=8. Simple as that.

    Next we need to get 8lt in 13lt jug.
    It will be , (13-5)=8.

    The third gets filled automatically. Thjis is the general way of solving for any puzzle of this kind.

    Enjoy!

    Cheers!
    -Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact