## 1000 students walk down a hallway with 1000 lockers....

Sequences, counting (including probability), logic and truth tables, algorithms, number theory, set theory, etc.
maggiemagnet
Posts: 358
Joined: Mon Dec 08, 2008 12:32 am
Contact:

### 1000 students walk down a hallway with 1000 lockers....

On the first day back after Spring Break, the students enter a long hallway containing one thousand lockers. The first student, as he walks from one end to the other, opens every locker door. The second student, as she follows the first, closes every other door. The third student follows the second, and switches every third door; that is, if a door is open, he closes it, and if a door is closed, he opens it.

The students continue with this pattern, the n-th student switching every n doors. After a thousand students have walked down the hallways of lockers, which doors end up being open?

Please tell me there is a simple, or simple-ish, way of doing this!?!

stapel_eliz
Posts: 1628
Joined: Mon Dec 08, 2008 4:22 pm
Contact:
Please tell me there is a simple, or simple-ish, way of doing this!
There is!

This old chestnut has been around forever, so there are some great archived explanations. Try "Ask Dr. Math" for an excellent presentation.

maggiemagnet
Posts: 358
Joined: Mon Dec 08, 2008 12:32 am
Contact:

### Re: 1000 students walk down a hallway with 1000 lockers....

The explanation in the link was so much better. Thank you!