Pages

What are the Chances: Lucky Tourist Cracks Safe Code

I've been trying to figure out the lost combination to this lock for months. Maybe Mr Mills can help?
I've been trying to figure out the forgotten combination
for this lock for months. Maybe Mr Mills can help?
A friend sent me a link to this article on the BBC's website about a lucky tourist who opened a combination-locked safe for the first time since the 1970s.

The article briefly goes into the chances of guessing the combination correctly with one attempt, but doesn't really say how they were worked out. I thought I'd post with my thoughts on that as it may make a nice puzzle.

Just the Facts

The safe has a dial with the numbers from 0 - 60. Turn it three times clockwise to get to the first number; twice anticlockwise to get to the second; and once more clockwise to choose the third.

My initial thought was that the second number couldn't be the same as the first because the dial has to turn (ditto for the third number compared to the second), but then it goes all the way round anyway so I don't think it matters.

What are the chances?

If we assume that the numbers were chosen randomly in the first place, then there are 61 possibilities for each one (the numbers 1 - 60 inclusive, and also zero), and they're all equally likely to be chosen.

The First Number

There are 61 options for the first number. That's easy.

The Second Number

There are 61 options for the second number. Easy! However, looking at the first two numbers together, there are 61 options for the first, and then 61 options for the second for each of the possible choices for the first number. That makes 61 * 61 = 3,721 possible options.

The Third Number

There are 61 options for the third number, but extending the reasoning in the previous paragraph, we have 61 * 61 * 61 = 226,981.

Altogether now!

So, 226,981 different possible combinations. My tiny mind can't really comprehend that, however, so I like to come up with a spurious context to help it along a bit:

If you employed someone to systematically work through all of these possibilities, assuming they were pretty quick and could try one per second it would take them just over 63 hours. That's about two weeks of working full-time hours*.

But wait!

Award-winning statistician Professor Jeff Rosenthal (mentioned in the BBC article) says that these sort of locks have a certain amount of "wiggle room". Using the suggestion in the article that there might actually be a "three digit leeway" (I'm taking that to mean that the "correct" number and the one either side of it will work), that means there's not just one combination that will work to open the safe.

How many are there, then?

Using similar reasoning as I did earlier in this post, there are 3 "correct" positions for the dial for each of the three numbers in the code, so there are 3 * 3 * 3 = 27 solutions that will unlock the safe. That means that 27 out of the 226,981 possible combinations will work, or about 1 in every 8,406 ish. Or 1 in 8,000 even-more-ish, as quoted in the article.

But wait a bit more!

The winning combination was actually 20-40-60. It's entirely possible that was chosen randomly, but think about your own "random" passwords, padlock combinations and the like. How many of them are really random? Humans are rubbish at random, so often use patterns and personal information to set passcodes that they can remember easily.


I alluded to a similar situation in a recent puzzle I set for the Today Programme on the theme of Enigma machines and their settings. Essentially, Bletchley Park's Codebreakers were trying to "guess" the settings that their enemies were using to set up their cipher machines. The underlying maths behind figuring out the scale of the problem is exactly what we've used here, and the considerations in the previous paragraph are equally applicable to the World War 2 cryptanalytic operation.




* Or about 4 days if you're a teacher.

No comments:

Post a Comment

Hi, thanks for commenting. If you feel passionately about anything I've posted, please feel free to make your views known but please take the time to make sure that your comments are rational, considered and suitable for any audience.

Thanks for reading!