Difference between revisions of "1996 AIME Problems/Problem 9"
(→Solution 2) |
|||
Line 8: | Line 8: | ||
=== Solution 2 === | === Solution 2 === | ||
We can also solve this with recursion. Let <math>L_n</math> be the last locker he opens given that he started with <math>2^n</math> lockers. Let there be <math>2^n</math> lockers. After he first reaches the end of the hallway, there are <math>2^{n-1}</math> lockers remaining. There is a correspondence between these unopened lockers and if he began with <math>2^{n-1}</math> lockers. The locker <math>y</math> (if he started with <math>2^{n-1}</math> lockers) corresponds to the locker <math>2^n+2-2y</math> (if he started with <math>2^n</math> lockers). It follows that <math>L_{n} = 2^{n} +2 -2L_{n-1}</math> as they are corresponding lockers. We can compute <math>L_1=2</math> and use the recursion to find <math>L_{10}=\boxed{342}</math> | We can also solve this with recursion. Let <math>L_n</math> be the last locker he opens given that he started with <math>2^n</math> lockers. Let there be <math>2^n</math> lockers. After he first reaches the end of the hallway, there are <math>2^{n-1}</math> lockers remaining. There is a correspondence between these unopened lockers and if he began with <math>2^{n-1}</math> lockers. The locker <math>y</math> (if he started with <math>2^{n-1}</math> lockers) corresponds to the locker <math>2^n+2-2y</math> (if he started with <math>2^n</math> lockers). It follows that <math>L_{n} = 2^{n} +2 -2L_{n-1}</math> as they are corresponding lockers. We can compute <math>L_1=2</math> and use the recursion to find <math>L_{10}=\boxed{342}</math> | ||
+ | |||
+ | === Solution 2 === | ||
+ | list all the numbers from 1 through 1024, then do the process yourself!!!! It will take about 25 minutes, but thats ok! eventually you will get 342 | ||
== See also == | == See also == |
Revision as of 19:13, 29 March 2020
Problem
A bored student walks down a hall that contains a row of closed lockers, numbered to . He opens the locker numbered 1, and then alternates between skipping and opening each locker thereafter. When he reaches the end of the hall, the student turns around and starts back. He opens the first closed locker he encounters, and then alternates between skipping and opening each closed locker thereafter. The student continues wandering back and forth in this manner until every locker is open. What is the number of the last locker he opens?
Solution
Solution 1
On his first pass, he opens all of the odd lockers. So there are only even lockers closed. Then he opens the lockers that are multiples of , leaving only lockers and . Then he goes ahead and opens all lockers , leaving lockers either or . He then goes ahead and opens all lockers , leaving the lockers either or . He then goes ahead and opens all lockers , leaving or . He then opens , leaving or . He then opens and leaves and . He then opens all , so we have and , leaving lockers , and , and he is at where he started again. He then opens and , and then goes back and opens locker number , leaving locker number untouched. He opens that locker.
Solution 2
We can also solve this with recursion. Let be the last locker he opens given that he started with lockers. Let there be lockers. After he first reaches the end of the hallway, there are lockers remaining. There is a correspondence between these unopened lockers and if he began with lockers. The locker (if he started with lockers) corresponds to the locker (if he started with lockers). It follows that as they are corresponding lockers. We can compute and use the recursion to find
Solution 2
list all the numbers from 1 through 1024, then do the process yourself!!!! It will take about 25 minutes, but thats ok! eventually you will get 342
See also
1996 AIME (Problems • Answer Key • Resources) | ||
Preceded by Problem 8 |
Followed by Problem 10 | |
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.