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)
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
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
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
Re: filling water problem[3]
Answer
A=24L B=13L C=11L D=5L
[U]A B C D[/U]
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:)
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:p (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