Gifted Issues Discussion homepage
Posted By: BWBShari Math Help....Locker Problem - 12/04/10 02:44 AM
Can't do it, tried, can't...So Help!

A row of lockers numbered 1 through 100.
-Person A walks by and closes all the doors that are multiples of 2.
-Person B closes all doors that are multiples of 3 and opens the ones that are closed.
-Person C closes all doors that multiply by 4 and opens the ones that are closed.
-Etc, etc, etc until person number 100 walks by and changes only locker 100.

Which lockers are open at the end of this process??
Posted By: MegMeg Re: Math Help....Locker Problem - 12/04/10 03:00 AM
Need more info. Does person B open the ones that are closed, and THEN close the doors that are multiples of 3? Or close the multiples-of-three doors, and THEN open all the closed doors?

If the former, then each person undoes the previous person's work (i.e. returns all doors to "open") and then does their own thing. Which means person 100 opens EVERYTHING that's closed (which is just Door 99, but that's irrelevant), and closes Door 100.

If the latter, then everybody closes some lockers and then OPENS ALL THE LOCKERS BACK UP AGAIN. In which case, all the lockers are open after Person 100 is done.

Unless I am misreading the problem somehow . . . ?
Posted By: BWBShari Re: Math Help....Locker Problem - 12/04/10 03:24 AM
The solution is listed a dozen times on google. The "perfect squares" will be the only doors open.

But what I need to know is if there is a formula of some sort to solve this or if I have to physically open and close doors?
Posted By: KAR120C Re: Math Help....Locker Problem - 12/04/10 03:52 AM
I think it's that person 2 opens all the even-numbered doors, then person 3 changes-the-state-of (closes or opens, depending on what they already are) the multiples of three... etc.

It's a question of how many factors something has. Most numbers get their factors in pairs -- like 12 is 1x12, 2x6, 3x4.... but squares end up with that one in the middle... 16 for instance is 1x16, 2x8, 4x4. And since the #4 person only changes is once, it means that the locker door has been moved an odd number of times (including having been closed originally, then open, close, open, close) where all the non-squares are moved an even number of times (closed originally, open, closed, open, closed, open).
Posted By: ColinsMum Re: Math Help....Locker Problem - 12/04/10 12:07 PM
Originally Posted by LittleCherub
( It doesn�t explain why all other non-perfect square numbers have even numbers of factors though.)
Erica already alluded to that: if f is a factor of n, that means n = kf for some integer k, so k = n/f is also a factor of n, and if f wasn't exactly the square root of n, then it's a different factor. So factors always appear in pairs, unless there is a square root. That's easier than using the prime factorisation, I think, although of course one can do it that way.
Posted By: MegMeg Re: Math Help....Locker Problem - 12/04/10 03:26 PM
Ah, this makes more sense. The way I was reading it, it was just a "gotcha" question.

Now I wish I hadn't read the explanation, so I could figure it out myself!
© Gifted Issues Discussion Forum