I saw this problem too late for a non-computer approach, but i will do my best to minimize the computational aid by sage, my choice of weapons.
I will try to model a slightly more general situation. Let $N>1$ be an integer. In our case it is $N=21$, but it is simpler to type just $N$. We consider the situation of two players, $1$ and $2$, using two coins with probability $p_1$, respectively $p_2$ to show $H$ after tossing. Notations:
$$
\begin{aligned}
q_1 &= 1-p_1\ ,\\
q_2 &= 1-p_2\ ,\\
Q &= q_1q_2\ .
\end{aligned}
$$
The players start each with $0$ points, let us denote this state by $(0,0)$, the initial state. The set of all states is
$$
S = \Bbb Z_{\ge0}\times \Bbb Z_{\ge0}\ ,\qquad \Bbb Z_{\ge0}=\{0,1,2,3,4,\dots,N,\dots\}\ .
$$
After a simultaneous flipping of coins at time $n=0,1,2,3,\dots$ the coin $1$ shows $H$ or $T$, and the player $1$ gets one point for $H$, and zero points for $T$ showing. Same for the second coin, second player. The collected vector of points for this step is $(x_n,y_n)\in\{0,1\}^{\times2}=\{(0,0),\ (1,0),\ (0,1),\ (1,1)\}$, and we move from the state $(s_1,s_2)$ to a new state by adding this vector, and the possible passages from this state are:
- $(s_1,s_2)\to (s_1,s_2)$ with probability $q_1q_2$,
- $(s_1,s_2)\to (s_1+1,s_2)$ with probability $p_1q_2$,
- $(s_1,s_2)\to (s_1,s_2+1)$ with probability $q_1p_2$,
- $(s_1,s_2)\to (s_1+1,s_2+1)$ with probability $p_1p_2$.
We have marked only the lattice points that are relevant for the consideration of the case $N=6$ in the picture:
The situation can now be modeled by a suggested Markov chain.
The first player "goes to the right" when tossing $H$ and winning the one point. The second player "goes up" when tossing $H$ winning the one point. The lattice points "on the road" from $(0,0)$ to $(N,N)$ that mark the path of the random walk have steps with vectors $(1,0)$, $(0,1)$, $(1,1)$. "Unfortunately", a random walk would so far also have the possibility to stay in place a longer time, we want to get rid of this effect. So here is a parenthesis for this reduction.
A possibility to think about the states of the process is given by drawing a tree model, we draw a trilinear recombination tree, with steps like
*
/
*-*
\
*
usually its nodes would be denoted by $(n_\to, n_\uparrow,n_\nearrow)$, we have these nodes $\in\Bbb Z_{\ge 0}\times\Bbb Z_{\ge 0}\times\Bbb Z_{\ge 0}$ in mind when drawing, but then we also put the "label"
$$n_\to(1,0)+n_\uparrow(0,1)+n_\nearrow(1,1)$$
on each node and build the quotient in this trilinear model by identifying nodes with same "label".
We have a "factor" for this markovian picture for the probability of passing from one such label to an other one.
For instance, for passing (for the first time) from (a first arrival in the) node $(n,m)$ to the node $(n+1,m)$ (after a shorter or longer time of staying in $(n,m)$) we compute the "factor" (which is a conditional probability)
$$
\pi_1=\pi_\to:=(1+Q+Q^2+\dots)\cdot p_1q_2=\frac 1{1-Q}p_1q_2\ .
$$
In the same manner we can consider
$$
\pi_2=\pi_\uparrow:=(1+Q+Q^2+\dots)\cdot q_1p_2=\frac 1{1-Q}q_1p_2\ ,
$$
and
$$
\pi_3=
\pi_\nearrow:=(1+Q+Q^2+\dots)\cdot p_1p_2=\frac 1{1-Q}p_1p_2\ .
$$
Of course, their sum is one,
$$
\begin{aligned}
\pi_1+\pi_2+\pi_3
&=\frac 1{1-Q}(p_1q_2+q_1p_2+p_1p_2)
\\
&=\frac 1{1-Q}((p_1+q_1)(p_2+q_2)-q_1q_2)
\\
&=\frac 1{1-Q}(1\cdot 1-Q)=1\ .
\end{aligned}
$$
In the following exposition we use these passage weights in the (quotient tree of the) trilinear model.
We consider paths, random walks from $(0,0)$
to a point $(m,n)$. For illustration, drawing, discussion... let us consider the case $(m,n)=(N,N)$ as a model.
A possible path in the special case $N=6$ from $(0,0)$ to $(N,N)$ is as follows.
The above path has $3$ diagonal steps, so there remain exactly $3$ steps to the right and exactly $3$ steps upwards. In the general case, there are exactly $k$ steps $\to$, exactly $k$ steps $\uparrow$, and exactly $k'=N-k$ steps $\nearrow$, for a suitable $k$ between $0$ and $N$. For a fixed $k$, (let $k'$ be $N-k$, and consider) the multinomial coefficient
$$
\binom{N+k}{k,k,N-k}
=
\binom{2N-k'}{N-k',N-k',k'}
$$
counts all possibilities of choices of the places for the three possible arrows $\to$, $\uparrow$, and $\nearrow$ in the needed number. So the number of the paths from $(0,0)$ to $(N,N)$ is:
$$
\sum_{0\le k\le N}
\binom{N+k}{k,k,N-k}\ ,
$$
but this number is not the one needed, each path having (possibly) a different weight. But we will but use tacitly this meaning of $k$ in the sequel.
The probability that the random walk reaches $(N,N)$ is the
"factor"
$$
\begin{aligned}
a(N,N)
&=
\sum_{0\le k\le N}
\binom{N+k}{k,k,N-k}\;
\pi_1^k\;
\pi_2^k\;
\pi_3^{N-k}\\
&=
\sum_{0\le k'\le N}
\binom{2N-k'}{N-k',N-k',k'}\;
\pi_1^{N-k'}\;
\pi_2^{N-k'}\;
\pi_3^{k'}
\ .
\end{aligned}
$$
In general, with a similar consideration, the "factor" corresponding to reaching the node $(m,n)$ is a sum over $k'$ between $0$ and $\min(m,n)$, representing the number of diagonal steps,
$$
a(m,n)
=
\sum_{0\le k'\le \min(m,n)}
\binom{m+n-k'}{m-k',n-k',k'}\;
\pi_1^{m-k'}\;
\pi_2^{n-k'}\;
\pi_3^{k'}
\ .
$$
The "$N$-wall" is the set of nodes $(m,n)$ with $\max(m,n)=N$. The probability of a path to enter this $N$-wall exactly in $(m,n)$ is
$$
a^-(m,n)\le a(m,n)
\ ,
$$
and since the entrance can be done only through the two neighbours from the $(N-1)$ wall, we have an obvious recursion. Or we remove from $a(m,n)$ the part coming from the $N$-wall. So for $m,n<N$ we have:
$$
\begin{aligned}
a^-(N,n)
&=a(N-1,n)\pi_1+a(N-1,n-1)\pi_3\\
&=a(N,n)-a(N,n-1)\pi_2 \ ,\\
a^-(m,N)
&=a(m,N-1)\pi_2+a(m-1,N-1)\pi_3\\
&=a(m,N)-a(m-1,N)\pi_1\ ,\\
a^-(N,N)
&=a(N-1,N-1)\pi_3\\
&=a(N,N)-a(N-1,N)\pi_1-a(N,N-1)\pi_2\
\end{aligned}
$$
(If one of the arguments of $a$ is negative, we consider the expression equal to zero.)
In particular, $a^-(N,0)=a(N,0)=\pi_1^N$, $a^-(0,N)=a(0,N)=\pi_2^N$.
Now let us solve the first point of the problem.
The first player wins or the second player wins, or none of the player is winning. Let us denote by $W(1)$, $W(2)$, and respectively $W(0)$ these probabilities. Then:
$$
\begin{aligned}
W(1)
&=
\sum_{0\le n<N}a^-(N,n)\ ,
\\
W(2)
&=
\sum_{0\le m<N}a^-(m,N)\ ,
\\[3mm]
W(0)
&=a^-(N,N)\\
&=a(N-1,N-1)\cdot\pi_3
\ .
\end{aligned}
$$
(The formula for $W(0)$ expresses the fact that we can
reach first $(N,N)$ only through $(N-1,N-1)$, else
one of the players is winning.)
We implement this for $N=21$, using the variables p
and r
instead of $p_1$ and $p_2$.
var('p,r')
N = 21
p1, p2 = p, r
# p1, p2 = p, p
# p1, p2 = 1/2 , 1/2
q1, q2 = 1-p1, 1-p2
Q = q1*q2
pi1, pi2, pi3 = p1*q2 / (1-Q), q1*p2 / (1-Q), p1*p2 / (1-Q)
def a(m, n):
return sum( [ multinomial( m-k, n-k, k ) * pi1^(m-k) * pi2^(n-k) * pi3^k
for k in [0..min(m, n)] ] )
def a_minus(m, n):
if m == 0: return a(m, n)
if n == 0: return a(m, n)
if m == n: return a(m-1, n-1) * pi3
if m > n: return a(m, n) - a(m, n-1) * pi2
if m < n: return a(m, n) - a(m-1, n) * pi1
W1 = sum( [ a_minus(N, n) for n in [0..N-1] ] )
W2 = sum( [ a_minus(m, N) for m in [0..N-1] ] )
W0 = a_minus(N, N)
Do not expect to get an expression that can be copy+pasted here.
The only information that can be shown is
W1 + W2 + W0 = 1
sage:
which is more or less a good check.
If we set $p_1=p_2=p$, the result is still ugly, being of the shape...
sage: W1.subs( {r: p}).factor()
result:
$$
\frac{1-p}{(2-p)^{41}}
(p^{40} - 60p^{39} + 2170p^{38} - 53010p^{37} + 961495p^{36} + \dots
+ 205268948976238p^2 - 21509400006042p + 1099511627776)\ .
$$
Even in the case with $p_1=p_2=\frac 12$, $\pi_1=\pi_2=\pi_3=\frac 13$ the result is not simple:
sage: W1.subs( {p: 1/2, r: 1/2})
1936317308042617129/4052555153018976267
sage: W2.subs( {p: 1/2, r: 1/2})
1936317308042617129/4052555153018976267
sage: W0.subs( {p: 1/2, r: 1/2})
179920536933742009/4052555153018976267
sage: factor( 1936317308042617129/4052555153018976267 )
3^-39 * 7 * 421 * 657046931809507
sage: factor( 179920536933742009/4052555153018976267 )
3^-39 * 83 * 127 * 157 * 108717453857
Here is a list of the hit probabilities for the $21$-wall in the simple case $p_1=p_2=\frac 12$, all of them have a denominator which is a power of $3$, so we will multiply with the common denominator and show the resulted numerators.
sage: for n in range(len(L)):
....: entry = L[n]
....: denom_string = '3^{39}'
....: numer = ZZ( entry*denom )
....: print(f"{denom_string}\\;a^-(21,{n}) &= {numer} &&= {latex(factor(numer))}\\\\")
....:
The result was designed to be shown as...
$$
\begin{aligned}
3^{39}\;a^-(21,0) &= 387420489 &&= 3^{18}\\
3^{39}\;a^-(21,1) &= 10847773692 &&= 2^{2} \cdot 3^{18} \cdot 7\\
3^{39}\;a^-(21,2) &= 148252907124 &&= 2^{2} \cdot 3^{17} \cdot 7 \cdot 41\\
3^{39}\;a^-(21,3) &= 1319008927068 &&= 2^{2} \cdot 3^{15} \cdot 7^{3} \cdot 67\\
3^{39}\;a^-(21,4) &= 8598266843796 &&= 2^{2} \cdot 3^{15} \cdot 7 \cdot 21401\\
3^{39}\;a^-(21,5) &= 43828353793980 &&= 2^{2} \cdot 3^{14} \cdot 5 \cdot 7 \cdot 29 \cdot 37 \cdot 61\\
3^{39}\;a^-(21,6) &= 182093958229428 &&= 2^{2} \cdot 3^{12} \cdot 7^{4} \cdot 35677\\
3^{39}\;a^-(21,7) &= 634757464832796 &&= 2^{2} \cdot 3^{13} \cdot 1361 \cdot 73133\\
3^{39}\;a^-(21,8) &= 1896899428653012 &&= 2^{2} \cdot 3^{14} \cdot 7 \cdot 53 \cdot 179 \cdot 1493\\
3^{39}\;a^-(21,9) &= 4941943088971644 &&= 2^{2} \cdot 3^{10} \cdot 7 \cdot 2989008577\\
3^{39}\;a^-(21,10) &= 11378114643378420 &&= 2^{2} \cdot 3^{10} \cdot 5 \cdot 7 \cdot 19 \cdot 72439613\\
3^{39}\;a^-(21,11) &= 23414449241726172 &&= 2^{2} \cdot 3^{9} \cdot 7 \cdot 23 \cdot 127 \cdot 619 \cdot 23497\\
3^{39}\;a^-(21,12) &= 43485472206133524 &&= 2^{2} \cdot 3^{7} \cdot 7 \cdot 17 \cdot 93479 \cdot 446863\\
3^{39}\;a^-(21,13) &= 73504801898128188 &&= 2^{2} \cdot 3^{7} \cdot 7 \cdot 541 \cdot 1601 \cdot 1385863\\
3^{39}\;a^-(21,14) &= 113931051822977076 &&= 2^{2} \cdot 3^{6} \cdot 107 \cdot 365149583423\\
3^{39}\;a^-(21,15) &= 163015585039164060 &&= 2^{2} \cdot 3^{4} \cdot 5 \cdot 7 \cdot 52009 \cdot 276399701\\
3^{39}\;a^-(21,16) &= 216622423284094548 &&= 2^{2} \cdot 3^{5} \cdot 7^{2} \cdot 4548215824391\\
3^{39}\;a^-(21,17) &= 268815682085497596 &&= 2^{2} \cdot 3^{4} \cdot 7 \cdot 97 \cdot 77591 \cdot 15748111\\
3^{39}\;a^-(21,18) &= 313087831052229492 &&= 2^{2} \cdot 3 \cdot 7 \cdot 167 \cdot 2521 \cdot 11593 \cdot 763663\\
3^{39}\;a^-(21,19) &= 343826008525622364 &&= 2^{2} \cdot 3 \cdot 7^{3} \cdot 107 \cdot 780691735297\\
3^{39}\;a^-(21,20) &= 357526289185312660 &&= 2^{2} \cdot 5 \cdot 7 \cdot 64381 \cdot 39666348899\\
3^{39}\;a^-(21,21) &= 179920536933742009 &&= 83 \cdot 127 \cdot 157 \cdot 108717453857\\
\end{aligned}
$$
Second point. This is only a simple twist of the first case.
The idea to attack is simple.
The game cannot stay with positive probability in the region of points $(m,n)$ with $|m-n|\le 1$ (as we will see), so let $V(1)$, $V(2)$ the winning probabilities of the first, respectively the second player.
Then $V(1)$ consists of a part
$a^-(N,0)+a^-(N,1)+\dots+a^-(N,N-2)$, as in the first case, and of a second part that has to be examined, it is triggered by the first hit of the $N$-wall in one of the points $(N,N)$, $(N,N-1)$, and $(N-1,N)$, where we do not have a decision.
The situation is similar to the old Markov chain with the states Deuce, Advantage Borg, Advantage McEnroe, Game Borg, Game McEnroe. We use instead the states
$$
-2, \ -1,\ 0,\ 1,\ 2,
$$
from the perspective of the first player, he wins when the final state $2$ is reached, he loses, when the final state $-2$ is reached. We entry the game with the distribution of probabilities
$$
0,\ a^-(N-1,N),\ a^-(N,N),\ a^-(N,N-1),\ 0\ ,
$$
and let us denote by $g_k$ the probability that the first player wins, starting from the state $k$. We have the linear system
$$
\left\{
\begin{aligned}
g_{-2} &= 0\ ,\\
g_{-1} &= \pi_1 g_0+\pi_3 g_{-1}+\pi_2 g_{-2}\ ,\\
g_{0} &= \pi_1 g_1+\pi_3 g_0+\pi_2 g_{-1}\ ,\\
g_1 &= \pi_1 g_2+\pi_3 g_1+\pi_2 g_0\ ,\\
g_2 &=1\ .
\end{aligned}
\right.
$$
This can be solved algebraically, then the second part contribution is given by multiplying the vector of these $g$-variables with the vector of the entrering distribution.
Comment:
Here are displayed the first values for $a^-(m,n)$ and $a(m,n)$ for a better understanding.
We are joining them corresponding to the walls.
The $a$-table is starting with:
$\require{AMScd}$
\begin{CD}
1/81 @= 17/243 @= 43/243 @= 593/2187 @= 1921/6561\\
@. @. @. @. @|\\
1/27 @= 13/81 @= 73/243 @= 245/729 @. 593/2187\\
@. @. @. @| @|\\
1/9 @= 1/3 @= 11/27 @. 73/243 @. 43/243\\
@. @. @| @| @|\\
1/3 @= 5/9 @. 1/3 @. 11/27 @. 17/243\\
@. @| @| @| @|\\
1 @. 1/3 @. 1/9 @. 1/27 @. 1/81
\end{CD}
(There are no equal signs in this scheme, rather bricks building the walls.)
The $a^-$-table is starting with:
$\require{AMScd}$
\begin{CD}
1/81 @= 16/243 @= 112/729 @= 464/2187 @= 245/2187\\
@. @. @. @. @|\\
1/27 @= 4/27 @= 20/81 @= 11/81 @. 464/2187\\
@. @. @. @| @|\\
1/9 @= 8/27 @= 5/27 @. 20/81 @. 112/729\\
@. @. @| @| @|\\
1/3 @= 1/3 @. 8/27 @. 4/27 @. 16/243\\
@. @| @| @| @|\\
1 @. 1/3 @. 1/9 @. 1/27 @. 1/81
\end{CD}
This is a visual aid for computing the winning probabilities $W_1,W_2,W_3$ for a special $N$. For instance, for $N=4$ the first player wins with the probability $W_1$ given by adding the vertically placed entries $464/2187$, $112/729$, $16/243$, and $1/81$. The second player wins with the same probability in this special case, but in general we add the horizontal entries in the $4$-wall, excepting the diagonal one.
I have to submit... If something is unclear, please give me a hint in a comment. I tried to cover as much as possible.
Best Answer
The time $T$ it takes a single sugar cane plant to grow completely follows a negative binomial distribution.
Given the cumulative distribution function of $T_i\sim T$ you can compute the cumulative distribution function of $T_{\text{total}}=\max\{T_1,\ldots,T_N\}$ as $$ \mathbb{P}(T_{\text{total}}\leqslant t) = \mathbb{P}(T\leqslant t)^N. $$
Given the distribution of $T_{\text{total}}$ it will be relatively easy to compute its expectation.