## An Open and Shut Case

*April 18, 2011 at 12:17 pm* *
4 comments *

Most mathy folks are familiar with the locker problem:

Every day, 1000 students enter a school that has 1000 lockers. All of the lockers are closed when they arrive. Student 1 opens every locker. Student 2 closes every other locker. Student 3 then “changes the state” of every third locker – that is, he opens it if it’s closed, and he closes it if it’s open. Student 4 then changes the state of every fourth locker, Student 5 changes the state of every fifth locker, and so on, so that Student

nchanges the state of everynth locker.Which lockers are open after all 1000 students have finished opening and closing lockers?

At the 2011 NCTM Annual Meeting, the following variation of the locker problem appeared in the Daily Puzzle Challenge on Thursday:

Every day, 30 students enter a room with 30 lockers. All of the lockers are closed when they arrive. Student 1 opens every locker. Student 2 closes every locker. Student 3 then “changes the state” of every third locker — that is, he opens it if it’s closed, and he closes it if it’s open. Student 4 then changes the state of every fourth locker, Student 5 changes the state of every fifth locker, and so on, so that Student

nchanges the state of everynth locker.One day, some students are out sick. Regardless, those present repeat the process and just skip the students who are absent — for instance, if Student 3 were absent, then no one would change the state of every third locker.

When they finish, only Locker #1 is open, and the other 29 lockers are all closed. How many students were absent?

The following applets can be used to investigate the original problem or to solve the variation.

- http://connectedmath.msu.edu/CD/Grade6/Locker/index.html
- http://www.math.msu.edu/~nathsinc/java/Lockers/

Entry filed under: Uncategorized. Tags: locker, NCTM, postaweek2011.

1.Joshua Zucker | April 18, 2011 at 3:01 pmTypo: Should be “every other” for the 2nd student there.

A generalization: Is there some set of students that corresponds to every possible final state of the lockers?

And a comment: I heard a version of this problem where it was light bulbs instead. Pulling the light bulb string seems much more intuitive that switching the state of the locker.

2.venneblock | April 19, 2011 at 8:03 amArrgh. Typo fixed. It seems that I have a 100% success rate in catching my typos within 15 seconds of clicking the “Publish” button. I had fixed the typo after I published this post, but before I received your email. If only I had been a bit better at editing, I could have saved you the trouble of catching my error!

Intuitive? Hmm. Not sure. Seems that opening/closing lockers and turning lights on/off in such a pattern seems counter to anything I think kids would do on their own. I prefer problems that are more real… but I tolerate contrivance if it leads to a good result.

3.Veky | April 19, 2011 at 1:00 am@0: Absent were the non-squarefree students (various puns can be made here:), of which there are 11 up to 30:

4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28

@1: Yes, as can easily be seen by looking at Möbius (Dirichlet) inversion modulo 2 (or just by induction).

4.Natural Blogarithms » Blog Archive » The Locker Problems | April 25, 2011 at 4:16 pm[…] April 25th, 2011 by SplineGuy HT: Math Jokes for Mathy People […]