For , the first digits must all differ from and the next digit must be . Independence givesThus has the geometric distribution counting trials up to and including the first success, with success probability . For completeness, its mean follows from the tail-sum formula:The sum of the geometric series also proves finiteness of this expectation.
There is no forbidden pair in a sequence of length zero or one, so . For , divide acceptable sequences into two disjoint cases. If the first digit differs from , its probability is , and the remaining independent digits must avoid the pair. If the first digit is , the next must differ from , which has combined probability , and the remaining digits must avoid the pair. The boundary between this prefix and the remaining digits cannot create a forbidden pair, because the prefix ends in a digit other than . ConsequentlyThe characteristic polynomial of a linear recurrence is , with distinct rootsWriting , the initial conditions give and . ThereforeFor example, , since only one of the nine equally likely pairs is forbidden. This is the case with success probability of the avoidance recurrence for two consecutive successes.
Let be the time of the second occurrence of , whether or not it is adjacent to the first. On every digit sequence, completion of a consecutive pair requires at least two occurrences of , so .
The waiting time for the first has mean . Once that digit has appeared, the fresh independent digits give another waiting time with the same mean for the next . Thus , the mean of the corresponding negative binomial distribution. Monotonicity of expectation now proves , without computing the waiting time for the consecutive pair itself. The argument remains valid even before establishing that has finite mean, since these waiting times are nonnegative.
Articles by others on the same topic
There are currently no matching articles.