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

Sequences, counting (including probability), logic and truth tables, algorithms, number theory, set theory, etc.

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

Postby maggiemagnet on Tue Mar 17, 2009 8:34 pm

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!?! :shock:
User avatar
maggiemagnet
 
Posts: 287
Joined: Mon Dec 08, 2008 12:32 am

Sponsor

Sponsor
 

  TOPIC_SOLVED

Postby stapel_eliz on Wed Mar 18, 2009 1:18 am

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

There is! :wink:

This old chestnut has been around forever, so there are some great archived explanations. Try "Ask Dr. Math" for an excellent presentation. :D
User avatar
stapel_eliz
 
Posts: 1784
Joined: Mon Dec 08, 2008 4:22 pm

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

Postby maggiemagnet on Sat Mar 21, 2009 10:41 pm

The explanation in the link was so much better. Thank you! :clap:
User avatar
maggiemagnet
 
Posts: 287
Joined: Mon Dec 08, 2008 12:32 am


Return to Discrete Math