Open and Closed LockersSay that we have a hallway with n lockers, numbered sequentialy from 1 to n. The lockers have two possible states, open and closed. Initially all the lockers are closed. The first kid who walks down the hallway flips every locker to the opposite state, that is, opens them all. The second kid flips the first locker door and every other locker door to the opposite state, that is, closes them. The third kid flips every third door, opening some, closing others. The fourth kid does every fourth door, etc. After n kids have passed down the hallway, which lockers are open, and which are closed? |