1000 Lockers
A new princial arrived at the school to which he had been asigned. In a seemingly senseless act, he came up with a plan to begin to exert his authority. The school had 1000 students and 1000 lockers, which were in a single long hallway. After gathering all the students in the school auditorium, he presented his exercise in control.
He instructed the students to leave the auditorium in single file and head to the locker hallway. The first student was instructed to begin with the first locker and open every locker door. The second student was instructed to close every second locker. The third student was told that upon approaching the third locker, if it is open, close it ... and if it is closed, open it ... and then continue. The fourth was given the same instructions as the third student, except he was to begin with the fourth door. Each successive student was given the same instructions, which were obviously dependent upon his position in the line of students.
After the last student opened or closed the appropriate locker doors, how many remained open?
He instructed the students to leave the auditorium in single file and head to the locker hallway. The first student was instructed to begin with the first locker and open every locker door. The second student was instructed to close every second locker. The third student was told that upon approaching the third locker, if it is open, close it ... and if it is closed, open it ... and then continue. The fourth was given the same instructions as the third student, except he was to begin with the fourth door. Each successive student was given the same instructions, which were obviously dependent upon his position in the line of students.
After the last student opened or closed the appropriate locker doors, how many remained open?





3 Comments:
All lockers with numbers that are perfect squares remain open: 1, 4, 9, 16, 25, 36 ... 900, 961.
The count of lockers is 31.
Doors change state when the nth student is a fact or the locker
e.g. locker 15 changes state when students 1,3,5,15 walk down the hall
if it is odd # of changes the state is open
if it is even # of changes the state is closed
e.g. for 24 with factors of 1,2,3,4,6,8,12,24 After student 3 the locker is open. After student 8 the locker is closed.
So the only numbers with odd number of factors are perfect squares.
31^2=961< 1000 < 1024=32^2
1^2 ,2^2,3^2…… 31^2 are open
Answer: 31 lockers are open
Cam
absolutely ... 31 it is
Post a Comment
Links to this post:
Create a Link
<< Home