Probability consecutive numbers for unknown # dice

497 Views Asked by At

You're tossing $``n"$ number of dice (all of which are $6$-sided) one at a time.

What's the probability that any $3$ consecutive dice will be $6$?

What's the probability that any $3$ dice are $6$?

I'm having trouble understanding the fundamentals so the difference between the two are unclear to me when solving.

1

There are 1 best solutions below

7
On BEST ANSWER

This problem is clearly equivalent to enumerating the number of $n$ digit sequences with terms in the range $\{1,2,3,4,5,6\}$ such that no three consecutive sixes exist.

We can find a recursion, Let $a_n$ be the number we want.

We have $a_1=6.a_2=36,a_3=215$.

If $n\geq 3$ we can count the sequences as follows:

There are $5a_{n-1}$ sequences that don't end in $6$. The sequences that end in $6$ can be separated into the $5a_{n-2}$ sequences that don't end in $66$ and the $5a_{n-3}$ sequences that do end in $a_{n-3}$.

So the recursion is $a_n=5(a_{n-1}+a_{n-2}+a_{n-3})$. You can get a closed form by solving it, but for calculation purposes the recursion will probably be as good, as you can find it in linear time.