Take a test Sign in 中文
← Exercise 443 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
AIME Contents · by chapter
Basic Counting (90)
---- (44)
Probability (91)

Exercises and their solutions

Exercise 443
Consider sequences that consist entirely of $A$'s and $B$'s and that have the property that every run of consecutive $A$'s has even length, and every run of consecutive $B$'s has odd length. Examples of such sequences are $AA$, $B$, and $AABAA$, while $BBAB$ is not such a sequence. How many such sequences have length 16?
← Back to Problem 443
Solution
  1. Let $a_n$ and $b_n$ count valid sequences of length $n$ ending in $A$ and $B$.
  2. Then $a_n=a_{n-2}+b_{n-2}$ and $b_n=a_{n-1}+b_{n-2}$.
  3. Starting from $a_1=0,b_1=1,a_2=1,b_2=0$ and iterating to $n=16$ gives $a_{16}+b_{16}=377$.
  4. The answer is $\boxed{377}$.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year
1985 (1 problems)
1984 (1 problems)