First, I need to write down the stochastic matrix.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}
\end{equation*}
To get the probabilities when starting from \(1\) stake after \(5\) rounds, I calculate the matrix action five times on the vector that represents \(1\) stake.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}^5
\begin{pmatrix}
0 \\ 1 \\ 0 \\ 0 \\ 0
\end{pmatrix} =
\begin{pmatrix}
0.598 \\ 0 \\ 0.2535 \\ 0 \\ 0.1485
\end{pmatrix}
\end{equation*}
The probability of still playing is the sum of the three middle probabilities, since the game stops when we are at \(0\) or \(4\) stakes. Here that sum is \(25.4\%\text{.}\)
To get the probabilities when starting from \(2\) stakes after \(5\) rounds, I calculate the matrix action five times on the vector that represents \(2\) stakes.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}^5
\begin{pmatrix}
0 \\ 0 \\ 1 \\ 0 \\ 0
\end{pmatrix} =
\begin{pmatrix}
0.33 \\ 0.21125 \\ 0 \\ 0.21125 \\ 0.2475
\end{pmatrix}
\end{equation*}
The probability of still playing is the sum of the three middle probabilities, since the game stops when we are at \(0\) or \(4\) stakes. Here that sum is \(42.3\%\text{.}\)
To get the probabilities when starting from \(3\) stakes after \(5\) rounds, I calculate the matrix action five times on the vector that represents \(3\) stakes.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}^5
\begin{pmatrix}
0 \\ 0 \\ 0 \\ 1 \\ 0
\end{pmatrix} =
\begin{pmatrix}
0.231 \\ 0 \\ 0.29575 \\ 0 \\ 0.47325
\end{pmatrix}
\end{equation*}
The probability of still playing is the sum of the three middle probabilities, since the game stops when we are at \(0\) or \(4\) stakes. Here that sum is \(29.6\%\text{.}\)
To get the probabilities when starting from \(1\) stake after \(10\) rounds, I calculate the matrix action five times on the vector that represents \(1\) stake.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}^{10}
\begin{pmatrix}
0 \\ 1 \\ 0 \\ 0 \\ 0
\end{pmatrix} =
\begin{pmatrix}
0.68165 \\ 0.0535519 \\ 0 \\ 0.0535519 \\ 0.211241
\end{pmatrix}
\end{equation*}
The probability of still playing is the sum of the three middle probabilities, since the game stops when we are at \(0\) or \(4\) stakes. Here that sum is \(10.7\%\text{.}\)
To get the probabilities when starting from \(2\) stakes after \(10\) rounds, I calculate the matrix action five times on the vector that represents \(2\) stakes.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}^{10}
\begin{pmatrix}
0 \\ 0 \\ 1 \\ 0 \\ 0
\end{pmatrix} =
\begin{pmatrix}
0.505125 \\ 0 \\ 0.116029 \\ 0 \ 0.378845
\end{pmatrix}
\end{equation*}
The probability of still playing is the sum of the three middle probabilities, since the game stops when we are at \(0\) or \(4\) stakes. Here that sum is \(11.6\%\text{.}\)
To get the probabilities when starting from \(3\) stakes after \(10\) rounds, I calculate the matrix action five times on the vector that represents \(3\) stakes.
\begin{equation*}
\begin{pmatrix}
1 \amp 0.4 \amp 0 \amp 0 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0.6 \amp 0 \amp 0.7 \amp 0 \\
0 \amp 0 \amp 0.5 \amp 0 \amp 0 \\
0 \amp 0 \amp 0 \amp 0.3 \amp 1
\end{pmatrix}^{10}
\begin{pmatrix}
0 \\ 0 \\ 0 \\ 1 \\ 0
\end{pmatrix} =
\begin{pmatrix}
0.328598 \\ 0.0624772 \\ 0 \\ 0.0624772 \\ 0.546448
\end{pmatrix}
\end{equation*}
The probability of still playing is the sum of the three middle probabilities, since the game stops when we are at \(0\) or \(4\) stakes. Here that sum is \(12.5\%\text{.}\)