What is the combination probability?

P(LNNNN) = 1/3 x 4/10 x 3/9 x 2/8 x 1/7 = 24/15120
P(NLNNN) = same as above
P(NNLNN) = same as above
P(NNNLN) = same as above
P(NNNNL) = same as above

120/15120

1/126 is my immediate guess
 
If each button is only used once and there are 13 labelled buttons, with five buttons in the code and the order doesn't matter, isn't the odds simply 5/13?

No, this is simply the chance of guessing the first one correctly, that's it.
 
Does the combination have to be 4 numbers and 1 letter, or can it be 3 numbers and 2 letters. Or does it even need to be 5 digits long?

Does the "attacker" know the sequence?

Makes a massive difference to the brute force ease.
 
Put a tiny dot in wipe marker on each key, the next time someone presses the keys you will see what the buttons are :) tbh those locks are not up to much, if you managed to pull the door with some force it might just open by forcing the latch to release.
 
I'll give it a go on Wednesday, there are 6 doors to go at on our floor at work

We've got about a dozen of them in my workplace. Maybe more. All the same model, though. The C is solely a reset on that model and does nothing unless another button has been pressed and the lock has not been opened. C is always included in any instructions and whenever anyone is told any of the codes, so it's routinely assumed to be necessary. That's an "in case" measure, though, to cut down on potential hassle:

"Bob, what's the code for the zebra sex mask storeroom?"
"18698"
"Thanks"

Walks to zebra sex mask storeroom, enters 18698 and it doesn't work because, for example, someone happened to press one of the buttons with their shoulder while taking a box of zebra sex masks out of the storeroom.

"Bob...18698 didn't work"

Both the person asking and Bob almost certainly have other things to be doing. Codes that don't work? Ain't nobody got time for that. Saying that the code is "C18698" heads off the potential problem before it exists.
 
Surely this is:

1/10 x 1/9 X 1/8 x 1/7 x 1/3
[...]

So 10x9x8x7x3 = 15,120 : 1 chance of guessing correctly.

Nope, see this post and the one's quoted:

https://forums.overclockers.co.uk/posts/35126294/

Also, you can't just quote a probability as odds like that, odds are not probabilities.

For example, rolling a given number on a 6 sided die has a 1/6 chance, the odds of rolling that given number are 1:5

4/11 x 3/10 x 2/9 x 1/8 = whatever that is
or
5/11 x 4/10 x 3/9 x 2/8 x 1/7 = need more coffee

Nearly there but the numbers you're choosing are 4 out of 10 then 3 out of 9 and so on...

P(LNNNN) = 1/3 x 4/10 x 3/9 x 2/8 x 1/7 = 24/15120
P(NLNNN) = same as above
P(NNLNN) = same as above
P(NNNLN) = same as above
P(NNNNL) = same as above

120/15120

1/126 is my immediate guess

Nah, you had it in the first line! The order doesn't matter, we know there are 4 digits and 1 letter required in any order, ergo you also don't need to look at the possibilities of pressing more than one letter etc...
 
So are you saying when it's opened it resets?

The model of lock used in my workplace does, yes. I suspect most if not all of them work that way. We're talking mass-produced low security products manufactured to the lowest possible cost. I doubt if there's much variation or innovation. Those things cost money.

You might find it interesting to check out the lockpicking lawyer's channel on Youtube. I'm not into lockpicking, but they do a fine job of making it interesting. Part of that is the enjoyment of seeing a job done well - they're very skilled at lockpicking - and part of it is learning how low the security level is on most locks. I vaguely recall a saying along the lines of "locks keep honest people honest". Not entirely true, of course. Even a little security will put off unskilled thieves, which is most thieves. If my bike's locked with even a low security lock and your bike isn't locked, most bike theives will steal your bike instead of mine.

There's a well-watched video on their channel about a bike lock. Someone sent them a parcel and a letter. The letter explained the situation - the person had a very good (and very expensive) bike lock and had lost the key they had on them. They would have preferred to have the lock picked so they could continue to use it (with the other key they had, at home) but the locksmith they called out said the lock couldn't be picked and the only solution was to use a grinder to cut the lock off. The locksmith was rather irritated by the claim that the lock was pickable and the situation ended up with the locksmith telling the customer that they'd refund their fee if the lockpicking lawyer could pick that lock faster than the time it had taken the locksmith to cut it off. Challenge accepted. The lockpicking lawyer was very polite about the locksmith. It was a very good lock and picking it required specialised tools and knowledge, things that most locksmiths wouldn't have for every possible lock. Then they picked the lock on camera in less than a tenth of the time it had taken the locksmith to cut it off with a grinder.

Maybe my interest is related to my own experience with a very skilled locksmith. I'd left my house keys at work one day. They were secure, so all I needed was a way into my home that night. I'd pick the keys up the next day, job done. So I called a locksmith out. Not cheap at ~2300, but probably cheaper and definitely more convenient than smashing a window and hiring someone to reglaze it. 10 minutes later a van pulls up with the company name on it. I glanced at my watch, as you do when someone you've hired arrives, so I knew the exact time. I saw the locksmith look at the lock on the front door of my house, select a tool from their kit, get out the van, say hello and open my front door. 26 seconds from getting out the van to standing in my front room saying "If I was you, I'd get a better lock". Not the slightest damage to anything, not even a scratch on the lock. Which the locksmith considered so bad at the job of being a lock that they wouldn't even dignify it with the name "lock". I got a better lock.

I can't wait until Wednesday to try this out, I'm going in for my booster + flu jab.

I should get around to arranging my flu jab. Pharmacists won't do it because I'm allergic to latex, so I have to play phone lottery with my doctor's surgery. I'd far rather go to a pharmacist and pay a small fee to have it done. £15 a year? Bargain for the convenience.
 
Nah, you had it in the first line! The order doesn't matter, we know there are 4 digits and 1 letter required in any order, ergo you also don't need to look at the possibilities of pressing more than one letter etc...

What is the correct answer then? I'm confused.

Five characters [four numbers + one letter], any order, no repetitions.
 
It's easier to think about whether you are right with each key press.

1. First guess is 4 numbers out of 10 possible.
2. Second is 3 numbers out of 9 possible.
3. Third is 2 numbers out of 8 possible.
4. Fourth is 1 number out of 7 possible.
5. Fifth is 1 letter out of 3 possible.

Which gives:

4/10 x 3/9 x 2/8 x 1/7 x 1/3 = 0.16%.

FYI - the result is the same if you change where the letter is in the equation.

If my vague memories of A level maths is right.
Is this assuming each number is different?
 
Normally the answer would simple to get, a 1 letter password purely from the the alphabet is 26^1 or 26 possible answers

Here would 13^5 or 371,293 possible answers but the unique factor changes it, they'll be a set answer to this question on google somewhere. I should already know it but its been a couple decades, it'll be far less then 300k.

Adam might be right but 13 to power of 2 is 169. It'd take someone who deals with probabilities or teaches about 30 seconds to catogorise and answer this I guess.
 
Last edited:
Normally the answer would simple to get, a 1 letter password purely from the the alphabet is 26^1 or 26 possible answers

Here would 13^5 or 371,293 possible answers but the unique factor changes it, they'll be a set answer to this question on google somewhere.

Yup, if you could reuse the number and digits and were just typing any number of numbers/digits then you'd have 13*13*13*13*13 possible ways of doing so as you've pointed out.

The bit you've perhaps forgotten from decades ago at school is permutations and combinations.

Firstly we're not just typing digits at random, if they're not being replaced then first perhaps think about how many ways you can choose all those digits:

10 * 9 * 8 * 7 * 6 * 5* 4 * 3 * 2 * 1 (this can be written as simply 10!)

But say you're only interested in 4 digits (as we are in this problem) then you don't need the 6 * 5 * 4 * 3 * 2 * 1 (this can also be written as 6!)

we just want 10*9*8*7

10 * 9 * 8 * 7 * 6 * 5* 4 * 3 * 2 * 1
-- ----------------------------------------
6 * 5 * 4 * 3 * 2 * 1

the above could be written as 10!/6!

essentially it is 10! / (10 - 4)! as in we just want those first 4 terms of 10! i.e. 10*9*8*7

denote the number of things we have as n and number of things we're selecting as r and we now have a little formula to calculate the possible permutations:

n!
----
(n-r)!

most calculators you'd use in school etc.. have a little button for for that formula nPr

but we don't want permutations here, the above assumes the order is important (it might be in a digital lock but not in this case) we want the number of combinations, that is the digits selected in any order

we know that the above permutations include multiple "correct" results in a different order, if we're choosing 4 numbers then it in fact includes 4*3*2*1 versions of the correct result or 4!, written in different orders, so we can simply adjust our formula, we want to divide by r! so we now have:

n!
----
r!(n-r)!

this is what the nCr button does on your calculator

If you know that then the whole question can be solved in one line on your calculator, we want to choose 4 digits, any order, without replacement and then 1 of 3 possible letters, so we have:

EkYwMCu.jpg
 
Last edited:
UNBELIEVABLE

Today I have gone through our landing door twice without pressing C
I can't believe how much time I've wasted over the years.
 
Back
Top Bottom