Friday, October 2, 2009

Locker Problem


1000 Locker Problem Solution

Vinnie Skalka
October 2nd, 2009

In the locker problem, there are 1000 students/lockers. The 1st student opened every locker. And the 2nd student closed every other locker. Then the 3rd student changes the state of every three lockers and a 4th student changes the state of every fourth locker. Every number has as factors itself and 1. Therefore, every locker is opened on the first pass. Every locker number that is prime was only touched twice by the student because prime numbers can only be divided by 1 and itself. So all prime lockers are now shut and their state will not be changed again.
At the end there only 31 lockers open and all the rest are closed. In order for a locker to be open its state had to be changed an odd amount of times. In order for their state to be open, the locker number was a perfect square. I found the pattern by sitting down and actually writing the problem out, but I only did 100 lockers. It matters that the perfect squares have odd factors because if it had an even amount of factors the state of the locker is closed. But an odd amount of factors its state is open.


Student Locker #18
1---open
2---closed
3--- open
6---closed
9---open
18---closed
1---open


Student Locker #16

2---closed
4---open
8---closed
16---open

No comments:

Post a Comment