Is there any formula to find the probability of not getting heads $3$ times in a row in $20$ tosses? I know that the probability of getting heads $3$ times in a row is $(1/2)^3 = 1/8$. An explanation would greatly appreciated.
Thank You
Is there any formula to find the probability of not getting heads $3$ times in a row in $20$ tosses? I know that the probability of getting heads $3$ times in a row is $(1/2)^3 = 1/8$. An explanation would greatly appreciated.
Thank You
We shall use $0$ to denote a tail & $1$ to denote a head. We want to generate binary words of length $20$ that avoid $111$.
Let $a_n$ denote the number of binary words that end with 0 and avoid $111$. Let $\phi_{0}(x)$ denote the generating function for $_n$. Let $b_n$ denote the number of binary words that end with 01 and avoid $111$. Let $\phi_{01}(x)$ denote the generating function for $b_n$. Let $c_n$ denote the number of binary words that end with 11 and avoid $111$. Let $\phi_{11}(x)$ denote the generating function for $c_n$. These functions satisfy the following recursive formulea \begin{eqnarray*} \phi_{11}(x)=x \phi_{01} \\ \phi_{01}(x)=x \phi_{0} \\ \phi_{0}(x)=x+x(\phi_{0}+\phi_{01}+\phi_{11}) \end{eqnarray*} Now solve these and find the coefficients $x^{20}$ in $\phi_{11}$,$\phi_{01}$ and $\phi_{0}$. Add these together to get an answer.