Difference between revisions of "2015 AIME II Problems/Problem 12"
Expilncalc (talk | contribs) m (→Nonrecursion Solution 3: Fixed formatting) |
Expilncalc (talk | contribs) m (→Nonrecursion Solution 3: Oops- last fix was bad) |
||
Line 61: | Line 61: | ||
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]. | 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]. | ||
− | <math>4 \rightarrow (3,3,3,1) = 4, (3,3,2,2) = 6 | + | <math>4 \rightarrow (3,3,3,1) = 4, (3,3,2,2) = 6</math> |
− | 5 \rightarrow (3, 3, 2, 1, 1) = 30, (3, 2, 2, 2, 1) = 20, (2,2,2,2,2)=1 | + | <math>5 \rightarrow (3, 3, 2, 1, 1) = 30, (3, 2, 2, 2, 1) = 20, (2,2,2,2,2)=1</math> |
− | 6 \rightarrow (3,3,1,1,1,1) = 15, (3,2,2,1,1,1) = 60, (2,2,2,2,1,1) = 15 | + | <math>6 \rightarrow (3,3,1,1,1,1) = 15, (3,2,2,1,1,1) = 60, (2,2,2,2,1,1) = 15</math> |
− | 7 \rightarrow (3,2,1,1,1,1,1) = 42, (2,2,2,1,1,1,1) = 35 | + | <math>7 \rightarrow (3,2,1,1,1,1,1) = 42, (2,2,2,1,1,1,1) = 35</math> |
− | 8 \rightarrow (3,1...1) = 8, (2,2,1...1) = 28 | + | <math>8 \rightarrow (3,1...1) = 8, (2,2,1...1) = 28</math> |
− | 9 \rightarrow (2,1...1) = 9 | + | <math>9 \rightarrow (2,1...1) = 9</math> |
− | 10 \rightarrow (1,1....1) =1 | + | <math>10 \rightarrow (1,1....1) =1</math> |
Adding them all up gives you 274; multiplying by 2 gives <math>\boxed{548}</math>. | Adding them all up gives you 274; multiplying by 2 gives <math>\boxed{548}</math>. |
Revision as of 10:01, 29 August 2017
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
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
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 2
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.
Nonrecursion Solution 3
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 .
Note
This problem has the same general approach as #22 on the 2015 AMC 12A.
In fact, if recursion was your method (solutions 1 and 2), you probably solved problem 8 of THIS AIME with recursion as well!
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.