Difference between revisions of "2015 AMC 12A Problems/Problem 22"

(Solution 2)
m (Solution 3 (Easy Version))
 
(29 intermediate revisions by 11 users not shown)
Line 5: Line 5:
 
<math>\textbf{(A)}\ 0\qquad\textbf{(B)}\ 4\qquad\textbf{(C)}\ 6\qquad\textbf{(D)}\ 8\qquad\textbf{(E)}\ 10 </math>
 
<math>\textbf{(A)}\ 0\qquad\textbf{(B)}\ 4\qquad\textbf{(C)}\ 6\qquad\textbf{(D)}\ 8\qquad\textbf{(E)}\ 10 </math>
  
==Solution==
+
==Solution 1==
  
 
One method of approach is to find a recurrence for <math>S(n)</math>.  
 
One method of approach is to find a recurrence for <math>S(n)</math>.  
Line 27: Line 27:
 
Knowing that <math>A(2015) \equiv 0\ \text{mod}\ 2</math> and <math>A(2015) \equiv 1\ \text{mod}\ 3</math>, we see that <math>A(2015) \equiv 4\ \text{mod}\ 6</math>, and <math>S(2015) \equiv 8\ \text{mod}\ 12</math>. Hence, the answer is <math>\textbf{(D)}</math>.
 
Knowing that <math>A(2015) \equiv 0\ \text{mod}\ 2</math> and <math>A(2015) \equiv 1\ \text{mod}\ 3</math>, we see that <math>A(2015) \equiv 4\ \text{mod}\ 6</math>, and <math>S(2015) \equiv 8\ \text{mod}\ 12</math>. Hence, the answer is <math>\textbf{(D)}</math>.
  
 +
* Note that instead of introducing <math>A(n)</math> and <math>B(n)</math>, we can simply write the relation <math>S(n)=S(n-1)+S(n-2)+S(n-3),</math> and proceed as above.
  
 +
==Recursion Solution 2==
 +
The huge <math>n</math> value in place, as well as the "no more than... in a row" are key phrases that indicate recursion is the right way to go.
 +
Let's go with finding the case of <math>S(n)</math> from previous cases.
 +
So how can we make the words of <math>S(n)</math>? Do we choose 3-in-a-row of one letter, <math>A</math> or <math>B</math>, or do we want <math>2</math> consecutive ones or <math>1</math>? Note that this covers all possible cases of ending with <math>A</math> and <math>B</math> with a certain number of consecutive letters. And obviously they are all distinct.
  
==Solution 2==
+
[Convince yourself that each case for <math>S(n)</math> is considered exactly once by using these cues: does it end in <math>3</math>, <math>2</math>, or <math>1</math> consecutive letter(s) (<math>1</math> consecutive means a string like ...<math>BA</math>, ...<math>AB</math>, as in the letter switches) and does it <math>WLOG</math> consider both <math>A</math> and <math>B?</math>]
  
We can also go straight to S(2015). We know that there are 2^2015 permutations if we do not consider the rule of "no three As or Bs in a row".
+
From there we realize that <math>S(n)=S(n-1)+S(n-2)+S(n-3)</math> because 3 in a row requires <math>S(n-3)</math>, and so on. We need to find <math>S(2015)</math> mod 12. We first compute <math>S(2015)</math> mod <math>3</math> and mod <math>4</math>. By listing out the residues mod <math>3</math>, we find that the cycle length for mod <math>3</math> is <math>13</math>. <math>2015</math> is <math>0</math> mod <math>13</math> so <math>S(2015) = S(13) = 2</math> mod <math>3</math>. By listing out the residues mod <math>4</math>, we find that the cycle length for mod <math>4</math> is <math>4</math>. S(2015) = S(3) = mod <math>4</math>. By Chinese Remainder Theorem, <math>S(2015) =\boxed{8}</math> mod <math>12</math>.
  
Now if the rule is considered, Assume that there the 3 As and 3Bs are in the very front. That would yield (1/2)^3 * 2^2012 * 2 permutations. Now consider where those three As or three Bs can be placed. There are 2013 places where the consecutive letter can be put. Thus there are 2^2015 - 2^2010 * 2013 permutations allowed.
+
==Solution 3 (Easy Version)==
 +
We can start off by finding patterns in <math>S(n)</math>. When we calculate a few values we realize either from performing the calculation or because the calculation was performed in the exact same way that <math>S(n) = 2^n - 2((n_4)- (n_5) \dots (n_n))</math>. Rearranging the expression we realize that the terms aside from <math>2^{2015}</math> are congruent to <math>0</math> mod <math>12</math>(Just put the equation in terms of 2^{2015} and the four combinations excluded and calculate the combinations mod <math>12</math>). Using patterns we can see that <math>2^{2015}</math> is congruent to <math>8</math> mod <math>12</math>. Therefore <math>\boxed {8}</math> is our answer.
  
Now do some calculation we can know that <math>2^1 \equiv 2\ \text{mod}\ 12</math>, <math>2^2 \equiv 4\ \text{mod}\ 12</math>, <math>2^3 \equiv 8\ \text{mod}\ 12</math>, ... 2^2010 \equiv 4\ \text{mod}\ 12, ... 2^2015 \equiv 8\ \text{mod}\ 12. Also, from division, <math>2013 \equiv 9\ \text{mod}\ 12</math>. So <math>2^2015 - 2^2010*2013 \equiv 8\ \text{mod}\ 12</math>.
+
== Video Solution by Richard Rusczyk ==
  
Thus, the answer is <math>\textbf{(D)}</math>.
+
https://artofproblemsolving.com/videos/amc/2015amc12a/400
 +
 
 +
~ dolphin7
  
 
== See Also ==
 
== See Also ==
 
{{AMC12 box|year=2015|ab=A|num-b=21|num-a=23}}
 
{{AMC12 box|year=2015|ab=A|num-b=21|num-a=23}}

Latest revision as of 21:03, 21 June 2020

Problem

For each positive integer $n$, let $S(n)$ be the number of sequences of length $n$ consisting solely of the letters $A$ and $B$, with no more than three $A$s in a row and no more than three $B$s in a row. What is the remainder when $S(2015)$ is divided by $12$?

$\textbf{(A)}\ 0\qquad\textbf{(B)}\ 4\qquad\textbf{(C)}\ 6\qquad\textbf{(D)}\ 8\qquad\textbf{(E)}\ 10$

Solution 1

One method of approach is to find a recurrence for $S(n)$.

Let us define $A(n)$ as the number of sequences of length $n$ ending with an $A$, and $B(n)$ as the number of sequences of length $n$ ending in $B$. Note that $A(n) = B(n)$ and $S(n) = A(n) + B(n)$, so $S(n) = 2A(n)$.

For a sequence of length $n$ ending in $A$, it must be a string of $A$s appended onto a sequence ending in $B$ of length $n-1, n-2, \text{or}\ n-3$. So we have the recurrence: \[A(n) = B(n-1) + B(n-2) + B(n-3) = A(n-1) + A(n-2) + A(n-3)\]

We can thus begin calculating values of $A(n)$. We see that the sequence goes (starting from $A(0) = 1$): $1,1,2,4,7,13,24...$

A problem arises though: the values of $A(n)$ increase at an exponential rate. Notice however, that we need only find $S(2015)\ \text{mod}\ 12$. In fact, we can use the fact that $S(n) = 2A(n)$ to only need to find $A(2015)\ \text{mod}\ 6$. Going one step further, we need only find $A(2015)\ \text{mod}\ 2$ and $A(2015)\ \text{mod}\ 3$ to find $A(2015)\ \text{mod}\ 6$.

Here are the values of $A(n)\ \text{mod}\ 2$, starting with $A(0)$: \[1,1,0,0,1,1,0,0...\]

Since the period is $4$ and $2015 \equiv 3\ \text{mod}\ 4$, $A(2015) \equiv 0\ \text{mod}\ 2$.

Similarly, here are the values of $A(n)\ \text{mod}\ 3$, starting with $A(0)$: \[1,1,2,1,1,1,0,2,0,2,1,0,0,1,1,2...\]

Since the period is $13$ and $2015 \equiv 0\ \text{mod}\ 13$, $A(2015) \equiv 1\ \text{mod}\ 3$.

Knowing that $A(2015) \equiv 0\ \text{mod}\ 2$ and $A(2015) \equiv 1\ \text{mod}\ 3$, we see that $A(2015) \equiv 4\ \text{mod}\ 6$, and $S(2015) \equiv 8\ \text{mod}\ 12$. Hence, the answer is $\textbf{(D)}$.

  • Note that instead of introducing $A(n)$ and $B(n)$, we can simply write the relation $S(n)=S(n-1)+S(n-2)+S(n-3),$ and proceed as above.

Recursion Solution 2

The huge $n$ value in place, as well as the "no more than... in a row" are key phrases that indicate recursion is the right way to go. Let's go with finding the case of $S(n)$ from previous cases. So how can we make the words of $S(n)$? Do we choose 3-in-a-row of one letter, $A$ or $B$, or do we want $2$ consecutive ones or $1$? Note that this covers all possible cases of ending with $A$ and $B$ with a certain number of consecutive letters. And obviously they are all distinct.

[Convince yourself that each case for $S(n)$ is considered exactly once by using these cues: does it end in $3$, $2$, or $1$ consecutive letter(s) ($1$ consecutive means a string like ...$BA$, ...$AB$, as in the letter switches) and does it $WLOG$ consider both $A$ and $B?$]

From there we realize that $S(n)=S(n-1)+S(n-2)+S(n-3)$ because 3 in a row requires $S(n-3)$, and so on. We need to find $S(2015)$ mod 12. We first compute $S(2015)$ mod $3$ and mod $4$. By listing out the residues mod $3$, we find that the cycle length for mod $3$ is $13$. $2015$ is $0$ mod $13$ so $S(2015) = S(13) = 2$ mod $3$. By listing out the residues mod $4$, we find that the cycle length for mod $4$ is $4$. S(2015) = S(3) = mod $4$. By Chinese Remainder Theorem, $S(2015) =\boxed{8}$ mod $12$.

Solution 3 (Easy Version)

We can start off by finding patterns in $S(n)$. When we calculate a few values we realize either from performing the calculation or because the calculation was performed in the exact same way that $S(n) = 2^n - 2((n_4)- (n_5) \dots (n_n))$. Rearranging the expression we realize that the terms aside from $2^{2015}$ are congruent to $0$ mod $12$(Just put the equation in terms of 2^{2015} and the four combinations excluded and calculate the combinations mod $12$). Using patterns we can see that $2^{2015}$ is congruent to $8$ mod $12$. Therefore $\boxed {8}$ is our answer.

Video Solution by Richard Rusczyk

https://artofproblemsolving.com/videos/amc/2015amc12a/400

~ dolphin7

See Also

2015 AMC 12A (ProblemsAnswer KeyResources)
Preceded by
Problem 21
Followed by
Problem 23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 12 Problems and Solutions