Problem:
There are 210=1024 possible 10-letter strings in which each letter is either an A or a B. Find the number of such strings that do not have more than 3 adjacent letters that are identical.
Solution:
Let akβ,bkβ, and ckβ be the number of acceptable strings of length k that begin with exactly 1,2, or 3 of the same letter, respectively. For kβ₯3,bk+1β=akβ, ck+1β=bkβ, and ak+1β=akβ+bkβ+ckβ=akβ+akβ1β+akβ2β. Using the fact that a1β=2,a2β=2, and a3β=4, the recursion can be used to find the first 11 terms of the sequence anβ to be 2,2,4,8,14,26,48,88,162,298, and 548. The number of strings of length 10 that satisfy the requirement is a10β+b10β+c10β=a11β=548β.
The problems on this page are the property of the MAA's American Mathematics Competitions