Difference between revisions of "2000 AIME I Problems/Problem 15"
(→Solution 3 (Recursion)) |
(→Solution 4 (very bashy)) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
== Solution == | == Solution == | ||
− | We try to work backwards from when there are 2 cards left, since this is when the 1999 card is laid onto the table. When there are 2 cards left, the 1999 card is on the top of the deck. In order for this to occur, it must be 2nd on the deck when there are 4 cards remaining, and this means it must be the 4th card when there are 8 cards remaining. This pattern continues until it is the 512th card on the deck when there are 1024 cards remaining. Since there are over 1000 cards remaining, some cards have not even made one trip through yet, 2(1024 - 1000) = 48, to be exact. Once these cards go through, 1999 will be the <math>512 - 48 = 464^\text{th}</math> card on the deck. Since every other card was removed during the first round, it goes to show that 1999 was in position <math>464 \times 2 = 928</math>, meaning that there were <math>\boxed{927}</math> cards are above the one labeled <math>1999</math>. | + | We try to work backwards from when there are 2 cards left, since this is when the 1999 card is laid onto the table. When there are 2 cards left, the 1999 card is on the top of the deck. In order for this to occur, it must be 2nd on the deck when there are 4 cards remaining, and this means it must be the 4th card when there are 8 cards remaining. This pattern continues until it is the 512th card on the deck when there are 1024 cards remaining. Since there are over 1000 cards remaining, some cards have not even made one trip through yet, <math>2(1024 - 1000) = 48</math>, to be exact. Once these cards go through, 1999 will be the <math>512 - 48 = 464^\text{th}</math> card on the deck. Since every other card was removed during the first round, it goes to show that 1999 was in position <math>464 \times 2 = 928</math>, meaning that there were <math>\boxed{927}</math> cards are above the one labeled <math>1999</math>. |
== Solution 2 == | == Solution 2 == | ||
Line 15: | Line 15: | ||
Let <math>a_n</math> be the answer to the above problem. | Let <math>a_n</math> be the answer to the above problem. | ||
− | As a base case, consider <math>n=2</math>. Clearly, the stack | + | As a base case, consider <math>n=2</math>. Clearly, the stack, from top to bottom, must be <math>(1, 2)</math>, so <math>a_2=0</math>. |
− | Next, let's think about how we can construct a stack of <math>n+1</math> cards from a stack of <math>n</math> cards. First, let us renumber the current stack of <math>n</math> by adding <math>1</math> to the label of each of the cards. Then we must add a card labeled "<math>1</math>". | + | Next, let's think about how we can construct a stack of <math>n+1</math> cards from a stack of <math>n</math> cards. First, let us renumber the current stack of <math>n</math> by adding <math>1</math> to the label of each of the cards. Then we must add a card labeled "<math>1</math>" somewhere in the new deck. |
− | Working backwards, we find that we must move the bottom card to the top, then add "<math>1</math>" to the top of the deck. | + | Working backwards, we find that we must move the bottom card to the top, then add "<math>1</math>" to the top of the deck. This is because after one move, the number "<math>1</math>" will be laid out and the top card will be moved to the bottom, so the deck becomes the same as what we had before, but with everything renumbered correctly such that <math>2, 3, 4, ...</math> will then be laid out in order. |
− | Therefore, if <math>a_n \ne n-1</math> (meaning the card <math>n-1</math> is not at the bottom of the deck and so it won't be moved to the top), then <math>a_{n+1} = a_n + 2</math>, since a card from the bottom is moved to be above the <math>n-1</math> card, and the new card "<math>1</math>" is added to the top. If <math>a_n = n-1</math> (meaning the card <math>n-1</math> is the bottom card), then <math>a_{n+1}=1</math> because | + | Therefore, if <math>a_n \ne n-1</math> (meaning the card <math>n-1</math> is not at the bottom of the deck and so it won't be moved to the top), then <math>a_{n+1} = a_n + 2</math>, since a card from the bottom is moved to be above the <math>n-1</math> card, and the new card "<math>1</math>" is added to the top. If <math>a_n = n-1</math> (meaning the card <math>n-1</math> is the bottom card), then <math>a_{n+1}=1</math> because the <math>n-1</math> card will move to the top and the card "<math>1</math>" will be added on top of it. |
− | With these recursions and the base case we found earlier, we calculate <math>a_{2000} = \boxed{927}</math>. To calculate this by hand, | + | With these recursions and the base case we found earlier, we calculate <math>a_{2000} = \boxed{927}</math>. To calculate this by hand, a helpful trick is finding that if <math>a_n=1</math>, then <math>a_{2n-1}=1</math> as well. Once we find <math>a_{1537}=1</math>, the answer is just <math>1+(2000-1537)\cdot2</math>. |
- Frestho | - Frestho | ||
+ | |||
+ | ==Solution 4 (very bashy)== | ||
+ | Let us treat each run through the deck as a separate "round". For example, in round one, you would go through all of the <math>2000</math> cards initially in the deck once, in round two, you would go through all <math>1000</math> cards initially in the deck once, so on and so forth. For each round, let us record what the initial and final actions are (<math>r</math> for moving the card to the right, <math>b</math> for moving the card to the bottom), the number of cards moved to the right, the number of cards left, and what the position of the cards moved to the right were in the original <math>2000</math> card deck (as <math>n = a + ck</math> where <math>n</math> is the position, <math>c</math> is the spacing of the cards moved, <math>a</math> is an integer such that the correct first card is moved, and <math>k</math> is an integer greater than or equal to <math>1</math> which represents which card out of all the cards moved to the right you are finding the position of). Then, | ||
+ | |||
+ | Round 1: <math>r</math> to <math>b</math>, <math>1000</math> to right, <math>1000</math> left in deck, <math>n = -1 + 2k</math>, | ||
+ | |||
+ | Round 2: <math>r</math> to <math>b</math>, <math>500</math> to right, <math>500</math> left in deck, <math>n = -2 + 4k</math>, | ||
+ | |||
+ | Round 3: <math>r</math> to <math>b</math>, <math>250</math> to right, <math>250</math> left in deck, <math>n = -4 + 8k</math>, | ||
+ | |||
+ | Round 4: <math>r</math> to <math>b</math>, <math>125</math> to right, <math>125</math> left in deck, <math>n = -8 + 16k</math>. | ||
+ | |||
+ | Let us treat the remaining deck of <math>125</math> cards as a totally independent deck, note that the positions of card in this deck are <math>n = 16k</math>. Also note that the first action of a new round is never the same action as the last action of the previous round because actions alternate. Also note that for every new round, the spacing between cards moved doubles, and that the cards remaining in the beginning of a new round have position <math>n = a + c/2 + ck</math> for the values <math>a, c</math> of the previous round. Also note that if there are an odd number of cards in an initial deck, the first and last actions are the same. Then, | ||
+ | |||
+ | Round 5: <math>r</math> to <math>r</math>, <math>63</math> to right, <math>62</math> left in deck, <math>n = -1 + 2k</math>, | ||
+ | |||
+ | Round 6: <math>b</math> to <math>r</math>, <math>31</math> to right, <math>31</math> left in deck, <math>n = 4k</math>, because <math>n = 2k</math> positioned cards are left at the beginning of this round and the first card is sent to the bottom, only every second card is sent to the right, and because spacing doubles every round, | ||
+ | |||
+ | Round 7: <math>b</math> to <math>b</math>, <math>15</math> to right, <math>16</math> left in deck, <math>n = -2 + 8k</math>, because <math>n = 2 + 4k</math> positioned cards are left at the beginning and only every second card is sent to the right, and because spacing doubles every round, | ||
+ | |||
+ | Round 8: <math>r</math> to <math>b</math>, <math>8</math> to right, <math>8</math> left in deck, <math>n = -14 + 16k</math>, by similar reasoning, since the cards <math>n = 2 + 8k</math> are left and spacing doubles every round, from here on things get real easy, | ||
+ | |||
+ | Round 9: <math>r</math> to <math>b</math>, <math>4</math> to right, <math>4</math> left in deck, <math>n = -22 + 32k</math>, | ||
+ | |||
+ | Round 10: <math>r</math> to <math>b</math>, <math>2</math> to right, <math>2</math> left in deck, <math>n = -38 + 64k</math>, | ||
+ | |||
+ | Round 11: <math>r</math> to <math>b</math>, <math>1</math> to right, <math>1</math> left in deck, <math>n = 58</math>, since <math>58 = -38 + 64/2 + 64</math>. | ||
+ | |||
+ | This card must be labeled 1999 since it is second to last. Then, since it is the <math>58th</math> in the deck of <math>125</math>, it must be the <math>58 * 8 = 928th</math> card in the original deck, and because we've been numbering from the top of the deck to the bottom (also because AIME answers are 000-999), there were <math>928 - 1 = \boxed{927}</math> cards above it in the deck - Romulus and minimaxweii | ||
== See also == | == See also == | ||
{{AIME box|year=2000|n=I|num-b=14|after=Last Question}} | {{AIME box|year=2000|n=I|num-b=14|after=Last Question}} | ||
{{MAA Notice}} | {{MAA Notice}} |
Latest revision as of 11:26, 4 October 2021
Contents
Problem
A stack of cards is labelled with the integers from to with different integers on different cards. The cards in the stack are not in numerical order. The top card is removed from the stack and placed on the table, and the next card is moved to the bottom of the stack. The new top card is removed from the stack and placed on the table, to the right of the card already there, and the next card in the stack is moved to the bottom of the stack. The process - placing the top card to the right of the cards already on the table and moving the next card in the stack to the bottom of the stack - is repeated until all cards are on the table. It is found that, reading from left to right, the labels on the cards are now in ascending order: In the original stack of cards, how many cards were above the card labeled ?
Solution
We try to work backwards from when there are 2 cards left, since this is when the 1999 card is laid onto the table. When there are 2 cards left, the 1999 card is on the top of the deck. In order for this to occur, it must be 2nd on the deck when there are 4 cards remaining, and this means it must be the 4th card when there are 8 cards remaining. This pattern continues until it is the 512th card on the deck when there are 1024 cards remaining. Since there are over 1000 cards remaining, some cards have not even made one trip through yet, , to be exact. Once these cards go through, 1999 will be the card on the deck. Since every other card was removed during the first round, it goes to show that 1999 was in position , meaning that there were cards are above the one labeled .
Solution 2
To simplify matters, we want a power of . Hence, we will add 'fake' cards which we must discard in our actual count. Using similar logic as Solution 1, we find that 1999 has position in a card stack, where the fake cards towards the front.
Let the fake cards have positions . Then, we know that the real cards filling the gaps between the fake cards must be the cards such that they go to their correct starting positions in the card case, where all of them are below . From this, we know that the cards from positions to alternate in fake-real-fake-real, where we have the correct order of cards once the first have moved and we can start putting real cards on the table. Hence, is in position , so cards are above it. - Spacesam
Solution 3 (Recursion)
Consider the general problem: with a stack of cards such that they will be laid out from left to right, how many cards are above the card labeled ?
Let be the answer to the above problem.
As a base case, consider . Clearly, the stack, from top to bottom, must be , so .
Next, let's think about how we can construct a stack of cards from a stack of cards. First, let us renumber the current stack of by adding to the label of each of the cards. Then we must add a card labeled "" somewhere in the new deck.
Working backwards, we find that we must move the bottom card to the top, then add "" to the top of the deck. This is because after one move, the number "" will be laid out and the top card will be moved to the bottom, so the deck becomes the same as what we had before, but with everything renumbered correctly such that will then be laid out in order.
Therefore, if (meaning the card is not at the bottom of the deck and so it won't be moved to the top), then , since a card from the bottom is moved to be above the card, and the new card "" is added to the top. If (meaning the card is the bottom card), then because the card will move to the top and the card "" will be added on top of it.
With these recursions and the base case we found earlier, we calculate . To calculate this by hand, a helpful trick is finding that if , then as well. Once we find , the answer is just . - Frestho
Solution 4 (very bashy)
Let us treat each run through the deck as a separate "round". For example, in round one, you would go through all of the cards initially in the deck once, in round two, you would go through all cards initially in the deck once, so on and so forth. For each round, let us record what the initial and final actions are ( for moving the card to the right, for moving the card to the bottom), the number of cards moved to the right, the number of cards left, and what the position of the cards moved to the right were in the original card deck (as where is the position, is the spacing of the cards moved, is an integer such that the correct first card is moved, and is an integer greater than or equal to which represents which card out of all the cards moved to the right you are finding the position of). Then,
Round 1: to , to right, left in deck, ,
Round 2: to , to right, left in deck, ,
Round 3: to , to right, left in deck, ,
Round 4: to , to right, left in deck, .
Let us treat the remaining deck of cards as a totally independent deck, note that the positions of card in this deck are . Also note that the first action of a new round is never the same action as the last action of the previous round because actions alternate. Also note that for every new round, the spacing between cards moved doubles, and that the cards remaining in the beginning of a new round have position for the values of the previous round. Also note that if there are an odd number of cards in an initial deck, the first and last actions are the same. Then,
Round 5: to , to right, left in deck, ,
Round 6: to , to right, left in deck, , because positioned cards are left at the beginning of this round and the first card is sent to the bottom, only every second card is sent to the right, and because spacing doubles every round,
Round 7: to , to right, left in deck, , because positioned cards are left at the beginning and only every second card is sent to the right, and because spacing doubles every round,
Round 8: to , to right, left in deck, , by similar reasoning, since the cards are left and spacing doubles every round, from here on things get real easy,
Round 9: to , to right, left in deck, ,
Round 10: to , to right, left in deck, ,
Round 11: to , to right, left in deck, , since .
This card must be labeled 1999 since it is second to last. Then, since it is the in the deck of , it must be the card in the original deck, and because we've been numbering from the top of the deck to the bottom (also because AIME answers are 000-999), there were cards above it in the deck - Romulus and minimaxweii
See also
2000 AIME I (Problems • Answer Key • Resources) | ||
Preceded by Problem 14 |
Followed by Last Question | |
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.