Friday, September 17, 2021

Math puzzle: The Locker Problem

  Assume the locker numbers start from 1 and increase by one as the students arrive at locker number 1000.  After student #1, all lockers are closed.  After student #2, all locker numbers divisible by 1 and 2 are open.  Those that aren't are closed.  After student #3, all locker numbers with factors of 1, 2 and 3 are closed.  The rest are open.  This pattern continues.


Locker Problem Diagram


Observations:

    After student #1 has their turn, locker number 1 is left untouched for the rest of the students.  After student #2 has their turn, locker number 2 and any locker before that is left untouched as so on.  Looking at the diagram above, the number of times a locker changes state is equal to the number of distinct factors.  1 has one factor, 2 has two distinct factors, 4 has 3 distinct factors, 12 has 6 distinct factors.  Hence, those with an odd number of distinct factors will be closed and those with even ones will be open.

    Looking at the diagram above, from number 1 to 17, lockers 1, 4, 8, and 16 remain closed at the end of the 1000 students.  I hypothesize that every perfect square will be closed and the rest will be open if this pattern continues.  To check, we can take another square and use the factors approach mentioned above.

  • Let's take 100.  It has factors 1, 2, 4, 5, 10, 20, 25, 50, 100- nine distinct factors.  Because it has an odd number of factors, it must be closed.
  • Let's take 900 with 27 distinct factors.  This is odd, so the locker is closed.
  • Let's take 50- not a perfect square.  It has 6 distinct factors, so it is open.


Conclusion:


    Locker numbers that are perfect squares are closed.  The remainder are open.  

    I used my knowledge of factors to find out the state of bigger numbers and simplification to determine the state based on odd or even number of factors.  I modelled the first few lockers to visually understand the problem, looking for patterns.

1 comment:

  1. Good post about your problem-solving process. Thanks, Michelle!

    ReplyDelete

Math Puzzle: Giant Soup Can of Hornby Island

 A geometric puzzle with real-life connections: On Hornby Island, BC, local artists were commissioned to paint the volunteer fire department...