2015 AIME II Problem 12

Attempt Problem 12 of the 2015 AIME II below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2015 AIME II solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

12.

There are 210=10242^{10} = 1024 possible 1010-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 33 adjacent letters that are identical.
Answer: 548
Concepts:recursive countingarrangements with restrictions
Small hint:
The condition says every run of identical letters has length at most 3.3. Classify valid strings by the length of their first run.
Big hint:
If sns_n counts valid length-nn strings starting with a given letter, then sn=sn−1+sn−2+sn−3s_n = s_{n-1} + s_{n-2} + s_{n-3}
Solution:
The condition says every maximal run of identical letters has length at most 3.3. Let sns_n count the valid strings of length nn whose first letter is A; by symmetry the answer is 2s10.2s_{10}. Removing the first run (of length 1,1, 2,2, or 33) leaves a valid shorter string beginning with B, so sn=sn−1+sn−2+sn−3.s_n = s_{n-1} + s_{n-2} + s_{n-3}.
Starting from s1=1,s_1 = 1, s2=2,s_2 = 2, s3=4,s_3 = 4, the sequence runs 7,13,24,44,81,149,274,7, 13, 24, 44, 81, 149, 274, so s10=274.s_{10} = 274.
The number of valid strings is 2⋅274=548.2 \cdot 274 = 548.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.