I have this question on a work sheet, I have completed part a, b, and c. However I'm not too sure how to work out the last part of it. Any tips or hints would be very much appreciated. Thank you!
A prisoner in solitary confinement amuses himself by playing snakes and ladders. He uses a single six-sided die, and his counter starts at square $1$. There is a ladder going from square $3$ to square $6$, a ladder from square $4$ to square $8$, a snake from square $7$ to square $2$, and a snake from square $9$ to square $1$. The game is finished when the counter reaches square $10$ and he needs to throw exactly the right number on the die to finish; if it is too large the counter remains unmoved.
Use a vector $x(t) = (p_1, p_2, p_5, p_6, p_8, p_{10})^T$ for the probabilities of the counter being on square $(1,2,5,6,8,10)$ respectively at discrete time $t$.
Determine the probability $P(t)$ that the game has not finished at time $t$.
Plot $P(t)$ for $0 \leq t \leq 50$.
We are using matlab :)
The states of the game are squares $1,2,5,6,8,10$; the other squares are touched momentarily but the marker never stops on them. The initial state is $91,0,0,0,0,0)$ meaning square $1$ with probabiolity $1$.
The transition matrix is $$T = \frac16\pmatrix{ 7&2&1&2&1&0\\ 0&1&1&2&2&0\\ 1&1&1&1&1&1\\ 1&1&0&2&1&1\\ 1&0&0&0&4&1\\ 0&0&0&0&0&6 }$$ The last row represents the statement that if at turn $t$ the marker is on square $10$, then with probability $\frac66=1$ on turn $t+1$ it will remain on square $10$.
The distribution of probabilities at time $t$, starting at square $1$ at time $0$, is given by the first row of the matrix $T^t$. (I assume you know how ot raise a matrix to an integer power in MATLAB, and how to extract a given row or element of a matrix.) Then the probability of being stuck at $10$ at time $t$ is the upper right hand element of $T^t$.
To check you work, you should verify that at time $t=3$, the probability of being at square $10$ is $\frac{47}{216}$
I don't know how to paste a picture in this post, but a table of the probabilities starting from $t=1$ is $$ 0., 0.111111, 0.217593, 0.310957, 0.394547, 0.46845, 0.53354, \ 0.590761, 0.641009, 0.685109, 0.723801, 0.757744, 0.787518, 0.813634, \ 0.83654, 0.856631, 0.874253, 0.889709, 0.903265, 0.915155, 0.925583, \ 0.93473, 0.942753, 0.949789, 0.955961, 0.961374, 0.966121, 0.970285, \ 0.973938, 0.977141, 0.979951, 0.982415, 0.984576, 0.986472, 0.988135, \ 0.989593, 0.990872, 0.991994, 0.992978, 0.993841, 0.994598, 0.995262, \ 0.995845, 0.996355, 0.996803, 0.997196, 0.997541, 0.997843, 0.998108, \ 0.998341 $$