Kyle and Julien are playing a game in which they each toss their own fair coins. On each turn of the game, both players flip their own coin once. If, at any point, Kyle’s most recent three flips are Tails, Tails, and Heads (i.e., TTH), then he wins. If, at any point, Julien’s most recent three flips are Tails, Tails, and Tails (i.e, TTT), then he wins.
However, both players can’t win at the same time. If Kyle gets TTH at the same time Julien gets TTT, then no one wins, and they continue flipping. They don’t start over completely or erase their history, mind you—they merely continue flipping, so that one of them could conceivably win in the next flip or two.
What is the probability that Kyle wins this game?
This game, like many coin flipping problems of its ilk, can be modeled as a Markov chain. There are two absorbing states, let's call them, WinJ and WinK, and nine transient states, call them, (i,j) where i,j∈{0,T,TT}, represent the state where Julien is in state i and Kyle is in state j. State (0,0), which represents both the starting space and the case that both Julien and Kyle just flipped H and that Kyle's last three flips were not TTH, can transition to (T,0), (0,T), (T,T) or itself, each with equal probability. On the other hand, we see that due to the tie breaker procedures, state (TT,TT) can transition to (0,0), WinJ, WinK and (TT,0), each with equal probability. We can similarly build up all of the other transitions Let's represent the probabilistic state of the system as π=(pWinJ,pWinK,p(0,0),p(0,T),p(0,TT),p(T,0),p(T,T),p(T,TT),p(TT,0),p(TT,T),p(TT,TT))∈[0,1]11, then the probability transition matrix can be represented as P=(1000000000001000000000000.250.2500.250.250000000.2500.250.2500.2500000.50.25000.2500000000.250.2500000.250.250000.2500.250000.2500.2500.50.25000000.25000.500.250.2500000000.500.2500.250000000.250.250.25000000.2500).
Here, the probability that Kyle wins is given by the pWinK (2nd) entry in π∞. Since we are starting at π0=(0,0,1,0,0,0,0,0,0,0,0), and we are only concerned with pWinK we can instead of solving the entire matrix inverse of I−T rather just solve the system of equations (I−T)x=R(01)=(000.5000.5000.25)
Turns out my end-state transitions from (TT,TT) were wrong. If Kyle gets T and Julien flips H from here, with 25% probability, then they transition to (TT, 0), not (0,0). Changing this portion of the matrices P and T would yield the correct result of Kyle winning in fact a bit over 64%. I guess I should have known from the title that "heads I win, tails you lose" should have benefitted Kyle.
ReplyDeleteEr, take two. it should transition of (0,TT) not (0,0).
Delete