Teacher is playing a game with his students. He is having $k$ red balls. Each of his student is either having a red or black ball. $M$ students have red balls and $N$ students have black balls.
Now each student come one by one randomly to teacher.
- If student has red ball, the teacher keeps the red ball.
If student has black ball then teacher give a red ball to student.
If at any time teacher run out of red ball when student with black
ball comes to him, then teacher looses.
- If teacher successfully gave red ball to every student arriving to him with black ball, then teacher wins.
Now what is the probability that the teacher wins?
I tried to solve for this by using the following trivial conclusions:
It is clear that if N <= k, then teacher always wins.
For N > k, let R and B be event the student with red ball and student with black ball respectively, visits the teacher. So some string is formed by the visit sequence eg BBBRRBBB... then for any prefix P, if Number of R's + k < Number of B's, then teacher looses.
But unable to solve the problem. Need help.