# How hard would this lock be to pick?

**URL:** <https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353>\
**Category:** Factual Questions\
**Created:** [December 2, 2008, 4:01pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353 "2008-12-02T16:01:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![LawMonkey](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LawMonkey](https://boards.straightdope.com/u/LawMonkey)\
**Post date:** [December 2, 2008, 4:01pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/1 "2008-12-02T16:01:07Z")

</div>

We’ve got a spare key in a box in the backyard. The box has a modified (as explained below) Simplex style lock to allow access to the key. Given how easy Simplex locks are to crack, I worry that this one might be easier still.

The lock works like this: There are ten numbered buttons. So far as I know, the combination can be anywhere from one to ten of these, subject to two conditions: 1) in usual simplex fashion, each number can only be used once, so 1234 would be a valid combination, but 1231 would not. 2) The order of the buttons used is irrelevant. So, if the combination is 1234, then 4321, 3412, 2143, etc., will all open the lock.

How many combinations does this actually give us?

---

<div class="post-metadata">

**Author:** ![Bryan\_Ekers](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bryan_ekers/32/183_2.png) [@Bryan\_Ekers](https://boards.straightdope.com/u/Bryan_Ekers)\
**Post date:** [December 2, 2008, 4:05pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/2 "2008-12-02T16:05:29Z")

</div>

10! / (4! \* 6!)

I figure 210.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [December 2, 2008, 4:13pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/3 "2008-12-02T16:13:36Z")

</div>

> [@Bryan\_Ekers](#):
>
> 10! / (4! \* 6!)
> 
> I figure 210.

Yeah, typing “10 choose 4” into Google, I also get 210.

Doesn’t seem like a terribly secure lock to me. Not only that, I would expect that the buttons used for the combination would either experience additional wear over time or leave residue finger grease on them (which a little powder would reveal) would offer more clues to the would-be lock cracker.

---

<div class="post-metadata">

**Author:** ![bouv](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@bouv](https://boards.straightdope.com/u/bouv)\
**Post date:** [December 2, 2008, 4:14pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/4 "2008-12-02T16:14:09Z")

</div>

The combo doesn’t have to use four, it can use just one, or all ten:

[QUOTE= LawMonkey]  
There are ten numbered buttons. So far as I know, the combination can be anywhere from one to ten of these  
[/quote]

Hmmm…I think the formula would use a sum of “semi-factorials” (I know there’s a real word for that, but I can’t think of it.) So the total would be:  
10_9_8_7_6_5_4_3_2 (ie, 10!) (if you use all 10 numbers this is how many combinations there are.)  
+  
10_9_8_7_6_5_4_3_2 (we have this many using just 9 numbers)  
+  
10_9_8_7_6_5_4\*3 (using 8 numbers.)

So we do this until we get to using just one number, and we get: 9,864,100…I think. Someone should check my math.

---

<div class="post-metadata">

**Author:** ![Bryan\_Ekers](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bryan_ekers/32/183_2.png) [@Bryan\_Ekers](https://boards.straightdope.com/u/Bryan_Ekers)\
**Post date:** [December 2, 2008, 4:20pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/5 "2008-12-02T16:20:00Z")

</div>

Ah. The OP’s examples had four digits, whence my misinterpretation.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [December 2, 2008, 4:21pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/6 "2008-12-02T16:21:31Z")

</div>

> [@Bryan\_Ekers](#):
>
> Ah. The OP’s examples had four digits, whence my misinterpretation.

OK, what am I missing. I’m still interpreting the problem the way you originally interpreted it. I only see 210 combinations.

edit: Oh, I see now. The combination length can be 1 to 10 digits. Ah.

So the answer should be (10 choose 1) + (10 choose 2) + (10 choose 3) … (10 choose 10)

10 + 45 + 120 + 210 + 252 + 210 + 120 + 45 + 10 + 1 =

1023 combinations

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [December 2, 2008, 4:38pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/7 "2008-12-02T16:38:15Z")

</div>

> [@bouv](#):
>
> The combo doesn’t have to use four, it can use just one, or all ten:  
> Hmmm…I think the formula would use a sum of “semi-factorials” (I know there’s a real word for that, but I can’t think of it.) So the total would be:  
> 10_9_8_7_6_5_4_3_2 (ie, 10!) (if you use all 10 numbers this is how many combinations there are.)  
> +  
> 10_9_8_7_6_5_4_3_2 (we have this many using just 9 numbers)  
> +  
> 10_9_8_7_6_5_4\*3 (using 8 numbers.)
> 
> So we do this until we get to using just one number, and we get: 9,864,100…I think. Someone should check my math.

The problem with this answer is that you’re taking order into consideration. 10! is how many possible arrangements of 10 items there are, but the OP says that order is irrelevant, so you want the choose function (binomial coefficient). “N choose K” tells you how many k-element subsets there are in an n-element group. Hence, for a 10 digit code, there should be one possible combination (10 choose 10), since all the buttons will be pressed down, and the order in which we press them is irrelevant, not 10! combinations.

---

<div class="post-metadata">

**Author:** ![bouv](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@bouv](https://boards.straightdope.com/u/bouv)\
**Post date:** [December 2, 2008, 4:40pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/8 "2008-12-02T16:40:23Z")

</div>

> [@pulykamell](#):
>
> The problem with this answer is that you’re taking order into consideration. 10! is how many possible arrangements of 10 items there are, but the OP says that order is irrelevant, so you want the choose function (binomial coefficient). “N choose K” tells you how many k-element subsets there are in an n-element group. Hence, for a 10 digit code, there should be one possible combination (10 choose 10), since all the buttons will be pressed down, and the order in which we press them is irrelevant, not 10! combinations.

Ahh, you’re right, I did miss that.

---

<div class="post-metadata">

**Author:** ![Santo\_Rugger](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Santo\_Rugger](https://boards.straightdope.com/u/Santo_Rugger)\
**Post date:** [December 2, 2008, 5:12pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/9 "2008-12-02T17:12:50Z")

</div>

> [@pulykamell](#):
>
> 10 + 45 + 120 + 210 + 252 + 210 + 120 + 45 + 10 + 1 =
> 
> 1023 combinations

Just popping in to say it’s funny that the answer is 2[sup]10[/sup] - 1

Does this hold true for the general case for n \>= 2?

---

<div class="post-metadata">

**Author:** ![unclelem](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@unclelem](https://boards.straightdope.com/u/unclelem)\
**Post date:** [December 2, 2008, 5:21pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/10 "2008-12-02T17:21:15Z")

</div>

> [@Santo\_Rugger](#):
>
> Just popping in to say it’s funny that the answer is 2[sup]10[/sup] - 1
> 
> Does this hold true for the general case for n \>= 2?

Yes, since any combination either includes, or does not include each digit, there are 2^n possible combinations. The only invalid combination is no digits.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [December 2, 2008, 5:25pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/11 "2008-12-02T17:25:09Z")

</div>

> [@unclelem](#):
>
> Yes, since any combination either includes, or does not include each digit, there are 2^n possible combinations. The only invalid combination is no digits.

Ah! That’s actually quite clever. Just think of it as a 10-digit binary number, subtracting 1 for “0000000000” (an invalid combo). That’s a much easier way to think about this problem.

---

<div class="post-metadata">

**Author:** ![Santo\_Rugger](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Santo\_Rugger](https://boards.straightdope.com/u/Santo_Rugger)\
**Post date:** [December 2, 2008, 5:31pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/12 "2008-12-02T17:31:41Z")

</div>

> [@pulykamell](#):
>
> Ah! That’s actually quite clever. Just think of it as a 10-digit binary number, subtracting 1 for “0000000000” (an invalid combo). That’s a much easier way to think about this problem.

I was racking my brain to figure out _why_, but then I realized that 1 means the button is pushed, and 0 means it’s not. Simple! Good work, guys.

---

<div class="post-metadata">

**Author:** ![unclelem](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@unclelem](https://boards.straightdope.com/u/unclelem)\
**Post date:** [December 2, 2008, 6:20pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/13 "2008-12-02T18:20:11Z")

</div>

> [@pulykamell](#):
>
> Ah! That’s actually quite clever. Just think of it as a 10-digit binary number, subtracting 1 for “0000000000” (an invalid combo). That’s a much easier way to think about this problem.

Really it’s almost the same approach you used earlier, but rather than adding up all of the sub-cases, just subtract the one invalid case from the total possibilities.

(10 choose any number) - (10 choose zero)

When I saw the pattern of a sum of (10 choose i), a little bell went off in my head that said [binomial theorem](http://en.wikipedia.org/wiki/Binomial_theorem).

Credit for cleverness goes to Blaise Pascal in this particular incidence.

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [December 2, 2008, 7:54pm UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/14 "2008-12-02T19:54:46Z")

</div>

I’m trying to figure out from all of the posts if you guys are describing the lock I think you are describing.

Because the ones I used worked like this:  
(from [here](http://mathforum.org/pcmi/hstp/sum2004/morning/week1.04.pdf))

> [@](#):
>
> [ol][li]A combination is a sequence of 0 or more pushes, each push involving at least one button. [/li][li]Each button may be used at most once (once you press it, it stays in). [/li][li]Each push may include any of the buttons that haven’t been [/li]pushed yet, up to and including all remaining buttons.  
> [li]The combination does not need to include all buttons. [/li][li]When two or more buttons are pushed at the same time, [/li]order doesn’t matter.[/ol]

The part that is confusing me is that the ones I used you could press “1,3” at once and then press “2”. Both 1 and 3 would go in at the same time, and then 2 in a second step. If the combo was set this way, then an attempt at pressing “1” followed by “2,3” would _not_ work.

And point 5 in this list is kind of silly since you can’t _simultaneously_ press multiple buttons in any order. I assume it was mentioned simply to clarify this for the sake of the math problem.

---

<div class="post-metadata">

**Author:** ![LawMonkey](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LawMonkey](https://boards.straightdope.com/u/LawMonkey)\
**Post date:** [December 3, 2008, 12:56am UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/15 "2008-12-03T00:56:07Z")

</div>

Thanks, guys. Ever since I realized that the order of buttons pushed was irrelevant, I suspected that the lock would be trivial to ‘pick’ by brute force. I just lacked the mathematical chops to prove it.

minor7flat5, what you’re describing is the classic Simplex lock. The box in my backyard is a variation on the basic concept–ten buttons instead of five; order of presses irrelevant; no meaningful ability to use multiple-button presses (while you could press {1 2} {3 4}, this would be no different than 1 2 3 4 or {1 2 3 4}, etc.).

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [December 3, 2008, 3:45am UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/16 "2008-12-03T03:45:14Z")

</div>

Wow, what a crappy lock!  
I like the 5 button ones because they allow chords, and presumably a better degree of security.

I looked up Kaba-Ilco’s Simplex locks and found only two models that have ten buttons, the LD 450 and the LD 470.

From the [manual](http://www.kaba-ilco.com/access_control/access_download.aspx?File=installation_instructions_ld_470.pdf&Attachment=True) (PDF):

> [@](#):
>
> Note: With the spare tumblers provided, you can either increase the num-  
> ber of digits in your code to 6-7, or reduce to 3-4.

So they limit the available keyspace even more by prohibiting low or high numbers of digits.

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [December 3, 2008, 4:02am UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/17 "2008-12-03T04:02:17Z")

</div>

> [@minor7flat5](#):
>
> I like the 5 button ones because they allow chords, and presumably a better degree of security.

Still not great, though. These were common around my undergraduate university, and with a team of two (one reading off possible combos, one punching them) you could attain a mean-time-to-entry of under ten minutes. If you had to do it yourself if was about a factor of two slower.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [December 3, 2008, 4:34am UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/18 "2008-12-03T04:34:36Z")

</div>

> [@Pasta](#):
>
> Still not great, though. These were common around my undergraduate university, and with a team of two (one reading off possible combos, one punching them) you could attain a mean-time-to-entry of under ten minutes. If you had to do it yourself if was about a factor of two slower.

Just (voice) record the combos on computer, stick it on your iPod, and there ya go. If you look online, you can find a list of all the combinations – there’s only 1,082 on a 5-button simplex lock.

---

<div class="post-metadata">

**Author:** ![prisoner6655321](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@prisoner6655321](https://boards.straightdope.com/u/prisoner6655321)\
**Post date:** [December 3, 2008, 5:38am UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/19 "2008-12-03T05:38:51Z")

</div>

> [@pulykamell](#):
>
> The problem with this answer is that you’re taking order into consideration. 10! is how many possible arrangements of 10 items there are, but the OP says that order is irrelevant, so you want the choose function (binomial coefficient). “N choose K” tells you how many k-element subsets there are in an n-element group. Hence, for a 10 digit code, there should be one possible combination (10 choose 10), since all the buttons will be pressed down, and the order in which we press them is irrelevant, not 10! combinations.

No no no. He’s not taking order into consideration by saying it’s 10_9_8_7_6_5_4_3_2_1. That would be 10_10_10_10\*10…etc.

The order doesn’t matter. It just means that the first number has 10 possibilities. The second number has 9 possibilites because the first one used one of them. The third number has 8 possibilities because the first and second ones used two of the 10. And so on down the line.

The first number could be any number. The second one could also be any number provided you do not know what any of the other numbers is. And the third number is the same. 10 possibilities. But as you start to figure out each digit the subsequent possibilities of the other digits decreases.

The order doesn’t matter. Whether it’s 10_9_8_7_6_5_4_3_2_1 or 6_5_4_3_2_1_10_9_8_7 it doesn’t matter. The product is the same: 3,628,800

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [December 3, 2008, 6:25am UTC](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353/20 "2008-12-03T06:25:11Z")

</div>

> [@prisoner6655321](#):
>
> No no no. He’s not taking order into consideration by saying it’s 10_9_8_7_6_5_4_3_2_1. That would be 10_10_10_10\*10…etc.

I’m not sure what you mean. 10_10_10 implies he can reuse number, doesn’t it?

If you have a 3-digit number, you have 3! posibilities of arranging them, or 6:

123  
132  
213  
231  
312  
321

If you have a 4-digit number, you have 4! possibilties, or 12, of arranging the numbers.

Ergo, if you have a 10-digit number, there’s 10! possibilities for arranging the digits. So, when he says “if you use all 10 numbers this is how many combinations there are,” that’s correct. That’s how many ways there are to arrange 10 numbers, in other words, where sequence is important. In our problem, though, all those cominations yield the same result: all numbers pressed down. Therefore, (10 choose 10), or one.

When he says 10_9_8\*…2 for a nine-digit combination, once again, he’s taking into account order. We want (10 choose 2), or 45.

Once again, see the 3 digit possibility:

Order unimportant: 12 23 13 (3 choose 2)  
Order important: 12 13 21 23 31 32 (3\*2)

So this is what I meant in my explanation.

Or am I misunderstanding you?

[Next page](https://boards.straightdope.com/t/how-hard-would-this-lock-be-to-pick/475353.md?page=2)
