0

I have a question somewhat similar to: Expected number of tosses to get 3 consecutive Heads However for my purposes, you don't have to re-start from the beginning of a sequence if you fail a trial (usually), and I'm not sure if I'm calculating this correctly. The system in question come from a game, a part of which involves upgrading your gear, which is summarized below:

\begin{array}{||c} Level & Chance\ Of\ Success & Penalty\\ \hline 0\ to\ 1 & 100 & NA\\ 1\ to\ 2 & 100 & NA\\ 2\ to\ 3 & 100 & NA\\ 3\ to\ 4 & 100 & NA\\ 4\ to\ 5 & 100 & NA\\ 5\ to\ 6 & 50 & NA\\ 6\ to\ 7 & 50 & Lose\ 1\ level\\ 7\ to\ 8 & 50 & Lose\ 1\ level\\ 8\ to\ 9 & 40 & Lose\ 1\ level\\ 9\ to\ 10 & 40 & Lose\ 1\ level\\ 10\ to\ 11 & 40 & Reset\ to\ 0\\ \end{array}

Here is my attempt so far at figuring this out (my apologies if I'm completely wrong...):

-Levels 1 to 5 are self explanatory, 5 trials to get to level 5.

-Level 5 to 6 is simply levels 1-5 trials + 2 more trials.

-Levels 6 to 7 and 7 to 8 are equal to (previous trials) + (current level - 5)*2 + 2.

-Levels 8 to 9 and 9 to 10 are equal to (previous trials) + (((current level - 5)+4)*2)+1.

-Level 10 to 11 is equal to (previous trials * 2) + 1 [99 trials in total keeping in mind you cannot have fractional trials].

If I'm wrong please correct me, thank you for reading.

1 Answers1

1

Let $S_{i,i+1}$ be the expected number of steps needed to reach level $i+1$ from level $i$. It is obvious that $$ S_{i,i+1} = 1\quad\text{for}\ 0 \leq i \leq 4 $$ For $i = 5$, we have $$ S_{5, 6} = \frac{1}{2}\cdot 1 + \frac{1}{2} \cdot (1 + S_{5, 6})\ \Rightarrow\ S_{5,6} = 2 $$ because with probability $\frac{1}{2}$, we reach level $6$ after one step; with probability $\frac{1}{2}$, we remain in level $5$ which costs one step and we need extra $S_{5, 6}$ steps to reach level $6$. Similarly, for $i = 6, 7$, we have $$ S_{i, i+1} = \frac{1}{2} \cdot 1 + \frac{1}{2}\cdot (1 + S_{i - 1, i} +S_{i, i + 1})\ \Rightarrow\ S_{i,i+1} = 2 + S_{i-1,i} $$ and for $i = 8, 9$, we have $$ S_{i, i+1} = \frac{2}{5} \cdot 1 + \frac{3}{5} \cdot (1 + S_{i-1,i} + S_{i, i + 1}) \ \Rightarrow\ S_{i,i+1} = \frac{5}{2} + \frac{3}{2}S_{i-1,i} $$ and for $i = 10$, we have $$ S_{10,11} = \frac{2}{5} \cdot 1 + \frac{3}{5} \cdot (1 + S_{0,1} + S_{1, 2} + \cdots + S_{10,11}) \ \Rightarrow\ S_{10,11} = \frac{5}{2} + \frac{3}{2}(S_{0,1} + \cdots + S_{9, 10}) $$

Consequently, the expected total # of steps needed to reach level $11$ from level $0$ is $$ S_{0,1} + S_{1,2} + \cdots + S_{10,11} $$

PSPACEhard
  • 10,283
  • Thank you for the input, though I have to admit I'm a bit confused on the 'S notation' (which is completely my fault). If I'm understanding this correctly, if i = 6, the 'English' equivalent would be: The # of steps needed to get from 6 to 6+1 is equal to 2+ the # of steps needed to get from 6-1, 5 -> 7 total steps? I'm not sure what is going on there. – bdolebli Mar 23 '17 at 15:23
  • @bdolebli To reach level $7$ from level $6$, with probability $\frac{1}{2}$, you directly go to level $7$ (this costs one step); and with probability $\frac{1}{2}$, you go first to level $5$ (one step) and then you need to reach level $6$ from level $5$ and then reach level $7$ from level $6$. Therefore, $$S_{6, 7} = \frac{1}{2} \cdot 1 + \frac{1}{2} \cdot (1 + S_{5, 6} + S_{6, 7})$$ Solving this equation, we can obtain $$S_{6, 7} = 2 + S_{5, 6}$$ and if we know the value of $S_{5, 6}$, we can know $S_{6, 7}$. – PSPACEhard Mar 23 '17 at 15:29
  • Ah, I think I get it now, thank you very much for the help. – bdolebli Mar 23 '17 at 18:22