June 2012


Updated June 5, 2012. (Scroll to the end for the update.)

This week’s Numberplay is about a locker room full of, well, lockers – 100 of them, to be exact. The lockers are closed until a janitor (let’s call her Portia) visits the room and opens them all. Then Portia visits the room again and closes every other locker. Later on, she visits the room a third time, opening or closing every third one. And so on, for 100 visits in all.

Head over to the Times, then come back here and enjoy the pictures.

Picture #1. The 100 lockers of the puzzle are represented as a row of tiny squares – red squares for closed doors, green for open. The squares in the top row (all green) show the lockers all open after Portia’s first visit to the locker room.

The second row of squares, alternating green and red, show the lockers after her second visit, and so on.

Doors

If you squint at the patterns across the top, I think you can see Portia’s face.

Picture #2. After Portia’s first visit to the locker room, all 100 lockers are open. After her second visit, 50 are open and 50 are closed. Ninety-eight visits later, ten lockers are open. (Just which of the lockers are open in the end is the beautiful result of the puzzle, which you’ll find more easily in the comments to this week’s puzzle than you will by trying to count the tiny squares in the picture here.)

You might wonder – I did anyway – how the number of open lockers changes between Portia’s second and hundredth visit. Here’s a graph.

OpenDoors

What a delightfully curious graph! The number of open lockers wanders seemingly aimlessly about the low 50s for a while. It briefly threatens to stay put at 54, then glides down with a few small bumps to a final value of 10.

Intrepid readers can find the Excel spreadsheet I created these pictures from here.

Thanks to Gary Antonick for sharing this great puzzle, which was suggested by Volodymyr Ivanchenko.

Updated June 5, 2012. Back at Numberplay, Gary suggested looking for the number of open lockers sequence at the Online Encyclopedia of Integer Sequences. I didn’t find anything, and I suspect that’s because this puzzle gives different sequences for each initial number of lockers.

So, I put together a SQL Server 2012 script (and posted it at SQL Fiddle here) to generate data for this “number of open lockers” graph for locker rooms with other than 100 lockers.

The graph gets even more interesting when there are more lockers.

OpenDoors300

OpenDoors1000pt1

OpenDoors1000pt2

From Public Document No. 34 of the Commonwealth of Massachusetts, “Annual Report of the Department of Public Health for the Year ended November 30, 1928,” which can be found here:

San1928

It was the last sentence that drew me to this page. Manny was my grandfather, and my mother grew up at the (Lakeville State) Sanatorium. (See RUTGER.)

Once here, though, it was impossible not to puzzle over the several averages in the report that were given to seven-digit precision. For example, 193.9426, the daily average number of patients for the year. In the late 1920s, computing 70,983/366 to seven places wasn’t a snap like it is now. More likely, it required some cranking, punching, or scribbling.

I am badly out of practice, but while this took me a good two minutes, it reminded me how much I love long division.Original Odhner

 

My minimally-informed guess? That the Massachusetts Department of Public Health had one of the early motor-driven calculators, like the Marchand above (center). It’s hard for me to imagine a reason to compute seven digits of precision when fewer would suffice unless it was very little extra work to get the extra digits.

Then again, maybe I’m wrong and the reality was more romantic, and there was a clerk who loved little more than long division. I suppose we’ll never know.