Difference between revisions of "2001 AIME I Problems/Problem 14"
m (minor) |
Jerry122805 (talk | contribs) (→Solution 8 (2 variable recursion)) |
||
(32 intermediate revisions by 13 users not shown) | |||
Line 2: | Line 2: | ||
A mail carrier delivers mail to the nineteen houses on the east side of Elm Street. The carrier notices that no two adjacent houses ever get mail on the same day, but that there are never more than two houses in a row that get no mail on the same day. How many different patterns of mail delivery are possible? | A mail carrier delivers mail to the nineteen houses on the east side of Elm Street. The carrier notices that no two adjacent houses ever get mail on the same day, but that there are never more than two houses in a row that get no mail on the same day. How many different patterns of mail delivery are possible? | ||
− | == Solution == | + | == Solutions== |
+ | ==Solution 1== | ||
Let <math>0</math> represent a house that does not receive mail and <math>1</math> represent a house that does receive mail. This problem is now asking for the number of <math>19</math>-digit strings of <math>0</math>'s and <math>1</math>'s such that there are no two consecutive <math>1</math>'s and no three consecutive <math>0</math>'s. | Let <math>0</math> represent a house that does not receive mail and <math>1</math> represent a house that does receive mail. This problem is now asking for the number of <math>19</math>-digit strings of <math>0</math>'s and <math>1</math>'s such that there are no two consecutive <math>1</math>'s and no three consecutive <math>0</math>'s. | ||
Line 19: | Line 20: | ||
Clearly, <math>a_2=b_2=c_2=1</math>. Using the [[recursion|recursive]] equations and initial values: | Clearly, <math>a_2=b_2=c_2=1</math>. Using the [[recursion|recursive]] equations and initial values: | ||
− | <cmath>\begin{ | + | <cmath>\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} |
\multicolumn{19}{c}{}\\\hline | \multicolumn{19}{c}{}\\\hline | ||
n&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19\\\hline | n&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19\\\hline | ||
Line 25: | Line 26: | ||
b_n&1&2&2&3&4&5&7&9&12&16&21&28&37&49&65&86&114&151\\\hline | b_n&1&2&2&3&4&5&7&9&12&16&21&28&37&49&65&86&114&151\\\hline | ||
c_n&1&1&2&2&3&4&5&7&9&12&16&21&28&37&49&65&86&114\\\hline | c_n&1&1&2&2&3&4&5&7&9&12&16&21&28&37&49&65&86&114\\\hline | ||
− | \end{ | + | \end{array}</cmath> |
− | Therefore, the number of <math>19</math>- | + | As a result <math>a_{19}+b_{19}+c_{19}=\boxed{351}</math>. |
+ | |||
+ | ==Solution 2 ( Less recursion than solution 1) == | ||
+ | Let <math>M_n</math> represent the number of mail delivery patterns that end with the last house receiving mail. This is <math>b_n</math> in Solution 1. Similarly define <math>A_n</math> to be the number of mail delivery patterns that end with last house not receiving mail. This is just <math>a_n</math> and <math>c_n</math> in solution 1. Let <math>T_n</math> be the total number of mail delivery patterns. | ||
+ | |||
+ | Here are the possible ending cases: the string ends in <math>1, 10,</math> or <math>100</math>. The first case is just <math>M_n</math>. The second case is <math>M_{n-1}</math>. The third case is <math>M_{n-2}</math>. So we have <math>T_n = M_n + M_{n-1} + M_{n-2}</math>. Since we want <math>T_{19}</math>, it is just <math> M_{18} + M_{17} + M_{16}</math>. | ||
+ | Now using the same logic as above we can find <math>M_n = M_{n-2} + M_{n-3}</math> ( the cases are 01 and 001). We can refer back to solution 1's table and only keep track of <math>b_n</math>, ignoring both <math>a_n</math> and <math>c_n</math>. | ||
+ | |||
+ | - MathLegend27 | ||
+ | |||
+ | |||
+ | ==Solution 3 (Tedious Casework) == | ||
+ | We split the problem into cases using the number of houses that get mail. Let "|" represent a house that gets mail, and "o" represent a house that doesn't. With a fixed number of |, an o can be inserted between 2 |'s or on the very left or right. There cannot be more than one o that is free to arrange to be placed between two |'s because no three o's can be adjacent, but there can be a maximum of two o's placed on the very left or right. Note that according to the [[Pigeonhole Principle|Pigeonhole Principle]], no more than 10 houses can get mail on the same day. | ||
+ | |||
+ | Case 1: 10 houses get mail. No 2 adjacent houses can get mail on the same day, so there must be an o between every two |. <math>10-1=9</math> o's are fixed so we count the number of ways to insert <math>19 - 10 - 9 = 0</math> o's to <math>10+1 = 11</math> spots, or <math>\binom{11}{0} = 1</math>. | ||
+ | |||
+ | Case 2: 9 houses get mail. In this case, <math>9-1 = 8</math> o's are fixed so we count the number of ways to insert <math>19 - 9 - 8 = 2</math> o's to <math>9+1=10</math> spots. However, there is also the case where two o's are both on the very left / right. When both o's that are free to arrange are put on a side, there are <math>10-1=9</math> spots left to insert <math>2-2=0</math> o's. Hence the total number of ways in this case is <math>\binom{10}{2} + 2\binom{9}{0} = 47</math>. | ||
+ | |||
+ | Case 3: 8 houses get mail. In this case, <math>8-1=7</math> o's are fixed so we count the number of ways to insert <math>19-8-7=4</math> o's to <math>8+1=9</math> spots. When two o's are put to the very left / right, there are <math>9-1=8</math> spots left to insert <math>4-2=2</math> o's. We also need to take care of the case where two o's are on the very left and two o's are on the very right: we have <math>9-1-1=7</math> spots to insert <math>4-2-2=0</math> o's. Hence the total number of ways in this case is <math>\binom{9}{4} + 2\binom{8}{2} + \binom{7}{0} = 183</math>. | ||
+ | |||
+ | Case 4: 7 houses get mail. In this case, <math>7-1=6</math> o's are fixed so we count the number of ways to insert <math>19-7-6=6</math> o's to <math>7+1=8</math> spots. When two o's are put to the very left / right, there are <math>8-1=7</math> spots left to insert <math>6-2=4</math> o's. When two o's are on the very left and two o's are on the very right, we have <math>8-1-1=6</math> spots to insert <math>6-2-2=2</math> o's. Hence the total number of ways in this case is <math>\binom{8}{6} + 2\binom{7}{4} + \binom{6}{2} = 113</math>. | ||
+ | |||
+ | Case 5: 6 houses get mail. We have to be careful in this case: <math>6-1=5</math> o's are fixed so we are inserting <math>19-6-5=8</math> o's to <math>6+1=7</math> spots, which means that at least 1 of the 2 sides must have two o's. When 1 of the 2 sides have two o's, there are <math>7-1=6</math> spots to insert <math>8-2=6</math> o's. When both sides have two o's, there are <math>7-1-1=5</math> spots to insert <math>8-2-2=4</math> o's. Hence the total number of ways in this case is <math>2\binom{6}{6} + \binom{5}{4} = 7</math>. | ||
+ | |||
+ | When less than 6 houses get(s) mail, it's again not possible since at least three o's must be together (again, according to the Pigeonhole Principle). Therefore, the desired answer is <math>1+47+183+113+7=\boxed{351}</math>. | ||
+ | |||
+ | - MP8148 | ||
+ | |||
+ | ==Solution 4 (Clean Recursion without Bash)== | ||
+ | |||
+ | There doesn't seem to be anything especially noticeable about the number nineteen in this problem, meaning that we can replace the number nineteen with any number without a big effect on the logic that we use to solve the problem. This pits the problem as a likely candidate for recursion. | ||
+ | |||
+ | At first, it's not immediately clear how to relate the state of <math>n</math> houses in general to that of <math>n - 1, n - 2,</math> or <math>n - 3.</math> We thus break it up into cases, based on whether the first house gets mail or not. | ||
+ | |||
+ | Let <math>p_n</math> be the number of ways to distribute the mail to <math>n</math> houses. Assume that the first house gets mail. Therefore, since no two adjacent houses get mail on the same day, the second house must not get mail. Starting from the third house, however, things start to look messy, and it looks like we have to break our recurrence down into even smaller cases, which is something that we don't like -- we want to keep our relations as simple as possible. Therefore, seeing that we can't work forwards anymore, we try to work backwards. | ||
+ | |||
+ | Once the mail carrier delivers the mail to the first and (lack of mail) to the second houses, have him deliver mail to the remaining <math>n - 3</math> houses at the end of the row, skipping the third house. There are <math>p_{n - 3}</math> ways to do this. Now, we see that the availability of mail at the third house is fixed -- if the fourth house doesn't receive mail, the third one must, and if the fourth house receives mail, the third one can't. Therefore, there are simply <math>p_{n-3}</math> ways to deliver the mail if the first house gets mail. | ||
+ | |||
+ | If the first house doesn't get mail, then we use the same logic -- have the mail carrier skip the second house and deliver the remaining mail to the <math>n - 2</math> houses in <math>p_{n-2}</math> ways. Then, the availability of mail for the second house is fixed, so there are <math>p_{n - 2}</math> ways to deliver the mail in this case. | ||
+ | |||
+ | We thus have established a recurrence relation -- since the first house either gets mail or it doesn't, and cannot achieve both at the same time, we are confident about the validity of our relation: <cmath>p_n = p_{n-2} + p_{n-3}.</cmath>Now, we simply calculate <math>p_1, p_2,</math> and <math>p_3.</math> Then, it's off to the races for computation! | ||
+ | |||
+ | <math>p_1 = 2,</math> because the first house can either gets mail or it doesn't -- there are no restrictions. | ||
+ | |||
+ | <math>p_2 = 3,</math> because all of the possible deliveries are valid (of which there are <math>2 \cdot 2 = 4</math>) except the one where both houses receive mail. | ||
+ | |||
+ | <math>p_3 = 4,</math> as there are <math>4</math> possible ways (here, M represents that that house gets mail and N represents no mail): MNM, MNN, NNM, NMN. | ||
+ | |||
+ | Using our recurrence relation, we eventually get that <math>p_{19} = \boxed{351},</math> and we're done. | ||
+ | |||
+ | Solution by Ilikeapos | ||
+ | |||
+ | ==Solution 5== | ||
+ | |||
+ | We use similar wording as in solution 1. In this problem, we divide into 3 cases: | ||
+ | |||
+ | Case 1: The first house gets mail. In other words, the sequence starts with a <math>1.</math> | ||
+ | |||
+ | We first introduce two variables. Let <math>x</math> be the number of 01's, and let <math>y</math> be the number of 001's in the sequence. For each case, we will divide further into three sub-cases, based on the pattern of mail delivery for the last three houses. | ||
+ | |||
+ | Sub-case 1: The last house that gets mail is the 17th house. Thus, we have the equation <math>2x+3y=16,</math> which has solutions <math>(2,4),(5,2),</math> and <math>(8,0).</math> There are <math>\binom{2+4}{2}+\binom{5+2}{2}+\binom{8+0}{8}=37</math> total sequences. | ||
+ | |||
+ | Sub-case 2: The last house that gets mail is the 18th house. We have <math>2x+3y=17,</math> and finding all solutions yields 49 total sequences. | ||
+ | |||
+ | Sub-case 3: The last house that gets mail is the 19th house. We have <math>2x+3y=18,</math> which gives us 65 total sequences. | ||
+ | |||
+ | There are 151 sequences for this case. | ||
+ | |||
+ | Case 2: The first house that gets mail is the 2nd house. The sequence begins with <math>01.</math> | ||
+ | |||
+ | Our sub-cases are still the same. However, our equations become <math>2x+3y=15,16,17.</math> Computing yields <math>28+37+49=114</math> sequences. | ||
+ | |||
+ | Case 3: The first house that gets mail is the 3rd house. The sequence starts with <math>001.</math> | ||
+ | |||
+ | We have the equations <math>2x+3y=14,15,16</math> so we get <math>21+28+37=86</math> sequences. | ||
+ | |||
+ | Totaling up gives us <math>151+114+86=351</math> different sequences. | ||
+ | |||
+ | -math129 | ||
+ | |||
+ | ==Solution 6 (Different recursion with two rules)== | ||
+ | |||
+ | Let <math>w_n</math> be the number of possible ways if the last house has mail, and <math>b_n</math> be the number of possible ways if the last house does not have mail. | ||
+ | |||
+ | If the last house has mail, then, the next house can't have mail, meaning that <math>b_n = w_{n - 1}</math>. | ||
+ | |||
+ | If the last house doesn't have mail, then the next house can either have mail or not have mail. If the next house has mail, then we simply count the number of ways that the row ends in a house with mail, so that means so far, our recursive rule is <math>w_n = b_{n - 1} + \text{something}</math>. If the next house does not have mail, then the next house after that must have mail, meaning that <math>w_n = b_{n - 1} + b_{n - 2}</math>. | ||
+ | |||
+ | Recursing all the way up to <math>b_{19}</math> and <math>w_{19}</math>, we get <math>100 + 251 = \boxed{351}</math> | ||
+ | |||
+ | ==Solution 7 (Simple Recursion)== | ||
+ | |||
+ | Let <math>a_n</math> be the number of ways if the first house has mail, and let <math>b_n</math> be the number of ways if the first house does not get mail. | ||
+ | |||
+ | <math>a_n=a_{n-2}+a_{n-3}</math> because if the first house gets mail, the next house that gets mail must either be the third or fourth house. | ||
+ | |||
+ | <math>b_n=a_{n-1}+a_{n-2}</math> because if the first house does not get mail, the next house that gets mail must either be the second or third house. | ||
+ | |||
+ | Note that we only need list out values of <math>a_n</math> as <math>b</math> depends on <math>a</math>. <math>a_1=1, a_2=1, a_3=2, a_4=2, \ldots</math>. | ||
+ | |||
+ | <math>a_{19}+b_{19}=a_{17}+a_{16}+a_{18}+a_{17}=a_{16}+2\cdot a_{17}+a_{18}=65+2\cdot 86+114=\boxed{351}</math>. | ||
== See also == | == See also == | ||
Line 33: | Line 134: | ||
[[Category:Intermediate Combinatorics Problems]] | [[Category:Intermediate Combinatorics Problems]] | ||
+ | {{MAA Notice}} |
Latest revision as of 18:46, 9 July 2020
Contents
Problem
A mail carrier delivers mail to the nineteen houses on the east side of Elm Street. The carrier notices that no two adjacent houses ever get mail on the same day, but that there are never more than two houses in a row that get no mail on the same day. How many different patterns of mail delivery are possible?
Solutions
Solution 1
Let represent a house that does not receive mail and represent a house that does receive mail. This problem is now asking for the number of -digit strings of 's and 's such that there are no two consecutive 's and no three consecutive 's.
The last two digits of any -digit string can't be , so the only possibilities are , , and .
Let be the number of -digit strings ending in , be the number of -digit strings ending in , and be the number of -digit strings ending in .
If an -digit string ends in , then the previous digit must be a , and the last two digits of the digits substring will be . So
If an -digit string ends in , then the previous digit can be either a or a , and the last two digits of the digits substring can be either or . So
If an -digit string ends in , then the previous digit must be a , and the last two digits of the digits substring will be . So
Clearly, . Using the recursive equations and initial values:
As a result .
Solution 2 ( Less recursion than solution 1)
Let represent the number of mail delivery patterns that end with the last house receiving mail. This is in Solution 1. Similarly define to be the number of mail delivery patterns that end with last house not receiving mail. This is just and in solution 1. Let be the total number of mail delivery patterns.
Here are the possible ending cases: the string ends in or . The first case is just . The second case is . The third case is . So we have . Since we want , it is just . Now using the same logic as above we can find ( the cases are 01 and 001). We can refer back to solution 1's table and only keep track of , ignoring both and .
- MathLegend27
Solution 3 (Tedious Casework)
We split the problem into cases using the number of houses that get mail. Let "|" represent a house that gets mail, and "o" represent a house that doesn't. With a fixed number of |, an o can be inserted between 2 |'s or on the very left or right. There cannot be more than one o that is free to arrange to be placed between two |'s because no three o's can be adjacent, but there can be a maximum of two o's placed on the very left or right. Note that according to the Pigeonhole Principle, no more than 10 houses can get mail on the same day.
Case 1: 10 houses get mail. No 2 adjacent houses can get mail on the same day, so there must be an o between every two |. o's are fixed so we count the number of ways to insert o's to spots, or .
Case 2: 9 houses get mail. In this case, o's are fixed so we count the number of ways to insert o's to spots. However, there is also the case where two o's are both on the very left / right. When both o's that are free to arrange are put on a side, there are spots left to insert o's. Hence the total number of ways in this case is .
Case 3: 8 houses get mail. In this case, o's are fixed so we count the number of ways to insert o's to spots. When two o's are put to the very left / right, there are spots left to insert o's. We also need to take care of the case where two o's are on the very left and two o's are on the very right: we have spots to insert o's. Hence the total number of ways in this case is .
Case 4: 7 houses get mail. In this case, o's are fixed so we count the number of ways to insert o's to spots. When two o's are put to the very left / right, there are spots left to insert o's. When two o's are on the very left and two o's are on the very right, we have spots to insert o's. Hence the total number of ways in this case is .
Case 5: 6 houses get mail. We have to be careful in this case: o's are fixed so we are inserting o's to spots, which means that at least 1 of the 2 sides must have two o's. When 1 of the 2 sides have two o's, there are spots to insert o's. When both sides have two o's, there are spots to insert o's. Hence the total number of ways in this case is .
When less than 6 houses get(s) mail, it's again not possible since at least three o's must be together (again, according to the Pigeonhole Principle). Therefore, the desired answer is .
- MP8148
Solution 4 (Clean Recursion without Bash)
There doesn't seem to be anything especially noticeable about the number nineteen in this problem, meaning that we can replace the number nineteen with any number without a big effect on the logic that we use to solve the problem. This pits the problem as a likely candidate for recursion.
At first, it's not immediately clear how to relate the state of houses in general to that of or We thus break it up into cases, based on whether the first house gets mail or not.
Let be the number of ways to distribute the mail to houses. Assume that the first house gets mail. Therefore, since no two adjacent houses get mail on the same day, the second house must not get mail. Starting from the third house, however, things start to look messy, and it looks like we have to break our recurrence down into even smaller cases, which is something that we don't like -- we want to keep our relations as simple as possible. Therefore, seeing that we can't work forwards anymore, we try to work backwards.
Once the mail carrier delivers the mail to the first and (lack of mail) to the second houses, have him deliver mail to the remaining houses at the end of the row, skipping the third house. There are ways to do this. Now, we see that the availability of mail at the third house is fixed -- if the fourth house doesn't receive mail, the third one must, and if the fourth house receives mail, the third one can't. Therefore, there are simply ways to deliver the mail if the first house gets mail.
If the first house doesn't get mail, then we use the same logic -- have the mail carrier skip the second house and deliver the remaining mail to the houses in ways. Then, the availability of mail for the second house is fixed, so there are ways to deliver the mail in this case.
We thus have established a recurrence relation -- since the first house either gets mail or it doesn't, and cannot achieve both at the same time, we are confident about the validity of our relation: Now, we simply calculate and Then, it's off to the races for computation!
because the first house can either gets mail or it doesn't -- there are no restrictions.
because all of the possible deliveries are valid (of which there are ) except the one where both houses receive mail.
as there are possible ways (here, M represents that that house gets mail and N represents no mail): MNM, MNN, NNM, NMN.
Using our recurrence relation, we eventually get that and we're done.
Solution by Ilikeapos
Solution 5
We use similar wording as in solution 1. In this problem, we divide into 3 cases:
Case 1: The first house gets mail. In other words, the sequence starts with a
We first introduce two variables. Let be the number of 01's, and let be the number of 001's in the sequence. For each case, we will divide further into three sub-cases, based on the pattern of mail delivery for the last three houses.
Sub-case 1: The last house that gets mail is the 17th house. Thus, we have the equation which has solutions and There are total sequences.
Sub-case 2: The last house that gets mail is the 18th house. We have and finding all solutions yields 49 total sequences.
Sub-case 3: The last house that gets mail is the 19th house. We have which gives us 65 total sequences.
There are 151 sequences for this case.
Case 2: The first house that gets mail is the 2nd house. The sequence begins with
Our sub-cases are still the same. However, our equations become Computing yields sequences.
Case 3: The first house that gets mail is the 3rd house. The sequence starts with
We have the equations so we get sequences.
Totaling up gives us different sequences.
-math129
Solution 6 (Different recursion with two rules)
Let be the number of possible ways if the last house has mail, and be the number of possible ways if the last house does not have mail.
If the last house has mail, then, the next house can't have mail, meaning that .
If the last house doesn't have mail, then the next house can either have mail or not have mail. If the next house has mail, then we simply count the number of ways that the row ends in a house with mail, so that means so far, our recursive rule is . If the next house does not have mail, then the next house after that must have mail, meaning that .
Recursing all the way up to and , we get
Solution 7 (Simple Recursion)
Let be the number of ways if the first house has mail, and let be the number of ways if the first house does not get mail.
because if the first house gets mail, the next house that gets mail must either be the third or fourth house.
because if the first house does not get mail, the next house that gets mail must either be the second or third house.
Note that we only need list out values of as depends on . .
.
See also
2001 AIME I (Problems • Answer Key • Resources) | ||
Preceded by Problem 13 |
Followed by Problem 15 | |
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.