Tuesday, September 17, 2019

The Locker Problem

When this problem was first posed, my immediate thought was to use factoring in order to solve it. Since a locker can only be open/closed by every n-th student, only factors of that number of locker will affect the state. For example, students #1, 2, 3, 4, 6, and 12 will all be able to change the 12th locker, and they are also all of the factors of the number 12. Since locker 12 can be changed 6 times (number of independent factors), it follows that

#1 (closes) - #2 (opens) - #3 (closes) - #4 (opens) - #6 (closes) - #12 (opens)

and so its end state will be open. Noticing a pattern, it is apparent that if the locker number has a number of factors that is even, its end state will be open. On the other hand, if the locker number has a number of factors that is odd, its end state will be closed. This is nice and allows one to categorize a locker by finding its factors; however, after testing this for lockers #1-#17, I noticed another pattern which greatly simplifies this process. Most numbers have an even number of factors, since they all come in pairs. There is an exception to this: perfect squares have a pair of factors that are the same. For example, 9 has a pair of factors of 3. Doing this locker problem, we only take into consideration different factors. Therefore, perfect squares have an odd number of factors, and as such a locker number that is a perfect square is closed.

To summarize for the 1000 locker problem, all perfect squares up to this number will have their respective locker number be closed. This includes locker #1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, and 961. All other locker numbers will be opened.

The following link shows my test cases: Drive Spreadsheet
* The letters of the alphabet show the sequence of which student is changing the locker. e.g. column D is the 4th student going through each locker.

No comments:

Post a Comment

Reflecting Upon My Reflections

In the first couple weeks of the course, we talked about learning mathematics and what we can do as teachers to enhance our students' un...