Probability of Opening a Pushbutton Lock

  • Thread starter Thread starter noreturn2
  • Start date Start date
  • Tags Tags
    Lock Probability
AI Thread Summary
The discussion centers on calculating the probability of opening a pushbutton lock with a 5-digit password using numbers 0-9, where repeats are not allowed and order does not matter. The correct calculation for guessing the password is determined to be 1/252, which equates to approximately 0.00397. For the probability of opening the lock in less than 10 tries, participants explore various approaches, including geometric series and conditional probabilities, but find that the initial methods were incorrect. The conversation highlights the need to rethink the calculations for part B, emphasizing the importance of understanding the probabilities of successive attempts. Overall, the thread illustrates the complexities of combinatorial probability in a practical scenario.
noreturn2
Messages
25
Reaction score
0

Homework Statement


A password has numbers 0-9 in it. The password is 5 digits, repeats are not allowed, and order doesn't matter (I just have to have the correct 5 digit buttons depressed).

A. If I guess at the password, what is the probability that the box will open?

B. If I have completely forgotten the password, what is the probability that it will take less than 10 tries to get it open?

Show your work and/or explain your process.

Homework Equations


Combination

The Attempt at a Solution


10C5 = 252
1/252 = .003 The chances of guessing the code (This seems to low how the order doesn't matter of the numbers as long as they are pushed right)

(1/252)+(1/251)+(1/250)...(1/1/242) =.04% (Also seems to low)

I thought maybe I need to do 5x10/252 because order doesn't matter and there 5 digits and 10 numbers to choose from.
 
Last edited by a moderator:
Physics news on Phys.org
noreturn2 said:

The Attempt at a Solution


10C5 = 252
I don't see how you get that. Forget trying to use formulae, just think of it this way: how may ways can you fill the first position? Having done that, how many ways can you fill the second position? Keep going and what do you get?
 
phinds said:
I don't see how you get that. Forget trying to use formulae, just think of it this way: how may ways can you fill the first position? Having done that, how many ways can you fill the second position? Keep going and what do you get?
10 Digits chose 5
10!/(5!(10-5)!)= 252

I thought of it as 10*9*8*7*6=30240
5^10=9765625 ways to choose numbers ( this doesn't account for repeats not being allowed)
 
noreturn2 said:

Homework Statement


A password has numbers 0-9 in it. The password is 5 digits, repeats are not allowed, and order doesn't matter (I just have to have the correct 5 digit buttons depressed).

A. If I guess at the password, what is the probability that the box will open?

B. If I have completely forgotten the password, what is the probability that it will take less than 10 tries to get it open?

Show your work and/or explain your process.

Homework Equations


Combination

The Attempt at a Solution


10C5 = 252
1/252 = .003 The chances of guessing the code (This seems to low how the order doesn't matter of the numbers as long as they are pushed right)

(1/252)+(1/251)+(1/250)...(1/1/242) =.04% (Also seems to low)

I thought maybe I need to do 5x10/252 because order doesn't matter and there 5 digits and 10 numbers to choose from.

It's a funny sort of lock if the order doesn't matter! Yes, 10C5 is correct.

Your method for part b) is not correct. Imagine there were only two options and you had two choices. You would definitely get it right it two attempts. But not with your method of calculation.
 
Would it just be 10/252 then? Then is part A right?
 
noreturn2 said:
Would it just be 10/252 then? Then is part A right?

Yes, part A is right. You have to rethink part B. 10/252 is an approximation, but not exact. Although, less than 10 attempts means only 9 attempts in my book!
 
noreturn2 said:
I thought of it as 10*9*8*7*6=30240
Yeah, that's what I was getting but I see now that that is the answer to a different question than the one asked.
 
PeroK said:
Yes, part A is right. You have to rethink part B. 10/252 is an approximation, but not exact. Although, less than 10 attempts means only 9 attempts in my book!

Could do a geometric series right. So:
1/252+1/251+1/250 +1/249... 1/242

Just don't know hwo to set it up using that formula
a(a-r^n)/1-r
n=10
r=?
 
noreturn2 said:
Could do a geometric series right. So:
1/252+1/251+1/250 +1/249... 1/242

Just don't know hwo to set it up using that formula
a(a-r^n)/1-r
n=10
r=?

Okay, a big hint. What about the probability of not guessing it in 9 attempts?
 
  • #10
251/252 is not guessing the right number

250/251 would be not guessing the 2nd time (since we have one less guess made)
 
  • #11
noreturn2 said:
251/252 is not guessing the right number

250/251 would be not guessing the 2nd time (since we have one less guess made)

Good, so keep going from there.
 
  • #12
PeroK said:
Good, so keep going from there.

How can I set this up with the formula?
 
  • #13
noreturn2 said:
How can I set this up with the formula?
Keep going a little further.

What do you do with 251/251, 250/251, 249/250, etc. ?

By the way, 1/252 ≈ 0.00397 .
 
  • Like
Likes PeroK
  • #14
SammyS said:
Keep going a little further.

What do you do with 251/251, 250/251, 249/250, etc. ?

By the way, 1/252 ≈ 0.00397 .

In your case you would be subtracting them, which would be arthemtic.
 
  • #15
noreturn2 said:
How can I set this up with the formula?

I'll show you one possibility. Instead of 10 tries, let's imagine it's 2 tries.

There is ##{1 \over 252}## chance I get it on my first go and ##{251 \over 252} \cdot {1 \over 251}## chance I get it on the second go. Does that makes sense? See if you can take this idea further.
 
  • #16
noreturn2 said:
In your case you would be subtracting them, which would be arthemtic.

We're all giving you ideas, but if you note we are leaving some thinking to you!
 
  • #17
noreturn2 said:
In your case you would be subtracting them, which would be arthemtic.
No, don't subtract them as a group.
 
  • #18
verty said:
I'll show you one possibility. Instead of 10 tries, let's imagine it's 2 tries.

There is ##{1 \over 252}## chance I get it on my first go and ##{251 \over 252} \cdot {1 \over 251}## chance I get it on the second go. Does that makes sense? See if you can take this idea further.

Alright I remember this!

So :
1: 1/252
2: 1/252 * 251/252
3: 1/252 * 251/252 * 250/251
4: 1/252 * 251/252 * 250/251 * 249/250...

Geometric:
(1/252)/(1-(1/252)) = still get .003 tho :(
 
  • #19
noreturn2 said:
Alright I remember this!

So :
1: 1/252
2: 1/252 * 251/252
3: 1/252 * 251/252 * 250/251
4: 1/252 * 251/252 * 250/251 * 249/250...

Geometric:
(1/252)/(1-(1/252)) = still get .003 tho :(

Some of the time, I get it right on the first go. This is a frequency of ##{1 \over 252}##. Some of the time I don't, and some of that time I get it on my second go. That is a frequency of ##{251 \over 252} \cdot {1 \over 251}##. I can't explain this any better. I hope it helps but otherwise I'm sorry I couldn't be more helpful.
 
  • #20
noreturn2 said:
Alright I remember this!

So :
1: 1/252
2: 1/252 * 251/252
3: 1/252 * 251/252 * 250/251
4: 1/252 * 251/252 * 250/251 * 249/250...

Geometric:
(1/252)/(1-(1/252)) = still get .003 tho :(

Your computations are wrong. Let the events be ##S_n=## succeed on draw ##n## and ##F_n = ## fail on draw ##n##.
$$\begin{array}{ll} P(S_1) = \frac{1}{252}, &P(F_1) = \frac{251}{252} \\
P(S_2|F_1) = \frac{1}{251}, & P(F_2|F_1) = \frac{250}{251}\\
P(S_3|F_1 \cap F_2) = \frac{1}{250},&P(F_3|F_1 \cap F_2) = \frac{249}{250} \\
\vdots & \vdots
\end{array}$$ Thus,
$$P(F_1 \cap F_2) = \frac{251}{252} \cdot \frac{250}{251} = \frac{250}{252}.$$
Similarly, ##P(F_1 \cap F_2 \cap F_3) = 249/252, ## etc.
 
Back
Top