A ternary string is a string that is composed of at most three different symbols. 021102 is a ternary string over {0, 1, 2}, and acbabbc is a ternary string over {a, b, c}.
How many strings of length n contain consecutive symbols that are the same?
Examples: abcabc does not qualify, because there are no repeated letters. abccba does, because c repeats itself consecutively.
2007-01-02
13:00:01
·
6 answers
·
asked by
Jim Burnell
6
in
Science & Mathematics
➔ Mathematics
I mean at least one pair.
2007-01-02
13:04:03 ·
update #1
Just to make it more clear, I am looking for the number of ternary strings of at length n which contain AT LEAST one instance of a repeated symbol.
2007-01-02
13:05:51 ·
update #2