Locker Problem Activity

Student Page

Teacher Lesson Plan

A Thousand Lockers

Imagine you are at a school that still has student lockers. There are 1000 lockers, all shut and unlocked, and 1000 students.

Here's the problem:

1. Suppose the first student goes along the row and opens every locker.

2. The second student then goes along and shuts every other locker beginning with number 2.

3. The third student changes the state of every third locker beginning with number 3. (If the locker is open the student shuts it, and if the locker is closed the student opens it.)

4. The fourth student changes the state of every fourth locker beginning with number 4. Imagine that this continues until the thousand students have followed the pattern with the thousand lockers. At the end, which lockers will be open and which will be closed? Why?

Using "locker boards":

As your group works through the problem using the "locker boards," one person should record the process your group develops to solve the problem. The others should take turns opening and closing the lockers. Look here to view the locker open/close sequence.

You can also simulate the Locker Problem by using a spreadsheet. Follow these directions:
1. Make a new spreadsheet file. Name it lockers.

2. Select Column 1 and set the font size to 12, style to bold, and alignment to center (for better viewing).

3. Select the first cell (A1) and type 0 (zero) to denote that the first locker is shut. Continue typing 0 down the first column until 36 cells (A1) through (A36) have a 0 in them. (view example)

4. In the first cell in Column 2 (B1) type Student 1. This is where we will keep track of which student is opening/closing the lockers.

5. Student 1 opens all of the lockers. Simulate this by selecting the first cell in Column 1 (A1) and typing 1 (one). Continue changing all of the 0's to 1's. (view example)

6. Change the student counter to Student 2.

7. Student 2 starts with locker 2, closes it, and then closes every other locker. Simulate this by selecting A2 (skipping the first cell), typing 0 (zero), and then changing the 1 to a 0 every other locker. (view example)

8. Change the student counter to Student 3.

9. Student 3 starts with locker 3 and since it is still open, closes it and then continues to change the state of every third locker. Simulate this by selecting A3 (skipping the first two cells), and typing 0 to signify that the locker is closed. Now at every third locker if there is a 0 replace it with a 1, and if there is a 1 replace it with 0. (view example)

10. Continue this process until 36 students have followed the pattern with the lockers. (view example)

Displaying the Data:

Before making a graph of the spreadsheet data, check the entries in cells A1 through A36 here. Use these directions to display the data from your spreadsheet.

Looking for Patterns:

After the 36th student opens/closes lockers, which lockers are open? Which are closed?

After the 100th student opens/closes lockers, which lockers are open? Which are closed?

After the 10,000th lockers remain open or closed?
What pattern do you see?

Can you find a pattern for any number of lockers?

Other "Locker Problems" on the Web

1000 Lockers - Ask Dr. Math
Classic Locker Problem With A Twist - M.S. Problem of the Week
Illustrating the Locker Problem - Wolfram Demonstration Project
Locker Problem - Ask Dr. Math
Opening and Closing Lockers - Ask Dr. Math