The Lockers Problem


Lots of lockers

Big County Highschool has alot of students - so many that it has one hall with an infinite number of student lockers. The lockers run down one side of the hall in a row and are numbered starting with the number one. Big County Highschool is so big that it also has an infinite number of custodians, which, strangely enough, are also numbered. Custodian number one starts walking down the hallway opening every locker, starting with locker number one. He then opens the second, the third, etc. Custodian number two follows him, closing every second locker. He closes the second, the fourth, the sixth, etc. Custodian number three follows custodian number four, opening or closing every third locker. He closes the third, opens the sixth, closes the ninth, opens the twelfth, etc. The fourth custodian follows the third, closing or opening every fourth locker, etc. After n custodians have started opening and/or closing lockers, which of the previous n-1 lockers are open and which are closed?

This problem was originally presented (to me) by Professor Richard Crandall in his Scientific Computation class.

Think you got the answer? Send it to me and earn eternal (ephemeral?) fame --> Send me an email!
<-- Back