2015 AIME II Problem 12
Problem 12 of 15HarderCombinatorics
There are possible -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 adjacent letters that are identical.
Your answer
Integer from 0 to 999
Show solution
Solution
The condition says every maximal run of identical letters has length at most Let count the valid strings of length whose first letter is A; by symmetry the answer is Removing the first run (of length or ) leaves a valid shorter string beginning with B, so
Starting from the sequence runs so
The number of valid strings is
Tagged: recursive counting · arrangements with restrictions