Difference between revisions of "2021 AMC 10A Problems/Problem 20"
|  (→Solution 6 (Overcounting)) |  (→Solution 5 (Casework on the Position of 5)) | ||
| Line 201: | Line 201: | ||
| ~~Xhte | ~~Xhte | ||
| − | == Solution  | + | == Solution 4 (Casework on the Position of 5) == | 
| We only need to find the # of rearrangements when 5 is the 4th digit and 5th digit. Find the total, and multiply by 2. Then we can get the answer by adding the case when 5 is the third digit. | We only need to find the # of rearrangements when 5 is the 4th digit and 5th digit. Find the total, and multiply by 2. Then we can get the answer by adding the case when 5 is the third digit. | ||
Revision as of 19:50, 13 October 2025
Contents
- 1 Problem
- 2 Solution 2 (Enumeration by Symmetry)
- 3 Solution 3 (Casework on the Consecutive Digits)
- 4 Solution 4 (Casework Similar to Solution 3)
- 5 Solution 4 (Casework on the Position of 5)
- 6 Solution 5 (Overcounting)
- 7 Solution 6 (Using a Table)
- 8 Solution 7 (Symmetry)
- 9 Solution 8 (PIE: No Casework)
- 10 Solution 9 (Quick)
- 11 Solution 10 (Brute Force)
- 12 Video Solution by OmegaLearn (Using PIE - Principle of Inclusion Exclusion)
- 13 Video Solution by Power of Logic (Using Idea of Symmetrically Counting)
- 14 Video Solution by TheBeautyofMath
- 15 See Also
Problem
In how many ways can the sequence  be rearranged so that no three consecutive terms are increasing and no three consecutive terms are decreasing?
 be rearranged so that no three consecutive terms are increasing and no three consecutive terms are decreasing?
 
Solution 2 (Enumeration by Symmetry)
By symmetry with respect to  note that
 note that  is a valid sequence if and only if
 is a valid sequence if and only if  is a valid sequence. We enumerate the valid sequences that start with
 is a valid sequence. We enumerate the valid sequences that start with  or
 or  as shown below:
 as shown below:
![[asy] /* Made by MRENTHUSIASM */ size(16cm);  draw((0.25,0)--(1.75,3),red,EndArrow); draw((0.25,0)--(1.75,0),red,EndArrow); draw((0.25,0)--(1.75,-3),red,EndArrow); draw((2.25,3)--(3.75,3),red,EndArrow); draw((2.25,0)--(3.75,0.75),red,EndArrow); draw((2.25,0)--(3.75,-0.75),red,EndArrow); draw((2.25,-3)--(3.75,-2.25),red,EndArrow); draw((2.25,-3)--(3.75,-3.75),red,EndArrow); draw((4.25,3)--(5.75,3),red,EndArrow); draw((4.25,0.75)--(5.75,0.75),red,EndArrow); draw((4.25,-0.75)--(5.75,-0.75),red,EndArrow); draw((4.25,-2.25)--(5.75,-2.25),red,EndArrow); draw((4.25,-3.75)--(5.75,-3.75),red,EndArrow); draw((6.25,3)--(7.75,3),red,EndArrow); draw((6.25,0.75)--(7.75,0.75),red,EndArrow); draw((6.25,-0.75)--(7.75,-0.75),red,EndArrow); draw((6.25,-2.25)--(7.75,-2.25),red,EndArrow); draw((6.25,-3.75)--(7.75,-3.75),red,EndArrow);  label("$1$",(0,0)); label("$3$",(2,3)); label("$2$",(4,3)); label("$5$",(6,3)); label("$4$",(8,3));  label("$4$",(2,0)); label("$2$",(4,0.75)); label("$5$",(6,0.75)); label("$3$",(8,0.75)); label("$3$",(4,-0.75)); label("$5$",(6,-0.75)); label("$2$",(8,-0.75));  label("$5$",(2,-3)); label("$2$",(4,-2.25)); label("$4$",(6,-2.25)); label("$3$",(8,-2.25)); label("$3$",(4,-3.75)); label("$4$",(6,-3.75)); label("$2$",(8,-3.75));  draw((12.75,0)--(14.25,4.5),red,EndArrow); draw((12.75,0)--(14.25,1.5),red,EndArrow); draw((12.75,0)--(14.25,-1.5),red,EndArrow); draw((12.75,0)--(14.25,-4.5),red,EndArrow); draw((14.75,4.5)--(16.25,5.25),red,EndArrow); draw((14.75,4.5)--(16.25,3.75),red,EndArrow); draw((14.75,1.5)--(16.25,1.5),red,EndArrow); draw((14.75,-1.5)--(16.25,-0.75),red,EndArrow); draw((14.75,-1.5)--(16.25,-2.25),red,EndArrow); draw((14.75,-4.5)--(16.25,-3.75),red,EndArrow); draw((14.75,-4.5)--(16.25,-5.25),red,EndArrow); draw((16.75,5.25)--(18.25,5.25),red,EndArrow); draw((16.75,3.75)--(18.25,3.75),red,EndArrow); draw((16.75,1.5)--(18.25,1.5),red,EndArrow); draw((16.75,-0.75)--(18.25,-0.75),red,EndArrow); draw((16.75,-2.25)--(18.25,-2.25),red,EndArrow); draw((16.75,-3.75)--(18.25,-3.75),red,EndArrow); draw((16.75,-5.25)--(18.25,-5.25),red,EndArrow); draw((18.75,5.25)--(20.25,5.25),red,EndArrow); draw((18.75,3.75)--(20.25,3.75),red,EndArrow); draw((18.75,1.5)--(20.25,1.5),red,EndArrow); draw((18.75,-0.75)--(20.25,-0.75),red,EndArrow); draw((18.75,-2.25)--(20.25,-2.25),red,EndArrow); draw((18.75,-3.75)--(20.25,-3.75),red,EndArrow); draw((18.75,-5.25)--(20.25,-5.25),red,EndArrow);  label("$2$",(12.5,0)); label("$1$",(14.5,4.5)); label("$3$",(14.5,1.5)); label("$4$",(14.5,-1.5)); label("$5$",(14.5,-4.5));  label("$4$",(16.5,5.25)); label("$5$",(16.5,3.75)); label("$1$",(16.5,1.5)); label("$1$",(16.5,-0.75)); label("$3$",(16.5,-2.25)); label("$1$",(16.5,-3.75)); label("$3$",(16.5,-5.25));  label("$3$",(18.5,5.25)); label("$3$",(18.5,3.75)); label("$5$",(18.5,1.5)); label("$5$",(18.5,-0.75)); label("$5$",(18.5,-2.25)); label("$4$",(18.5,-3.75)); label("$4$",(18.5,-5.25));  label("$5$",(20.5,5.25)); label("$4$",(20.5,3.75)); label("$4$",(20.5,1.5)); label("$3$",(20.5,-0.75)); label("$1$",(20.5,-2.25)); label("$3$",(20.5,-3.75)); label("$1$",(20.5,-5.25));  draw((25.25,0)--(26.75,1.5),red,EndArrow); draw((25.25,0)--(26.75,-1.5),red,EndArrow); draw((27.25,1.5)--(28.75,2.25),red,EndArrow); draw((27.25,1.5)--(28.75,0.75),red,EndArrow); draw((27.25,-1.5)--(28.75,-0.75),red,EndArrow); draw((27.25,-1.5)--(28.75,-2.25),red,EndArrow); draw((29.25,2.25)--(30.75,2.25),red,EndArrow); draw((29.25,0.75)--(30.75,0.75),red,EndArrow); draw((29.25,-0.75)--(30.75,-0.75),red,EndArrow); draw((29.25,-2.25)--(30.75,-2.25),red,EndArrow); draw((31.25,2.25)--(32.75,2.25),red,EndArrow); draw((31.25,0.75)--(32.75,0.75),red,EndArrow); draw((31.25,-0.75)--(32.75,-0.75),red,EndArrow); draw((31.25,-2.25)--(32.75,-2.25),red,EndArrow);  label("$3$",(25,0)); label("$1$",(27,1.5)); label("$2$",(27,-1.5));  label("$4$",(29,2.25)); label("$5$",(29,0.75)); label("$4$",(29,-0.75)); label("$5$",(29,-2.25));  label("$2$",(31,2.25)); label("$2$",(31,0.75)); label("$1$",(31,-0.75)); label("$1$",(31,-2.25));  label("$5$",(33,2.25)); label("$4$",(33,0.75)); label("$5$",(33,-0.75)); label("$4$",(33,-2.25)); [/asy]](http://latex.artofproblemsolving.com/e/f/0/ef06198636b6f7c4c4d58d3f4d61992943bf21af.png) 
There are  valid sequences that start with
 valid sequences that start with  or
 or  By symmetry, there are
 By symmetry, there are  valid sequences that start with
 valid sequences that start with  or
 or  So, the answer is
 So, the answer is  
~MRENTHUSIASM (inspired by Snowfan)
Solution 3 (Casework on the Consecutive Digits)
Reading the terms from left to right, we have two cases for the consecutive digits, where  means increase and
 means increase and  means decrease:
 means decrease:
 
 
For  note that for the second and fourth terms, one term must be
 note that for the second and fourth terms, one term must be  and the other term must be either
 and the other term must be either  or
 or  We have four subcases:
 We have four subcases: 
 
 
 
 
For  the first two blanks must be
 the first two blanks must be  and
 and  in some order, and the last blank must be
 in some order, and the last blank must be  So, we get
 So, we get  possibilities. Similarly,
 possibilities. Similarly,  also has
 also has  possibilities.
 possibilities.
For  there are no restrictions for the numbers
 there are no restrictions for the numbers  and
 and  So, we get
 So, we get  possibilities. Similarly,
 possibilities. Similarly,  also has
 also has  possibilities.
 possibilities.
Together,  has
 has  possibilities. By symmetry,
 possibilities. By symmetry,  also has
 also has  possibilities.
 possibilities. 
Finally, the answer is  
Remark
This problem is somewhat similar to 2004 AIME I Problem 6.
~MRENTHUSIASM
Solution 4 (Casework Similar to Solution 3)
Like Solution 3, we have two cases. Due to symmetry, we just need to count one of the cases. For the purpose of this solution, we will be doing  . Instead of starting with 5, we start with 1.
. Instead of starting with 5, we start with 1.
There are two ways to place it:
_1_ _ _
_ _ _1_
Now we place 2, it can either be next to 1 and on the outside, or is place in where 1 would go in the other case. So now we have another two "sub case":
_1_2_(case 1)
21_ _ _(case 2)
There are 3! ways to arrange the rest for case 1, since there is no restriction.
For case 2, we need to consider how many ways to arrange 3,4,5 in a a>b<c fashion. It should seem pretty obvious that b has to be 3, so there will be 2! way to put 4 and 5.
Now we find our result, times 2 for symmetry, times 2 for placement of 1 and times (3!+2!) for the two different cases for placement of 2. This give us  .
.
~~Xhte
Solution 4 (Casework on the Position of 5)
We only need to find the # of rearrangements when 5 is the 4th digit and 5th digit. Find the total, and multiply by 2. Then we can get the answer by adding the case when 5 is the third digit.
Case  : 5 is the 5th digit. __ __ __ __ 5
: 5 is the 5th digit. __ __ __ __ 5
Then  can only be either 1st digit or the 3rd digit.
 can only be either 1st digit or the 3rd digit. 
4 __ __ __ 5, then the only way is that  is the 3rd digit, so it can be either
 is the 3rd digit, so it can be either  or
 or  , give us
, give us  results.
 results. 
__ __ 4 __ 5, then the 1st digit must be  or
 or  ,
,  gives us
 gives us  way, and
 way, and  gives us
 gives us  ways. (Can't be
 ways. (Can't be  because the first digit would increasing). Therefore,
 because the first digit would increasing). Therefore,  in the middle and
 in the middle and  in the last would result in
 in the last would result in  ways.
 ways. 
Case  :
:  is the fourth digit. __ __ __ 5 __
 is the fourth digit. __ __ __ 5 __
Then the last digit can be all of the 4 numbers  ,
,  ,
,  , and
, and  . Let's say if the last digit is
. Let's say if the last digit is  , then the 2nd digit would be the largest for the remaining digits to prevent increasing order or decreasing order. Then the remaining two are interchangeable, give us
, then the 2nd digit would be the largest for the remaining digits to prevent increasing order or decreasing order. Then the remaining two are interchangeable, give us  ways. All of the
 ways. All of the  can work, so case
 can work, so case  would result in
 would result in  ways.
 ways. 
Case  :
:  is in the middle. __ __ 5 __ __
 is in the middle. __ __ 5 __ __
Then there are only two cases: 
1.  , then 4 and 3 are interchangeable, which results in
, then 4 and 3 are interchangeable, which results in  . Or it can be
. Or it can be  , then 4 and 2 are interchangeable, but it can not be
, then 4 and 2 are interchangeable, but it can not be  , so there can only be 2 possible ways:
, so there can only be 2 possible ways:  ,
,  .
. 
Therefore, case 3 would result in  ways.
 ways. 
 , so the total ways for case 1 and case 2 with both increasing and decreasing would be
, so the total ways for case 1 and case 2 with both increasing and decreasing would be  
Finally, we have  
~Michael595
Solution 5 (Overcounting)
First, we list the triples that are invalid:
543, 542, 541, 532, 531, 521, 432, 431, 321
By symmetry, there are the same amount of increasing triplets as there are decreasing ones. This yields 18 invalid 3 digit permutations in total.
Suppose the triplet is ABC and the other 2 digits are X and Y. We then have 3 ways to arrange a triplet with 2 other digits.
ABCXY, XABCY, XYABC
X and Y can be arranged 2 ways.
XY, YX
This produces 18*3*2=108 permutations of invalid results. We have 5! ways to arrange 5 numbers so 120-108=12.
Now, we must account for overcounting. For example, when 543 is counted, it only registers as one invalid permutation but in fact, it is 3 whole invalid permutations. We then complete this for the rest of the list:
54321 has 543, 432, and 321
54213 has 542 and 421
54123 has 541 and 123
53214 has 532 and 321
53124 has 531 and 124
52134 has 521 and 134
43215 has 432 and 321
43125 has 431 and 125
32145 has 321 and 145
This produces 19 values that we have overcounted but this value itself is also overcounted. We already counted 9 of the terms. This brings the final value of overcounted terms down to 10 for the decreasing triplets. By symmetry, 10 increasing triplets were overcounted.
This gives us  
~ Lukiebear
Solution 6 (Using a Table)
It is easier to consider the complement of the desired cases, so try to find the cases that DO have three integers in increasing order. First, write down the sets of three numbers that feature the numbers in increasing order. They are  . Each of these can be in three positions: the three are in the front with two more numbers in the back, the three are in the middle with two on each side, and two in the front and the set of three in the back. Now, count the number of combinations of
. Each of these can be in three positions: the three are in the front with two more numbers in the back, the three are in the middle with two on each side, and two in the front and the set of three in the back. Now, count the number of combinations of  numbers that each of the set of three can form that have not been previously accounted for. Also, if the set features both
 numbers that each of the set of three can form that have not been previously accounted for. Also, if the set features both  increasing and
 increasing and  decreasing, then do not count it because we will separately count them.
 decreasing, then do not count it because we will separately count them. 
![\[\begin{tabular}[t]{|l|c|c|c|} \hline Three Increasing Numbers&Front&Middle&Back\\\hline 123&2&2&2\\\hline 124&2&2&2\\\hline 125&1&2&2\\\hline 134&2&2&2\\\hline 135&1&2&2\\\hline 145&1&2&2\\\hline 234&2&1&1\\\hline 245&1&1&1\\\hline 345&1&0&1\\\hline \end{tabular}\]](http://latex.artofproblemsolving.com/2/6/8/268b3d10b63e489e7e09c909026b1260b627f0d5.png) 
This gives us a total of  possibilities. These account for the possibilities with ONLY increasing numbers. Mirror over to the other side to get the set of combinations with either at least
 possibilities. These account for the possibilities with ONLY increasing numbers. Mirror over to the other side to get the set of combinations with either at least  set of
 set of  increasing numbers in a row or only at least
 increasing numbers in a row or only at least  set of
 set of  decreasing numbers, but not both. We can count the ones with both separately.
 decreasing numbers, but not both. We can count the ones with both separately.  . Total of
. Total of  .
. 
 . This is the compliment. There are a total of
. This is the compliment. There are a total of  .
.  .
. 
Thus, the answer is  .
.
~Evan Liu ~Marshall_Huang (changes to LaTex and one spelling error)
Solution 7 (Symmetry)
First, note that there is a symmetry from  to
 to  as follows:
 as follows:  . Now, consider the placement of 5 in the
. Now, consider the placement of 5 in the  case. Clearly, 5 is the maximum value, so it must be placed in the 2nd position or the 4th position, but we also have symmetry
 case. Clearly, 5 is the maximum value, so it must be placed in the 2nd position or the 4th position, but we also have symmetry  . We will find the number of sequences with 5 in the second position by using casework on the position of the 4.
. We will find the number of sequences with 5 in the second position by using casework on the position of the 4.
Case 1:
4 5 __ __ __: 3 is the maximum value, so it must go into the 4th position, leaving us 2 ways to fill in 1 and 2.
Case 2:
__ 5 __ 4 __: 1, 2, and 3 are all less than 4 or 5, so they can be filled in any manner: 3! = 6.
Overall, we have 8 ways to fill in the sequences. By our two types of symmetry, there are  .
.
~alligator112
Solution 8 (PIE: No Casework)
We use complementary counting.
Let  be the set of all permutations
 be the set of all permutations  of
 of  in which there exists at least one set of three consecutive increasing terms, and let
 in which there exists at least one set of three consecutive increasing terms, and let  be the set of all permutations of
 be the set of all permutations of  in which there exists at least one set of three consecutive decreasing terms. The complement is
 in which there exists at least one set of three consecutive decreasing terms. The complement is  .
. 
First, we calculate  . Let
. Let  be the set of permutations in which
 be the set of permutations in which  is increasing for
 is increasing for  . We have
. We have ![\[|A|=|S_1 \cup S_2 \cup S_3|=|S_1|+|S_2|+|S_3|-|S_1 \cap S_2|-|S_2 \cap S_3|-|S_3 \cap S_1|+|S_1 \cap S_2 \cap S_3|.\]](http://latex.artofproblemsolving.com/f/b/5/fb57fda04c5ec67a5ffc8d6571564931078fa761.png) 
Since there are  ways to pick
 ways to pick  (there's only one way to arrange them in increasing order) and
 (there's only one way to arrange them in increasing order) and  ways to order
 ways to order  ,
, ![\[|S_1|=\binom{5}{3} \cdot 2!=20.\]](http://latex.artofproblemsolving.com/8/e/e/8eedab574cec8c1bb41658a40b02357b2b3d9b1d.png) By symmetry, we find
 By symmetry, we find  .
. 
Since we require  and there are
 and there are  ways to pick the numbers (again, only one way to arrange them in increasing order),
 ways to pick the numbers (again, only one way to arrange them in increasing order), ![\[|S_1 \cap S_2|=\binom{5}{4} \cdot 1!=5.\]](http://latex.artofproblemsolving.com/c/1/c/c1ca6ea66e1181fcb040fd6b2c2186944b4da8a0.png) By symmetry,
 By symmetry,  .
.
Notice that  since both translate to
 since both translate to  , so we get
, so we get ![\[|A|=20+20+20-5-5-|S_3 \cap S_1|+|S_1\cap S_3|=60-10=50.\]](http://latex.artofproblemsolving.com/2/4/7/2470ce4de400cc82d27b9696ae55815e7b4f056a.png) By symmetry,
 By symmetry,  , and it remains to compute
, and it remains to compute  .
. 
We have two cases, either  or
 or  (it is easy to verify that these are the only ones that work). WLOG consider the first. We must have
 (it is easy to verify that these are the only ones that work). WLOG consider the first. We must have  since it's the largest, and for every choice of
 since it's the largest, and for every choice of  , there is exactly one way to arrange them in order and to choose/arrange
, there is exactly one way to arrange them in order and to choose/arrange  . So, there are
. So, there are  ways to pick
 ways to pick  . Multiplying by 2 gives
. Multiplying by 2 gives ![\[|A\cap B|=2\cdot 6=12 \implies |A \cup B|=50+50-12=88.\]](http://latex.artofproblemsolving.com/7/8/6/786c80b033eff3c7539eaa8f217625832c19fc89.png) 
Since there are  permutations in total, the answer is
 permutations in total, the answer is  .
.
~bomberdoodles
Solution 9 (Quick)
Notice that the ways to arrange the numbers is  ,
,  ,
,  ,
,  , and
, and  , for when it starts with
, for when it starts with  ,
,  ,
,  ,
,  , and
, and  , respectively. Now that we have found a pattern, we can just solve for
, respectively. Now that we have found a pattern, we can just solve for  , so we can choose to find the ways if it starts with
, so we can choose to find the ways if it starts with  or
 or  . Solving, we get
. Solving, we get  = 5. So, the answer is
 = 5. So, the answer is  .
.
~hashbrown2009
Solution 10 (Brute Force)
We write out the  cases, then filter out the valid ones:
 cases, then filter out the valid ones:
 
We count these out and get  permutations that work.
 permutations that work. 
~contactbibliophile
Note: We are NOT going to write our  cases and factor them out. I don't know why this is the first solution to pop up.
 cases and factor them out. I don't know why this is the first solution to pop up.
~Shreyansh
Video Solution by OmegaLearn (Using PIE - Principle of Inclusion Exclusion)
~ pi_is_3.14
Video Solution by Power of Logic (Using Idea of Symmetrically Counting)
Video Solution by TheBeautyofMath
~IceMatrix
See Also
| 2021 AMC 10A (Problems • Answer Key • Resources) | ||
| Preceded by Problem 19 | Followed by Problem 21 | |
| 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 10 Problems and Solutions | ||
These problems are copyrighted © by the Mathematical Association of America, as part of the American Mathematics Competitions.  
