• Support PF! Buy your school textbooks, materials and every day products Here!

Probability of Opening a Pushbutton Lock

  • Thread starter noreturn2
  • Start date
  • #1
25
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:

Answers and Replies

  • #2
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
15,921
5,618

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?
 
  • #3
25
0
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)
 
  • #4
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
12,408
5,169

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.
 
  • #5
25
0
Would it just be 10/252 then? Then is part A right?
 
  • #6
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
12,408
5,169
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!
 
  • #7
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
15,921
5,618
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.
 
  • #8
25
0
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 dont know hwo to set it up using that formula
a(a-r^n)/1-r
n=10
r=?
 
  • #9
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
12,408
5,169
Could do a geometric series right. So:
1/252+1/251+1/250 +1/249.... 1/242

Just dont 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
25
0
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
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
12,408
5,169
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
25
0
Good, so keep going from there.
How can I set this up with the formula?
 
  • #13
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,259
975
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 .
 
  • #14
25
0
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
verty
Homework Helper
2,164
198
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
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
12,408
5,169
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
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,259
975
In your case you would be subtracting them, which would be arthemtic.
No, don't subtract them as a group.
 
  • #18
25
0
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
verty
Homework Helper
2,164
198
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
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
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.
 

Related Threads on Probability of Opening a Pushbutton Lock

  • Last Post
Replies
2
Views
2K
Replies
3
Views
3K
  • Last Post
Replies
3
Views
3K
Replies
5
Views
7K
  • Last Post
Replies
6
Views
5K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
22
Views
5K
Replies
1
Views
2K
Top