tag:blogger.com,1999:blog-4115025577315673827.post1315491310316969235..comments2019-10-21T14:10:54.375+05:30Comments on CSE Blog - quant, math, computer science puzzles: Number of Colour ChangesUnknownnoreply@blogger.comBlogger13125tag:blogger.com,1999:blog-4115025577315673827.post-57908327646679703182017-04-14T13:12:00.015+05:302017-04-14T13:12:00.015+05:30So, basically, it doesn't matter if the balls ...So, basically, it doesn't matter if the balls are taken with or without replacement 100 times? This is the part I am a little confused about!arkahttps://www.blogger.com/profile/09015258470170355094noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-34176364825751595722015-06-16T22:37:50.020+05:302015-06-16T22:37:50.020+05:30I am bit confused about equivalent of X_i's. P...I am bit confused about equivalent of X_i's. Prob(X_i = 1) is different for each i, because (i-1) balls are drawn before ith position without replacement. Can you explain me in detail about equivalence of X_i?Venu Gangireddyhttps://www.blogger.com/profile/08481409816619539949noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-74573417754786372312010-11-12T21:01:12.380+05:302010-11-12T21:01:12.380+05:30When you say, P[i]=P[99-i], what is P[i] here? and...When you say, P[i]=P[99-i], what is P[i] here? and can you give exact proof?Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-36914058311813406112010-11-12T13:55:52.467+05:302010-11-12T13:55:52.467+05:30And ya.. you are right... I missed the case of 0 c...And ya.. you are right... I missed the case of 0 changes. which is no prob. P[i] = P[100-i] from i=1->99.Stainless...https://www.blogger.com/profile/13692804410410651536noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-77026367573427300872010-11-12T13:54:14.012+05:302010-11-12T13:54:14.012+05:30I actually checked whether all are equally likely ...I actually checked whether all are equally likely or not.. and they are...<br />You can prove it easily...<br />HINT:<br />Try and exchange 1-0 by 0-1 at any change.. and see if the probability is same or not.<br />So, usign that you can prove that probability for each binary representation is same.Stainless...https://www.blogger.com/profile/13692804410410651536noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-91990481981054979502010-11-12T11:24:42.803+05:302010-11-12T11:24:42.803+05:30@Ameya (Stainless).. Why do you say that all binar...@Ameya (Stainless).. Why do you say that all binary representations are equally likely? In fact its not.<br />01 followed by 97 times 0 has probability zero as it would mean2 balls of one colour and 98 balls of another colour. Hence, I think your solution will not work. Am I missing something?Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-49328026908373084302010-11-12T01:31:05.398+05:302010-11-12T01:31:05.398+05:3099 pairs of balls, consider this as binary represe...99 pairs of balls, consider this as binary representation, 1 for change, 0 for no-change. so, we have to fing Expected number of 1's in 99 digit binary number. And as P[i] = P[99 - i] in that, we get expected number to be 50.Stainless...https://www.blogger.com/profile/13692804410410651536noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-47607234079577790442010-11-11T11:03:41.143+05:302010-11-11T11:03:41.143+05:30This comment has been removed by a blog administrator.Taaki...https://www.blogger.com/profile/05024220038059056912noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-10328430436319645102010-11-05T07:28:34.183+05:302010-11-05T07:28:34.183+05:30@piyush.. very elegant.. thanks :)@piyush.. very elegant.. thanks :)Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-24288024064856986252010-11-03T17:08:49.769+05:302010-11-03T17:08:49.769+05:30I've a slightly different solution.
there are...I've a slightly different solution.<br /><br />there are 100! ways it can be taken out. Now we count number of permutation( P_i) in which ith place will have a "colour change"<br />so it will be<br />I can place 50 ways a black ball at ith place and in 50 ways white ball at i+1th place rest 98 places can be arranged in 98! ways. similarlily white ball at ith place and black at i+1th place <br /><br />So P_i = 50*50*2*(98!)<br /><br />so total number of "colour change"<br />= summation(P_i;i=1 to 99)<br />=P_i*99=50*50*2*98!*99=50*100!<br /><br />So expected number of color change = 50*100!/100! = 50Piyushhttps://www.blogger.com/profile/03036531175753773520noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-17679570478758254602010-10-31T15:43:23.699+05:302010-10-31T15:43:23.699+05:30This comment has been removed by the author.mankmonjrehttps://www.blogger.com/profile/14037927103813342063noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-48645173826008958532010-10-30T16:51:12.019+05:302010-10-30T16:51:12.019+05:30Elegant solution. Thanks.
Explaining in detail so...Elegant solution. Thanks.<br /><br />Explaining in detail so that everyone sees this is mathematically correct:<br /><br />There are 99 positions. Let X_i be a random variable taking value 1 if i_th position has a colour change and zero otherwise.<br /><br />We have to find expected value of E[X_1 + X_2 + ... + X_99]<br /><br />Since all X_i are equivalent, the answer is 99*E[X_i]<br /><br />E[X_i] = ((50/100)*(50/99)+(50/100)*(50/99)) = 50/99<br /><br />So, Answer is 50.<br />:)Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-57174504120390179972010-10-30T16:12:19.449+05:302010-10-30T16:12:19.449+05:30There are 99 possible pairs of balls.
The probabil...There are 99 possible pairs of balls.<br />The probability that one pair has color change is ((50/100)*(50/99)+(50/100)*(50/99)) which equals 50/99. There are 99 such pairs. So the average equals 50/99 * 99 =50.Ankushhttps://www.blogger.com/profile/09691343611737045503noreply@blogger.com