Sunday, September 28, 2025

The Locker Problem

 


Image 1. Thinking



Image 2 Excel Simulation

In the introduction of the book “Thinking Mathematically” by Mason, Burton and Stacey, you can read: “Probably the single most important lesson to be learned is that being stuck is an honourable state and an essential part of improving thinking”. This phrase gave me the courage to share my approach to solving this locker problem.

              As I have learned to code in the past, the first impulse was to try to find an algorithm that would help me find the answer. I couldn’t find any, and I decided not to look for AI solutions or suggestions. I left the problem for the next day. The next day I scribbled my reasoning on a paper and didn’t have luck. I started to listen to some classmates talking about the problem, and I avoided them. I wanted to think about the solution by myself.

              Finally, I decided to solve the problem manually. I went into Excel and started simulating row by row the action of each student. I coloured the cell yellow if the cell represented a closed locker, and I left the cell without any fill if the locker was open. After the 4th student, I could deduce a pattern, but I kept the simulation until student #49.

              My conclusion was that the lockers that will be closed are:

1 2, 22, 32, and so on until 312, which corresponds to locker 961. The rest of the lockers will be open.

During the exercise, I found myself playing to find patterns of distance between numbers, and the beauty of the figure formed by the yellow colour. (See image 2)

I still don’t know how to express the solution in a mathematical expression, but I had a lot of fun playing with my model and sharing it with my family.

No comments:

Post a Comment