As a professional gambler, it seems natural to start with gambler’s ruin.
As a professional gambler, I’m extremly senstive about the house edge. That’s why I mostly just play fair games like flipping a coin. After a coin is flipped, I win 1 dollar for head (H) and lose 1 dollar for tail (T). I play until I got broke or the casino got broke (ambitious plan). As ridiculous it seems, I almost always got broke, even though it’s a “fair” game.
Let’s consider a more general version of the problem. Two gamblers Alice and Bob flip a biased coin with probability p to get a head and q=1−p to get a tail. Alice wins 1 dollar from Bob if head is flipped and loses 1 dollar to Bob if tail is flipped. Alice has a dollars and Bob has b=n−a dollars to start with. The game ends when one party owns all n dollars.
Let Ai be the probability that Alice gets all n dollars starting with i dollars, and Bi be the probability that Bob gets all n dollars starting with i dollars. We have An=Bn=1 and A0=B0=0.
Suppose Alice has i dollars now and they flip a coin. If a head comes, Alice will own i+1 dollars and the probability that she wins in the end is exactly Ai+1; similarly, the probability that she wins is Ai−1 if a tail is flipped. Thus, we have
Ai=pAi+1+qAi−1⟹Ai+1−Ai=pq(Ai−Ai−1)
Using the equations on the right recursively, we have that
It takes some algebra to show that Ai+Bn−i=1. This apparently makes sense, since either Alice wins or Bob wins. However, it is actually a non-trivial result because it suggests the game is finite.