2012 AMC 12B Problem 12

Attempt Problem 12 of the 2012 AMC 12B 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 2012 AMC 12B solutions, or check the answer key.

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

12.

How many sequences of zeros and/or ones of length 2020 have all the zeros consecutive, or all the ones consecutive, or both?
190190
192192
211211
380380
382382
Answer: E
Concepts:inclusion-exclusioncombinations
Small hint:
Let AA be the sequences with all zeros together and BB those with all ones together, then use ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A\cup B|=|A|+|B|-|A\cap B|
Big hint:
A sequence with the zeros together is fixed by choosing the first and last zero positions, giving 1+20+(202)1+20+\binom{20}{2} of them
Solution:
Let AA be the sequences in which all zeros are consecutive and BB those in which all ones are consecutive.
For A,A, there is one all-ones sequence, 2020 sequences with exactly one zero, and (202)=190\binom{20}{2}=190 sequences with two or more zeros (choose the first and last zero position). So ∣A∣=1+20+190=211,|A|=1+20+190=211, and by symmetry ∣B∣=211.|B|=211.
A sequence in A∩BA\cap B is a block of zeros followed by a block of ones, or the reverse; there are ∣A∩B∣=40|A\cap B|=40 of these.
Therefore ∣A∪B∣=211+211−40|A\cup B|=211+211-40 =382.=382.
Thus, the correct answer is E.
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.