Monday, October 26, 2009

Locker Problem

The beginning of this week will be spent working our way through the Locker Problem.


Here is the famous locker problem:

Imagine you are at a school that has 1,000 lockers, all shut.


Suppose the first student goes along the row and opens every locker.
  • The second student then goes along and shuts every other locker beginning with locker number 2.
  • The third student changes the state of every third locker beginning with locker number 3. (If the locker is open the student shuts it, and if the locker is closed the student opens it.)
  • The fourth student changes the state of every fourth locker beginning with number 4.
Imagine that this continues until the 1,000 students have followed the pattern with the 1,000 lockers.

At the end, which lockers will be open and which will be closed?

No comments:

Post a Comment