How Many Rounds Will I Last?

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.


Inspiration.


The answer is 1020.

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.

2 solutions

Arjen Vreugdenhil
Dec 17, 2015

Let E i E_i be the expected number of rounds that can be played when you have i i lives. We need to solve for E 3 E_3 .

Then the rules lead to the following equations: { E 1 = 1 + 9 10 E 2 E 2 = 1 + 9 10 E 3 + 1 10 E 1 E 3 = 1 + 9 10 E 3 + 1 10 E 2 \left\{\begin{array}{rl} E_1 = & 1 + \tfrac9{10}E_2 \\ E_2 = & 1 + \tfrac9{10}E_3 + \tfrac1{10}E_1 \\ E_3 = & 1 + \tfrac9{10}E_3 + \tfrac1{10}E_2 \end{array}\right.

To solve this, I noticed the similarity between the last two lines: E 3 = E 2 1 10 E 1 + 1 10 E 2 = 11 10 E 2 1 10 E 1 . E_3 = E_2 - \tfrac1{10}E_1 + \tfrac1{10}E_2 = \tfrac{11}{10}E_2 - \tfrac1{10}E_1. Substitute into the equation for E 2 E_2 : E 2 = 1 + 9 10 ( 11 10 E 2 1 10 E 1 ) = 1 + 99 100 E 2 + 1 100 E 1 E 2 = 100 + E 1 . E_2 = 1 + \tfrac9{10}(\tfrac{11}{10}E_2 - \tfrac1{10}E_1) = 1 + \tfrac{99}{100}E_2 + \tfrac1{100}E_1\ \therefore\ E_2 = 100 + E_1. Substitute this into the equation for E 1 E_1 : E 1 = 1 + 9 10 ( 100 + E 1 ) = 91 + 9 10 E 1 E 1 = 910. E_1 = 1 + \tfrac9{10}(100 + E_1) = 91 + \tfrac9{10}E_1\ \therefore\ E_1 = 910. Backsubstitute: E 2 = 100 + E 1 = 100 + 910 = 1010 ; E 3 = 11 10 E 2 1 10 E 1 = 1111 91 = 1020 . E_2 = 100 + E_1 = 100 + 910 = 1010;\ \ \ E_3 = \tfrac{11}{10}E_2 - \tfrac1{10}E_1 = 1111 - 91 = \boxed{1020}.

Alternatively, one can use matrix techniques. Start with the augmented matrix [ 1 9 / 10 0 1 1 / 10 1 9 / 10 1 0 1 / 10 1 / 10 1 ] \left[\begin{array}{ccc|c} 1 & -9/10 & 0 & 1 \\ -1/10 & 1 & -9/10 & 1 \\ 0 & -1/10 & 1/10 & 1 \end{array}\right] and apply row operations to obtain [ 1 0 0 910 0 1 0 1010 0 0 1 1020 ] . \left[\begin{array}{ccc|c} 1 & 0 & 0 & 910 \\ 0 & 1 & 0 & 1010 \\ 0 & 0 & 1 & 1020 \end{array}\right].

Arjen Vreugdenhil - 5 years, 5 months ago

My exact solution too.

Josh Banister - 5 years, 5 months ago

[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
chain = DiscreteMarkovProcess[
   4, {{1, 0, 0, 0}, {0.1, 0, 0.9, 0}, {0, 0.1, 0, 0.9}, {0, 0, 0.1, 
     0.9}}];

Mean[FirstPassageTimeDistribution[chain, {1}]]

The technique is described in detail here

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...