Thursday, September 18, 2014
3 days and several Excel spreadsheets later, I've just cracked the "locker problem":

"A new high school has just been completed. There are 1,000 lockers in the school and they are numbered from 1 through 1,000. During recess (remember, this is a fictional problem), the students decide to try an experiment. When recess is over, each student walks into the school one at a time. The first student opens all of the locker doors. The second student closes all of the locker doors with even numbers. The third student changes all of the locker doors that are multiples of 3 (closing lockers that are open, and opening lockers that are closed). The fourth student changes the position of all locker doors numbered with multiples of four and so on. After 1,000 students have entered the school, how many locker doors will be open, which ones, and why?"

Answer: 31 open, 969 closed. 

The open locker #s correspond to perfect squares: #1, #4, #9, #16, #25, #36 etc.

Perfect squares factor oddly, eg., 25 = 1, 5, 25.  Any odd # of factors reduces to = open, closed, open.

Everything else factors evenly, eg., 10 = 1, 2, 5, 10.  Any even # of factors reduces to = open, closed.

<< Home

Powered by Blogger

.post-title { display: none!important; }