David W. answered 09/20/16
Tutor
4.7
(90)
Experienced Prof
It really helps to read and re-read the problem until you understand it and can put it into you own words. One of the benefits of doing this is to eliminate or reduce TMI (too much information).
If lockers numbered 1-1000 all start locked and are all opened by Student #1, they are now all open -- might as well start here.
If Student #2 closes all even numbered lockers, we might as well start here, too.
This is the problem: There are 1000 lockers numbered 1-1000. The even lockers are closed; the odd lockers are open. A student (#3) changes the state (from open to closed or from closed to open) "of every locker beginning with locker #3." What determines if a locker changes state?
The wording of the problem may be incorrect. As stated, "every locker beginning with locker #3" changes state, so:
Locker number greater than or equal to 3.
- - - - - - -Such a problem is often used to teach Common Multiples.
If all the even-numbered lockers are closed (with odd-numbered lockers left open), then a Student #3 changes the state of every third locker (that is, 3, 6, 9, ...), then Student #3 will open lockers 6, 12, 18, ... and close lockers 3, 9, 15 ...
This is because the lockers numbered 6,12,18,... are multiples of both 2 and 3 but the lockers numberd 3,9,15,... are multiples of 3 but not of 2.