[Math] Combinatorics of a tournament where one wins by taking either three games in a row or four in total

combinatoricsprobability

Two teams play each other repeatedly until either one of them wins three games in a row or one of them wins a total of four games. What are all the ways in which the tournament can be played? What is the probability that six games are needed to determine a winner?

Progress

I've listed all the possibilities, but I'm afraid I might be missing a few or repeating some because I just did this by hand. I'm trying to figure out how to do this mathematically. I know that there are $2^7$ total possibilities, not including repeats. For example, BBBBBBB and BBBRRRR are the same because there would be three games, BBB. The remaining $4$ games would not matter since the tournament would have ended.

Best Answer

Keep track of each player's "state" after each game with two numbers. Let $r_i$ be the length of player $i$'s current run of wins, and let $g_i$ be player $i$'s number of games won. Let the state of the match be $(r_1,g_1,r_2,g_2)$. Initially, the match is in state $(0,0,0,0)$.

Let $w(a,b,c,d)$ be the generating function for the probability that a match that has reached state $(a,b,c,d)$ ends after a total of $i$ games. In other words, let $w(a,b,c,d)=\sum_i p_i x^i$, where $p_i$ is the probability that a match that has reached state $(a,b,c,d)$ ends after exactly $i$ games. Note that if $a=3$, $b=4$, $c=3$, or $d=4$, the match is over and took exactly $b+d$ games. In terms of the generating function, this means that $w(a,b,c,d)=x^{b+d}$.

Now suppose the state of a particular match is $(a,b,c,d)$. If player 1 wins the next game, the state moves from $(a,b,c,d)$ to $(a+1,b+1,0,d)$. If player 2 wins the next game, the state moves from $(a,b,c,d)$ to $(0,b,c+1,d+1)$.

If $p$ is the probability of player 1 winning a single game, the state of an ongoing match moves from state $(a,b,c,d)$ to either state $w(a+1,b+1,0,d)$ (with probability $p$) or state (with probability $1-p$). This gives a recurrence for the generating function. $w(a,b,c,d) = p w(a+1,b+1,0,d) + (1-p)w(0,b,c+1,d+1)$.

The generating function for the match-length probabilities of a fresh match is $w(0,0,0,0)$.

The recurrence and initial conditions fully characterize the generating function $w$.

  • $w(a,b,c,d)=x^{b+d}$ if $a=3$, $b=4$, $c=3$, or $d=4$
  • $w(a,b,c,d) = pw(a+1,b+1,0,d) + (1-p)w(0,b,c+1,d+1)$

$w(0,0,0,0)$ can be worked out by hand, but it's much easier to enlist the help of Mathematica or a similar tool.

$w(0,0,0,0)=\\(1-3 p+3 p^2) x^3+(p-3 p^2+4 p^3-2 p^4) x^4+(2 p-7 p^2+10 p^3-5 p^4) x^5\\+(7 p^2-28 p^3+49 p^4-42 p^5+14 p^6) x^6+(14 p^3-42 p^4+42 p^5-14 p^6) x^7$

If $p=\frac{1}{2}$, $w(0,0,0,0)=\frac{1}{4}x^3+\frac{1}{8}x^4+\frac{3 }{16}x^5+\frac{7 }{32}x^6+\frac{7}{32} x^7$.

The answer to many questions about this game can be deduced from $w$. For example, the probability that the match takes exactly $6$ games is the coefficient of $x^6$, $7 p^2-28 p^3+49 p^4-42 p^5+14$, which equals the value satish found, $7(p^4(1-p)^2 +p^2(1-p)^4)$.

If you want to answer questions about a particular player, you can use two variables in the generating function. Let the coefficient of $x^i$ represent the probability that player 1 wins and the match takes exactly $i$ games, and let the coefficient of $y^i$ represent the probability that player 2 wins and the match takes exactly $i$ games. This changes two of the initial condition values to $y^{b+d}$, but the recurrence is the same.