Recursive algorithm probability

190 Views Asked by At

I'm trying to find the probability of obtaining a six on a dice roll following these rules:

  1. You roll a dice and if you roll $6$, then you win.
  2. However, if it is not $6$, you roll another dice.
  3. If the number on that dice is $3$ or less, then you repeat steps 1, 2 and 3.
    Otherwise ($4$ or more), you lose.

Thanks!

1

There are 1 best solutions below

0
On

Let the winning chance at the start be $p$. Note that if you roll $1,2,3$ on step 3, you are back at the start, so the chance of winning when you invoke step 3 and roll $1,2,3$ is $p$ as well. In step 3, do you lose on a $6$? That is how I read the rules. If so, your chance of winning at step 3 is $\frac 12p$. You should get an equation in $p$ to solve.