# Puzzling Adventures: Building the Perfect Alarm Clock

What if you could reengineer the buttons on your alarm clock to reduce the number of times you needed to push them to set it?

Image: Cloe Liane Shasha

• ### Gravity's Engines

We’ve long understood black holes to be the points at which the universe as we know it comes to an end. Often billions of times more massive than the Sun, they...

My digital alarm clock has many responsibilities. First, it has to wake me up at 6:30 A.M. to get my kid to school. Later, I reset it for the various 10-minute naps I take during the day.

Resetting the alarm clock for a new time entails changing the hour one hour at a time on a 24-hour clock and then changing the minute value one minute at a time. In the worst case, the minute value must be changed by clicking 59 times. (As you can see, it's not an iPhone, Android or other device that allows me to key in the right time.)

So, I thought that it would be nice to have an extra button that would advance the minutes by more than 1 with each click. The question then is: What number of minutes, as an interval, would be most efficient?

Warm-up:
Suppose the multi-minute button (MM for short) always advanced the time by 5 minutes. What, then, is the greatest possible number of clicks necessary to reset to the correct minute value?

Warm-up solution

Problems:

1. Still, 5 minutes may not be the best interval to choose for MM. What might be better for minimizing the worst-case number of clicks? What is that worst case?

2. Suppose that the first click on MM advanced a certain number of minutes, the second click on MM a possibly different number of minutes, and so on. What should those numbers be to minimize the worst-case number of clicks?

3. Suppose you were given two multi-minute buttons (MM1 and MM2), and each advanced the time by a fixed number of minutes. What should those two fixed numbers be for the two buttons to minimize the worst-case number of clicks? How many is that worst number?

Hint: Suppose one button advanced the minutes by, say 32, then two clicks of that button advanced the minute hand by 4 without changing the hour value.

Puzzle solution

We now have three buttons that advance the time, one by 1 minute and the others by other amounts. Many variants are still possible. For example, we could take away the constraint that all buttons advance the time and the constraint that one of the buttons must advance by 1 minute. If you have a cool variant that you can solve, then please post it, with the solution, as a comment on this story.

### ABOUT THE AUTHOR(S)

Dennis Shasha is at the Courant Institute of Mathematical Sciences, New York University. His most recent puzzle book, Puzzles for Programmers and Pros, was published in May 2007 by John Wiley and Sons/Wrox.

### Add a Comment

You must sign in or register as a ScientificAmerican.com member to submit a comment.
Click one of the buttons below to register using an existing Social Account.

## More from Scientific American

• Scientific American Mind | 50 minutes ago

### Why Do Top Athletes Suddenly Develop “the Yips”—a Tendency to Choke under Pressure?

• Scientific American Magazine | 50 minutes ago | 2

### Swiss Cheese and Dust Devils: 7 High-Resolution Shots of Surface Activity on Mars [Slide Show]

• News | 3 hours ago | 3

### Antarctic Neutrino Observatory Detects Unexplained High-Energy Particles

• Cocktail Party Physics | 14 hours ago

### C'mon Baby Light My (Magnetic) Fire

• The Curious Wavefunction | 18 hours ago

### An invasive ladybug uses a biological weapon to kill off competitors

See what we're tweeting about

More »

## Latest from SA Blog Network

• ### Deadly Snakes, Ugly Critters, Leonardo DiCaprio and Other Links from the Brink

Extinction Countdown | 1 hour ago
• ### Unusual Offshore Octopods: The See-Through "Glass" Octopus [Video]

STAFF
Octopus Chronicles | 2 hours ago
• ### #SciAmBlogs Friday - quantum computing, rationalilty, armed Treebeard, Giant African Land Snails, invasive ladybugs, and more.

STAFF
The Network Central | 11 hours ago
• ### Vision is all about change

MIND
Illusion Chasers | 11 hours ago
• ### C'mon Baby Light My (Magnetic) Fire

Cocktail Party Physics | 14 hours ago

## Science Jobs of the Week

Puzzling Adventures: Building the Perfect Alarm Clock

X

### Subscribe Today

Save 66% off the cover price and get a free gift!

X

X

###### Welcome, . Do you have an existing ScientificAmerican.com account?

Yes, please link my existing account with for quick, secure access.

No, I would like to create a new account with my profile information.

X

Are you sure?

X

### Institutional Access

It has been identified that the institution you are trying to access this article from has institutional site license access to Scientific American on nature.com. To access this article in its entirety through site license access, click below.

X

X