Difference between revisions of "2015 AIME II Problems/Problem 12"
(→Remark) |
|||
(One intermediate revision by the same user not shown) | |||
Line 203: | Line 203: | ||
-lpieleanu | -lpieleanu | ||
+ | |||
+ | ==Remark== | ||
+ | 2015 AMC 12A #22 is a harder version of this problem. | ||
==See also== | ==See also== | ||
{{AIME box|year=2015|n=II|num-b=11|num-a=13}} | {{AIME box|year=2015|n=II|num-b=11|num-a=13}} | ||
{{MAA Notice}} | {{MAA Notice}} |
Latest revision as of 18:54, 10 June 2024
Contents
Problem
There are 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 1
Let be the number of ways to form
-letter strings made up of As and Bs such that no more than
adjacent letters are identical.
Note that, at the end of each -letter string, there are
possibilities for the last letter chain: it must be either
,
, or
letters long. Removing this last chain will make a new string that is
,
, or
letters long, respectively.
Therefore we can deduce that .
We can see that
so using our recursive relation we find
Solution 2
The solution is a simple recursion:
We have three cases for the ending of a string: three in a row, two in a row, and a single:
...AAA
...BAA
...BBA or ...ABA
(Here, WLOG each string ends with A. This won't be the case when we actually solve for values in recursion.)
For case , we could only add a B to the end, making it a case
.
For case
, we could add an A or a B to the end, making it a case
if you add an A, or a case
if you add a B.
For case
, we could add an A or a B to the end, making it a case
or a case
.
Let us create three series to represent the number of permutations for each case: ,
, and
representing case
,
, and
respectively.
The series have the following relationship:
;
;
For :
and
both equal
,
. With some simple math, we have:
,
, and
.
Summing the three up we have our solution:
.
Solution 3
This is a recursion problem. Let be the number of valid strings of
letters, where the first letter is
. Similarly, let
be the number of valid strings of
letters, where the first letter is
.
Note that for all
.
Similarly, we have for all
.
Here is why: every valid strings of letters
where the first letter is
must begin with one of the following:
- and the number of valid ways is
.
- and the number of valid ways is
.
- and there are
ways.
We know that ,
, and
. Similarly, we have
,
, and
. We can quickly check our recursion to see if our recursive formula works. By the formula,
, and listing out all
, we can quickly verify our formula.
Therefore, we have the following:
The total number of valid letter strings is equal to
.
Notice that , since
,
, and
. Therefore, we didn't really need to list out both recursion formulas, which could save us some time.
Solution 4 (Without Recursion)
Playing around with strings gives this approach: We have a certain number of As, then Bs, and so on. Therefore, what if we denoted each solution with numbers like to denote AAABBBAAAB or vice versa (starting with Bs)? Every string can be represented like this!
We can have from 4 to 10 numbers in our parentheses. For each case, we will start with the largest number possible, usually a bunch of 3s, then go down systematically. Realize also that if we are left with just 2s and 1s, there is only one number of 2s and 1s that adds up to the leftover amount. Our final answer is the sum of all of these parenthetical sets [each set multiplied by its permutations, as order matters] multiplied by two [starting with either A or B, and alternating as we go along].
Adding them all up gives you 274; multiplying by 2 gives .
Solution 5
We are going to build the string, 1 character at a time. And, we are going to only care about the streak of letters at the end of the string.
Let be the number of strings of length n that satisfy the problem statement and also has a "streak" of length 1 at the end. ABABBA has a streak of length 1.
Let be the number of strings of length n that satisfy the problem statement and also has of length 2 at the end. ABABBAA has a streak of length 2. There are 2 "A" s at the end of the string.
Let be the number of string of length n that that satisfy the problem statement and also has a "streak" of length 3 at the end. ABABBAAA has a streak of length 3. There are 3 "A" s at the end of the string.
Let's establish a recursive relationship. , since you can simply break the streak.
, and
Since you can just add to the streak.
We can log everything using a table.
Adding ,
,
gets the total number of numbers that doesn't have more than 3 concecutive letters.
That gets a total of
-AlexLikeMath
Solution 6
Let be the number of n-letter strings satisfying the problem criteria. Then we can easily see
. For
consider the last three elements of the list. For example to get
we could try to take
and multiply by 2 since for each
string we have two choices for the fifth character. However we have to be careful if the last three characters of
are all the same, as in that case we would be overcounting, (i.e if we have a string
, we can only add
to the end so that the problem criteria is satisfied. Additionally strings such as
or
should only be counted once as we only have one choice for the
th character to add (
and
respectively).
Thus to compute we start with
then take out the strings ending in
or
. There are
remaining valid strings (i.e if we pick any of the
valid strings, examine the last character, if it is a
then we append
to it, and if if it an
we append
to it, hence the number of
strings are in one-to-one correspondence with the number of strings in
. Thus we have the recursion
(where we are first taking away
, doubling the result, then adding
back in signifying that we only count it once, as described above).
The recursion simplifies to and we can now quickly compute the remaining values:
~afroromanian
Solution 7 (Generating Functions)
Let us define a "run" as a set of consecutive letters that are all the same and let a "maximal run" be a run that is not the proper subset of any other run, in other words, it cannot be expanded.
From now on, we consider all runs to be maximal.
Note that the minimum number of runs in the -letter string is
(or else the Pigeonhole Principle tells us that at least
run has
or more letters in it, contradiction), and the maximum number of runs is clearly
Since an arbitrary run can have anywhere from to
letters in it, it follows that the number of
-letter strings with
runs (where
) is
i.e. twice the coefficient of
in the expansion of
(Note that we multiplied by
because there are two choices for which letter the first run has and then the rest are fixed).
Hence, we wish to find
First, we can rewrite this as
\begin{align*}
\sum_{n=4}^{10} [x^{10}] (x+x^2+x^3)^n &= \sum_{n=4}^{10} [x^{10}] \ x^n \cdot (1+x+x^2)^n \\
&= \sum_{n=4}^{10} [x^{10-n}] \left(\frac{1-x^3}{1-x}\right)^n \\
&= \sum_{n=4}^{10} [x^{10-n}] \frac{(1-x^3)^n}{(1-x)^n}. \\
\end{align*}
Now, we proceed case by case, utilizing the Binomial Theorem for the numerator in all of the cases:
For we have
\begin{align*}
[x^6] \frac{(1-x^3)^4}{(1-x)^4} &= \binom{4}{0} [x^6] (1-x)^{-4} - \binom{4}{1} [x^3] (1-x)^{-4} + \binom{4}{2} [x^0] (1-x)^{-4} \\
&= 1\cdot\binom{9}{3} - 4\cdot\binom{6}{3} + 6\cdot\binom{3}{3} \\
&= 1\cdot84-4\cdot20+6\cdot1 \\
&= 84-80+6 \\
&= \underline{10}.
\end{align*}
For
we have
\begin{align*}
[x^5] \frac{(1-x^3)^5}{(1-x)^5} &= \binom{5}{0} [x^5] (1-x)^{-5} - \binom{5}{1}[x^2] (1-x)^{-5} \\
&= 1\cdot\binom{9}{4}-5\cdot\binom{6}{4} \\
&= 1\cdot126-5\cdot15 \\
&= 126-75 \\
&= \underline{51}.
\end{align*}For
we have
\begin{align*}
[x^4] \frac{(1-x^3)^6}{(1-x)^6} &= \binom{6}{0} [x^4](1-x)^{-6} - \binom{6}{1}[x^1](1-x)^{-6} \\
&= 1 \cdot \binom{9}{5} - 6 \cdot \binom{6}{5} \\
&= 1 \cdot 126 - 6 \cdot 6 \\
&= 126-36 \\
&= \underline{90}.
\end{align*}For
we have
\begin{align*}
[x^3] \frac{(1-x^3)^7}{(1-x)^7} &= \binom{7}{0}[x^3](1-x)^{-7} - \binom{7}{1}[x^0](1-x)^{-7} \\
&= 1\cdot \binom{9}{6} - 7\cdot\binom{6}{6} \\
&= 1\cdot84-7\cdot1\\
&= 84-7 \\
&= \underline{77}.
\end{align*}For
we have
\begin{align*}
[x^2] \frac{(1-x^3)^8}{(1-x)^8} &=\binom{8}{0} [x^2](1-x)^{-8} \\
&= 1\cdot\binom{9}{7} \\
&= 1\cdot36 \\
&= \underline{36}.
\end{align*}For
we have
\begin{align*}
[x^1] \frac{(1-x^3)^9}{(1-x)^9} &= \binom{9}{0} [x^1] (1-x)^{-9}\\
&= 1\cdot\binom{9}{8} \\
&= 1\cdot9 \\
&= \underline{9}.
\end{align*}For
we have
\begin{align*}
[x^0] \frac{(1-x^3)^{10}}{(1-x)^{10}} &= [x^0] (1-x)^{-10} \\
&= 1\cdot\binom{9}{9} \\
&= 1\cdot1 \\
&= \underline{1}.
\end{align*}Hence, the answer is
\begin{align*}
2\sum_{n=4}^{10} [x^{10-n}] \frac{(1-x^3)^n}{(1-x)^n} &= 2(10+51+90+77+36+9+1) \\
&= 2\cdot274 \\
&= \boxed{548}.
\end{align*}
-lpieleanu
Remark
2015 AMC 12A #22 is a harder version of this problem.
See also
2015 AIME II (Problems • Answer Key • Resources) | ||
Preceded by Problem 11 |
Followed by Problem 13 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.