Math Problem Statement
Find a recurrence relation for the number of ternary
strings of length n that contain two consecutive sym-
bols that are the same. answer: "Let an be the number of ternary strings that contain two consecutive symbols that are the same. We will
develop a recurrence relation for an by exploiting the symmetry among the three symbols. In particular, it
must be the case that an/3 such strings start with each of the three symbols. Now let us see how we might
specify a string of length n satisfying the condition. We can choose the first symbol in any of three ways.
We can follow this by a string that starts with a different symbol but has in it a pair of consecutive symbols;
by what we have just said, there are 2an−1/3 such strings. Alternatively, we can follow the initial symbol
by another copy of itself and then any string of length n − 2; there are clearly 3n−2 such strings. Thus the
recurrence relation is an = 3 · ((2an−1/3) + 3n−2) = 2an−1 + 3n−1 . It is valid for all n ≥ 2." explain answer
Solution
Ask a new question for Free
By Image
Drop file here or Click Here to upload
Math Problem Analysis
Mathematical Concepts
Recurrence Relations
Ternary Strings
Combinatorics
Formulas
a_n = 2a_{n-1} + 3^{n-1}
Theorems
Recurrence relation derivation
Symmetry in ternary strings
Suitable Grade Level
Grades 11-12
Related Recommendation
Recurrence Relation for Ternary Strings with Consecutive Identical Symbols
Recurrence Relation for Ternary Strings with Consecutive Identical Symbols
Recurrence Relation for Ternary Strings with Consecutive Symbols
Recurrence Relation for Ternary Strings with Consecutive Symbols
Recurrence Relation for Ternary Strings without Consecutive Symbols