Investigate the dice game using Markov chains. What is the probability of winning? What is the expected number of rolls?

159 Views Asked by At

Consider the following game:

You start with a score of zero. We set a goal score of M. On each turn, you roll a six-sided, fair die. If your score is greater than zero and your roll divides your score, then you subtract the roll from your score (if the score ever becomes negative, replace the score with zero). Otherwise, you add the roll to your score. If the score is M or greater, you win the game. Otherwise, if the score is a perfect square greater than 4 (9,16,25,...) you lose. You continue rolling and changing your score until you either win or lose.

Investigate the game using Markov chains.

How many rolls on average will you make when M=10? That is, what is the expected value of the number of rolls made before the game ends?

What is the probability of winning for various M?

My Attempt

From my understanding of the game, I have created a transition matrix for $M=10$ as follows:

$$ P=\begin{bmatrix} &&0&1&2&3&4&5&6&7&8&9&10+\\ &&-&-&-&-&-&-&-&-&-&-&-\\ 0&|&0&1/6&1/6&1/6&1/6&1/6&1/6&0&0&0&0\\ 1&|&1/6&0&0&1/6&1/6&1/6&1/6&1/6&0&0&0\\ 2&|&1/6&1/6&0&0&0&1/6&1/6&1/6&1/6&0&0\\ 3&|&1/6&0&1/6&0&0&1/6&0&1/6&1/6&1/6&0\\ 4&|&1/6&0&1/6&1/6&0&0&0&1/6&0&1/6&1/6\\ 5&|&1/6&0&0&0&1/6&0&0&1/6&1/6&1/6&1/6\\ 6&|&1/6&0&0&1/6&1/6&1/6&0&0&0&0&2/6\\ 7&|&0&0&0&0&0&0&1/6&0&0&1/6&4/6\\ 8&|&0&0&0&0&1/6&0&1/6&1/6&0&0&3/6\\ 9&|&0&0&0&0&0&0&0&0&0&1&0\\ 10+&|&0&0&0&0&0&0&0&0&0&0&1\\ \end{bmatrix} $$ From this, I know that on the first roll, there is zero chance of winning, so we roll again. Then for every roll after that, we have to bring $P$ to the power of the $i$th roll. So for the second roll, the probabilities are $P^2$.

My questions are how would I find the expected number of rolls before the game ends for this matrix (or any general M) and how would I figure out the probability of winning? I can look at the matrix and figure out the probability of winning when I am in a particular state, but how would I figure it out for the entire game?