TITLE: Two players throw a die until the sequence $1,2,3$ appears, and the winner is the one who roll $3$. What is the probability the second player wins?
QUESTION [8 upvotes]: Alameda and Belisario alternate turns throwing a fair die. Alameda plays first and they continue throwing, one at a time, until the sequence $1$-$2$-$3$ appears. Whoever throws the $3$ is the winner. What is the probability that Belisario wins?

Hmmm - probabilities is not my strong domain!
First let's see what the chances are to get a $1$-$2$-$3$ regardless who gets it.
Is it $1$ in $6\cdot 6\cdot 6$?
Then if this probability is $p$, my understanding is that the probability for Belisario to win is smaller, but I can't compute it :(

REPLY [8 votes]: We have three probabilities to consider, all from the point of view of the player who is about to roll.
$p_0$ is the probability of winning if no part of the winning sequence has been rolled.  (This is Alameda's situation at the beginning of the game.)  Call this situation state $0$.
$p_1$ is the probability of winning if the opponent has just rolled at $1$.  Call this situation state $1$.
$p_2$ is the probability of winning if the opponent has just rolled $2$ and the roll immediately before that was $1,$ so that rolling a $3$ will win.  Call this situation state $2$.
Suppose no part of the sequence has been rolled.  Then if you roll anything but a $1,$ your opponent will be in state $0$ and you will win if he loses; that is, you win with probability $1-p_0.$  If you roll a $1,$ your opponent will be in state $1,$ and again, you win if he loses.  That is  $$p_0=\frac56(1-p_0)+\frac16(1-p_1)$$ 
Similar considerations give $$p_1=\frac46(1-p_0)+\frac16(1-p_1)+\frac16(1-p_2)$$ and $$p_2=\frac46(1-p_0)+\frac16(1-p_1)+\frac16$$  where the last $\frac16$ is the case where the roller wins by rolling $3$.  We can write these equations more neatly as $$\begin{align}
11p_0+p_1+0p_2&=6\\
4p_0+7p_1+p_2&=6\\
4p_0+p_1+6p_2&=6
\end{align}$$
(Sorry about the $0p_2$ in the first equation.  I couldn't figure out how to format things.)
Anyway, solve the system will for $p_0,p_1,p_2.$  Belasario's probability of winning is $1-p_0,$ which turns out to be $${215\over431}$$
EDIT
I started typing this before lulu's answer was posted, but I'm such a slow typist that his answer had been up for a while before I finished.  I'll leave it for a bit before deleting it, just so you can check if we have the same equations.