In my favorite game, I start with 3 lives. In each round, I have a 10% chance of dying, losing a life. If I don't die, I am given an extra life, but I cannot ever have more than 3 lives.
What is the expected value for the number of rounds I will play before losing the game (when I lose my final life)?
Note: Each round is counted, even if you lose a life in the round.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Alternatively, one can use matrix techniques. Start with the augmented matrix ⎣ ⎡ 1 − 1 / 1 0 0 − 9 / 1 0 1 − 1 / 1 0 0 − 9 / 1 0 1 / 1 0 1 1 1 ⎦ ⎤ and apply row operations to obtain ⎣ ⎡ 1 0 0 0 1 0 0 0 1 9 1 0 1 0 1 0 1 0 2 0 ⎦ ⎤ .
My exact solution too.
[meta solution]
Arjen's solution already shows an elegant way to solve the problem.
Here is how we could use a Markov chain model in Mathematica to solve the problem:
1 2 3 4 5 |
|
The technique is described in detail here
Problem Loading...
Note Loading...
Set Loading...
Let E i be the expected number of rounds that can be played when you have i lives. We need to solve for E 3 .
Then the rules lead to the following equations: ⎩ ⎨ ⎧ E 1 = E 2 = E 3 = 1 + 1 0 9 E 2 1 + 1 0 9 E 3 + 1 0 1 E 1 1 + 1 0 9 E 3 + 1 0 1 E 2
To solve this, I noticed the similarity between the last two lines: E 3 = E 2 − 1 0 1 E 1 + 1 0 1 E 2 = 1 0 1 1 E 2 − 1 0 1 E 1 . Substitute into the equation for E 2 : E 2 = 1 + 1 0 9 ( 1 0 1 1 E 2 − 1 0 1 E 1 ) = 1 + 1 0 0 9 9 E 2 + 1 0 0 1 E 1 ∴ E 2 = 1 0 0 + E 1 . Substitute this into the equation for E 1 : E 1 = 1 + 1 0 9 ( 1 0 0 + E 1 ) = 9 1 + 1 0 9 E 1 ∴ E 1 = 9 1 0 . Backsubstitute: E 2 = 1 0 0 + E 1 = 1 0 0 + 9 1 0 = 1 0 1 0 ; E 3 = 1 0 1 1 E 2 − 1 0 1 E 1 = 1 1 1 1 − 9 1 = 1 0 2 0 .