Skip to main content
Post Made Community Wiki
Source Link

As Douglas Zare points out in a comment to Vincent Beffara's answer, in case 1 the expected time to completion of the process, starting from $(1,n-1)$ is $2^n-1$. To see this, consider a simple random walk on the $n$-th dimensional hypercube. When started at some vertex, say $00\ldots0$, the expected number of step to return to this vertex is exactly the number of vertices, $2^n$. On the other hand, if we only look at the hamming weight of the current vertex we see that the transition probabilities are exactly like in our case 1. Indeed, case 1 can be described as "choose a uniformly random ball and flip its color". Since we start at hamming weight 1 (corresponding to $(1,n-1)$) we get $2^n-1$ as the expected hitting time.