[Math] Blue and red balls puzzle

pr.probabilitypuzzlestochastic-processes

I was sent this puzzle and wondered if it is known or if its origin is known? (I see colored ball puzzles are also in vogue.)

Consider a bag with $n$ red balls and $n$ blue balls. At each turn you take out a ball chosen uniformly at random. If the ball is red you put it back in the bag and take out a blue ball. If the ball is blue put it back in the bag and take out a red ball.

If you stop when all the balls are the same color, how many balls will be left?

Best Answer

This appears to be a description of the "OK Corral process" as an urn problem. This stochastic process was apparently introduced by David Williams and Paul McIlroy in the 1998 article The OK Corral and the power of the law and was subsequently investigated by J.F.C. Kingman and S. E. Volkov. In the 1999 article Martingales in the OK Corral Kingman proved that the expected number of balls at the end of the process is asymptotic to $n^{\frac{3}{4}}$ times $$2 \cdot 3^{-\frac{1}{4}}\pi^{-\frac{1}{2}} \Gamma\left(\frac{3}{4}\right) \simeq 1.0506511521875180068945465...$$ in the limit as $n \to \infty$. The numerical value of this constant appears to be in good agreement with Aaron's answer.

A subsequent article by Kingman and Volkov, Solution to the OK Corral model via decoupling of Friedman's urn, investigates the asymptotic distribution of the probability that a particular number of balls is left at the end of the process. The authors note in particular that this process is similar to running an urn model studied by B. Friedman in 1949 in reverse time. I might add that of the three articles it is this one in which the identity between the OK Corral model and the urn model is most immediately apparent.