A Clock Puzzle

Dr. Dobb's Journal November 1997


I had just set four bowls on the floor and opened a can of turkey and giblets dinner when I saw "Good Morning Silicon Valley" paint across my monitor and knew that my e-mail was in.

Pushing the cat feeding project aside, I sat and sorted: news in the News folder; spam and unsolicited attachments to Trash; personal mail to Personal; mail regarding this column, click-click, consign it all to Flames. When I finished triage, I began to work through the Flames folder.

Here's a musical correction: A song parody I quoted, "Write in C," was actually written by Brian Marshall at Microsoft back in '87 when he was a freshperson at the University of Waterloo. "I have a yellowed printout of the original draft." he wrote, "written on a Commodore 64 and printed on a Mannesmann-Tally printer, ready for carbon dating test." That won't be necessary, Bri.

Tiny yowled at my feet, leapt the 39 vertical inches to the desktop, and yowled at my face.

Still getting letters on the temperature problem from some months back: What do you do when you've been recording high and low temperatures daily and you miss a day? Evan Manning wrote to say that his UDouble classes don't help with the problem as another reader said they might: They propagate error distributions through further calculations, but don't tell you what the error distribution is. Darn.

Several other temperature messages, then a message from my cousin Corbett.

"Here's a puzzle for you," it said. "How do you set a digital clock?"

"I'll bite," I replied, and Ariel seemed to be thinking about it herself, "how do you set a digital clock?" I went to get tea, closely followed by two cats.

When I came back, two other cats were pacing across my desk and Corbett had responded.

"Say your digital clock shows only the hour and minute," his e-mail began. "Say you set it exactly right, waiting until 11:00:00.00000 to set it to 11:00. Okay, then it's going to say 11:00 right up through 11:00:59. If you take it literally, you could be off by almost a minute. Your best guess for the actual time when a clock set this way reads 11:00 is not 11:00 at all, but 11:00:30, a whole half minute later. Right? So how should you set this clock? That's the puzzle. My answer is, set it a half-minute off to begin with. Just watch for 10:59:30 and then set it to 11:00. That way, if you take its reading literally, you'll never be off more than 30 seconds."

"I disagree," I typed. "Would you do the same with the year, having your date/time clock change to 1997 in July? Of course not. When we say this is 1997, we understand that 1997 labels an interval, not a porklint." Actually, I typed "point"; "porklint" was how Frizzy's cat feet edited it.

"We're not talking about porklints," Corbett's reply said, "We're talking about clocks. When you look at a clock, you want to know what time it is now, not 30 seconds ago."

"But suppose you're a clockwatcher, I said, "eager to get off work. You want to know when it's exactly 5:00, and if you watch the properly set clock closely, it'll tell you that. Your 30-seconds-off clock won't." Ike rubbed against my leg to tell me she knew what time it was.

Corbett's reply was brief: "So what? Should I get docked for leaving 30 seconds early when that measurement exceeds the precision of the timeclock?"

I tried unsuccessfully to imagine my independent and undependable cousin Corbett punching a timeclock.

Hmm...I like this deceptively simple puzzle, but I've got to go feed these cats. You got any ideas?

--Michael Swaine


Copyright © 1997, Dr. Dobb's Journal