At each round of a game with two players Alice and Bob, Alice can win with a fixed probability $a$ and Bob can win a fixed probability $b$, such that $a+b < 1$, otherwise there is a draw.
The game ends when one of the two players wins $N$ times in a row.
What is the probability that Alice will win the game?
-
2$\begingroup$ Right, exactly $N$ consecutive wins, without any draw. $\endgroup$– heartworkCommented Feb 2 at 9:45
-
6$\begingroup$ @GeraldEdgar is the question obvious? For me not $\endgroup$– Fedor PetrovCommented Feb 2 at 19:37
-
4$\begingroup$ The question seems fine to me. $\endgroup$– Timothy ChowCommented Feb 2 at 23:38
-
5$\begingroup$ I’m voting to re-open this question. It’s cute, and not (as far as I know) something super well-known. Even if it is just in principle a computation, the answer looks so nice, as Christian Remling has shown, that there must be more to say here. $\endgroup$– Sam HopkinsCommented Feb 3 at 4:51
-
4$\begingroup$ "Research" is so much not well-defined, that closing questions with any non-trivial mathematical content because of conjectural lacking of being "research level" looks at least suspicious for me. Now, after the answer by Christian and suggestion by Sam, I understand how to calculate this probability without computations (see my comment to Christian's answer) (and that's what I could not understand before, thinking about the question for five minutes on the subway.) Definitely, this type of argument is often used in research in combinatorics and probability. $\endgroup$– Fedor PetrovCommented Feb 3 at 6:01
3 Answers
Here goes a combinatorial proof of the answer (formula (1)) by Christian Remling.
If Alice wins, then after the last draw (or after the beginning if there were no draws) we have a sequence $B^jTA^N$, where $0\leqslant j\leqslant N−1$, $T$ is either empty or starts with $A$ and ends with $B$, and $T$ has no $N$ consecutive $A$'s or $B$'s. Then the probability of such thing is $b^ja^N\operatorname{prob}(T)$, and summing up over $j$ we get $a^Ns_N(b)\operatorname{prob}(T)$. Now sum up over $T$ and over all sequences before the last draw (including this last draw). Note that reflected $T$'s are exactly what appears for Bob's win, and have the same probabilities. Thus the ratio of probabilities of Alice' and Bob's wins equals $a^Ns_N(b):b^Ns_N(a)$.
As Sam Hopkins notes in the comment, if Bob had to win $M$ consecutive rounds, the ratio is $a^Ns_M(b):b^Ms_N(a)$ that is proved by the literally the same argument.
As indicated in the comments, this is not difficult in principle, but the details seem tedious. Alice wins with probability $$ \frac{a^NS_N(b)}{a^NS_N(b)+b^NS_N(a)} , \tag1 $$ with $$ S_N(x)=1+x+\ldots+x^{N-1} = \frac{1-x^N}{1-x} . $$
We can think of this as a random walk (or Markov chain) on $-N,-N+1, \ldots, N$. We start at $0$, and being at site $n$ means that we have just seen $|n|$ consecutive wins for Alice ($n<0$) or Bob ($n>0$).
We are interested in the probability of reaching $-N$ before $N$ was visited. Denote this probability, with the game starting at $n$, by $p_n$; so we want $p_0$. Then, from the transition rules, \begin{align*} p_0 &= ap_{-1} + bp_1 + (1-a-b)p_0 \tag2 \\ p_{-n} & = ap_{-n-1} + bp_1+(1-a-b)p_0 \\ p_n & =bp_{n+1} + ap_{-1}+(1-a-b)p_0 . \end{align*} We also have the boundary conditions $p_{-N}=1$, $p_N=0$. Starting at $n=N$, we find $p_{N-1}=ap_{-1}+(1-a-b)p_0$, then $p_{N-2}=a(1+b)p_{-1}+(1-a-b)(1+b)p_0$ etc., until $$ p_1=S_{N-1}(b)(ap_{-1}+(1-a-b)p_0). $$ Similarly, $$ p_{-1} =a^{N-1} +S_{N-1}(a)(bp_1+(1-a-b)p_0) . $$ We now need to solve this remaining $3\times 3$ linear system for $p_0$ (and $p_{\pm 1}$). A moderately convenient way of doing this is to use $(2)$ to rewrite the last two equations as \begin{align*} p_1 & = S_{N-1}(b)(p_0-bp_1) \\ p_{-1} &= S_{N-1}(a)(p_0-ap_{-1}) + a^{N-1} , \end{align*} solve these for $p_{\pm 1}$ in terms of $p_0$ and plug into $(2)$ to produce an equation for $p_0$ only. (Or, more sensibly perhaps, use a computer algebra system.) This gives $p_0=a^N/(DS_N(a))$, with $$ D=a+b-2+\frac{1}{S_N(a)}+\frac{1}{S_N(b)} . $$ This is where I stopped in an earlier version of this answer, but the expression can be further massaged to reach $(1).$
-
1$\begingroup$ Probably there is a “reflection principle” proof for this formula, no? $\endgroup$ Commented Feb 3 at 4:44
-
2$\begingroup$ @SamHopkins: At least now the formula is so simple that one suspects there is some proof with no calculation. For example, it is of the form $p(a)/(p(a)+p(b))$, with $p(x)=x^N/S_N(x)$, which describes the simpler game where A and B just take turns and try to make events with probabilites $p(a)$ and $p(b)$ happen. $\endgroup$ Commented Feb 3 at 4:47
-
1$\begingroup$ @SamHopkins ah yes, reflection. If Alice wins, then after the last draw we have a sequence $B^jTA^N$, where $0\leqslant j\leqslant N-1$, $T$ is either empty or starts with $A$ and ends with $B$, and $T$ has no $N$ consecutive $A$'s and $B$'s. Then the probability of such thing is $b^ja^n {\rm prob}(T)$, summing up over $j$ we get $a^Ns_N(b){\rm prob}(T)$, now sum up over $T$ and note that reflected $T$'s are exactly what appears for Bob's win. $\endgroup$ Commented Feb 3 at 5:42
-
2$\begingroup$ @FedorPetrov: this is very pretty! I suggest you post this as a separate answer. Note that your "reflection" is a "horizontal" reflection, which is not what I had in mind; usually arguments with the reflection principle use a "vertical" reflection. Also note that with this argument you can easily answer the version of the question where Alice wins when she gets $N$ wins a row and Bob wins when he gets $M$ wins in a row. $\endgroup$ Commented Feb 3 at 13:03
Simply discard when we get draws, as there are identical sub-problems with the original one.
Compute straightforward the probability when Alice wins by how many alternating $a,b$ groups we have:
$(1+b+...+b^{N-1})a^N$ ,
$(1+b+...+b^{N-1})(a+...+a^{N-1})(b+...+b^{N-1})a^N$ ,
$(1+b+...+b^{N-1})(a+...+a^{N-1})(b+...+b^{N-1})(a+...+a^{N-1})(b+...+b^{N-1})a^N$ ,
and so on.
Let $r=(a+...+a^{N-1})(b+...+b^{N-1})$
then Alice wins with probability:
$(1+r+r^2+...)(1+b+...+b^{N-1})a^N$ ,
and Bob:
$(1+r+r^2+...)(1+a+...+a^{N-1})b^N$ ,
and we get the same ratio between them:
$a^N\frac{1-b^N}{1-b}$ : $b^N\frac{1-a^N}{1-a}$
Alice wins probability:
$A = \frac{a^N(1-a)(1-b^N)}{a^N(1-a)(1-b^N) + b^N(1-b)(1-a^N)}$
-
$\begingroup$ How to accept one of the answers? By simply adding a comment to say this? $\endgroup$ Commented Feb 28 at 20:07
-
$\begingroup$ There is a check-mark under the left-hand-side votes portion of each answer. $\endgroup$ Commented Feb 29 at 0:37