tag:blogger.com,1999:blog-4115025577315673827.post6477791866792943664..comments2019-11-21T20:33:48.870+05:30Comments on CSE Blog - quant, math, computer science puzzles: Give and TakeUnknownnoreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4115025577315673827.post-79225340123551988782012-09-12T18:31:19.240+05:302012-09-12T18:31:19.240+05:30@Kapil,
I think that the question says that we sto...@Kapil,<br />I think that the question says that we stop after one person gets 9 handfuls, not after when total 9 handfuls have been picked. Kartik Maheshwarihttps://www.blogger.com/profile/05862778644008445032noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-30193975770359872142012-08-10T03:38:02.086+05:302012-08-10T03:38:02.086+05:30I think that there is a flaw in above solution. Su...I think that there is a flaw in above solution. Suppose, that Give keeps taking the coins till 8 handfuls and then gives the last 6 coins to Give in that 9th handful. So, Give now has only 6 coins and Take has 94<br /><br />My solution goes like this:<br /><br />strategy : 1 1 1 1 1 1 1 1 46<br /><br />Lemma: Suppose that after 8 handful coins have already been picked up, the number of coins to be picked up in the last go is half the remaining number of coins<br />Proof of Lemma: If he picks M s.t. M > R/2, where R is the remaining number of coins, then Take will take M. If he picked M s.t. M < R/2, then Take gives it to Give. In both the cases, the number of coins coming on Give's side is less than R/2 which was the case when M=R/2. Hence the lemma is proved.<br /><br />Now, Give can always take the coins in first 8 handfuls. So, it is always best to give him the least and to save the maximum number of coins to be picked from in the last handfuls. So, this strategy is the best.Kapil Dubeyhttps://www.blogger.com/profile/00388428302950969251noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-25102390245327006472010-02-05T21:09:24.590+05:302010-02-05T21:09:24.590+05:30Ramdas (Ya, I am a Dastard)'s solution is corr...Ramdas (Ya, I am a Dastard)'s solution is correct. Its 46. :)<br /><br />Strategy:<br />"Give" should always put aside 6 coins. If Take takes them, "Give" gets 100-54 = 46. If not, "Give" gets 54 :)<br /><br />So, "Give" can ensure getting 46 coins always. Can he do better?<br /><br />Suppose he follows any other strategy. Then "Take" will follow the strategy that he will take only if number of coins >= 6. And so, ensure that "Give" gets no more than 46 coins. So, this is the best strategy. :)Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-6604637351127673182010-02-05T01:09:10.823+05:302010-02-05T01:09:10.823+05:30actually u can show, by this very argument, thoda ...actually u can show, by this very argument, thoda intuitively also, that the best strategy for Take is to take >=6, and give <=5. So ull see that 46 is the highest possible.Ya, I Am A Dastardhttps://www.blogger.com/profile/04386601441575337262noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-55752242373712422642010-02-05T00:43:45.945+05:302010-02-05T00:43:45.945+05:30an even simpler strategy is to keep taking 6. if h...an even simpler strategy is to keep taking 6. if he starts taking all of them, he'll have 54, ull have 46.Ya, I Am A Dastardhttps://www.blogger.com/profile/04386601441575337262noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-84112495051778390952010-01-30T19:33:12.925+05:302010-01-30T19:33:12.925+05:3045.
Tell me if I can do any better.
But the simple...45.<br />Tell me if I can do any better.<br />But the simple strategy for Give should be to take 5 coins every time, which ensures that he gets 5x9=45 coins at least.Anonymousnoreply@blogger.com