Monday, March 5, 2012

Just for Fun: Problem 3

It's 6am and thirty lockers stand in a long lovely row, closed and neat, ready for the opening of another school day.

  • The first student arrives and, what the heck, opens every locker! 
  • The second student arrives and changes the position of every second locker (i.e. lockers 2, 4, 6, 8, etc all got closed).
  • The third student arrives and changes the position of every third locker (from open to closed or vise versa)
  • The fourth student changes the position of every fourth locker...
  • This continues until the 30th student arrives and changes the position of locker #30.

What is the final configuration of the lockers after all 30 students have passed by?

1 comment: