Monday, February 15, 2010

Monday Probability 6: Candies in pocket

You are a candy lover and have n candies in your right pocket and m in your left. You chose one of the pockets randomly (equally likely) and eat one of the candies from that pocket. What is the porbability that you finish the candies in both pockets together, such that when you eat the last candy from one of the pockets the other pocket has atmost one more candy left?

Answer: (m+n-2)C(m-1)/2^(m+n-3)

2 comments:

  1. {C(n+m-2,n-1)}/2^(n+m-2)

    There are 2*C(n+m-2,n-1) sequences that have suffix LR or RL(where L represents a left candy and R represent the right one). Each of these sequences has probability (1/2)^(n+m-1). Hence the probability is {C(n+m-2,n-1)}/2^(n+m-2)

    ReplyDelete
  2. 1/2.. either you finish in both pockets or you dont!

    ReplyDelete

Old Problems

Follow me