9-Digit Combination Lock Chances And Probability
I have been thinking on combination locks recently, and would like some help with this particular problem.
Problem:
I have a lock with digits 1-9, and the length of the combination is 4 digits. You cannot press the digits 1-9 more than once, and the combination does not have to be typed in any particular order.
Questions:
- Is it true, then, that the possible amount of combinations is 3,024, because 9*8*7*6=3,024?
- Is it also true that 24 of the combinations are correct, since you do not have to type the combination in any particular order? Therefore 1*2*3*4=24.
- Is it true that the chances of guessing it right are 1 in 125 since 3,000/24=125?
Addendum questions:
- If you would change the lock to have a 5 digit combination, would the chance to guess it right be the same as if it were a 4 digit combination? Since the possible combination amount is 15,120 (9*8*7*6*5), the amount of right combinations is 120 (1*2*3*4*5), therefore 15,000/120=125. The same amount of chance as if it were a 4-digit combination?
- If all this is true, then wouldn't a 6-digit combination actually be less secure? I.e., you have a greater chance of guessing the right combination? (1 in 84, if I am doing it right.)
Help is greatly appreciated. I have not done probability in a long time and am wondering if I am even doing it right.
Thanks, guys.
Fatal Sylence
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
FatalSylence
[/B]I have a lock with digits 1-9, and the length of the combination is 4 digits.
You cannot press the digits 1-9 more than once, and the combination
does not have to be typed in any particular order.
Questions: - Is it true, then, that the possible amount of combinations is 3,024, because 9*8*7*6=3,024?
- Is it also true that 24 of the combinations are correct, since you do not have to type the combination in any particular order? Therefore 1*2*3*4=24.
- Is it true that the chances of guessing it right are 1 in 125 since 3,000/24=125?
If order makes a difference then the answer is
.
If order makes no difference then 
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
Plato
If
order makes a difference then the answer is

.
If
order makes no difference then

I'm not sure I understand your answer. 126 as in a 1 in 126 chance of guessing it right?
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
FatalSylence
I'm not sure I understand your answer. 126 as in a 1 in 126 chance of guessing it right?
That is the combination of 9 things taken 4 at a time.
By the way that is
.
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
Plato
That is the combination of 9 things taken 4 at a time.
By the way that is

.
Hmm, okay. Can you direct me towards a resource that explains the "n things taken r at a time"?
Also, were my other questions correct?
Finally, would a 5 digit combination be more secure? A 4 digit combination has the same chance to guess right as a a 5-digit combination, but don't you have a greater chance to guess it wrongwith 5-digits?
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
FatalSylence
Hmm, okay. Can you direct me towards a resource that explains the "n things taken r at a time"?
Also, were my other questions correct?
Finally, would a 5 digit combination be more secure? A 4 digit combination has the same chance to guess right as a a 5-digit combination, but don't you have a greater chance to guess it wrongwith 5-digits?
Look at this page.
Also look at this page. You change those numbers and hit
.
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
Plato
Can you explain to me if in a 4-digit combination, the amount of correct combinations is 126, or 24 like I originally thought? I'm just trying to understand this here.
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
FatalSylence
Can you explain to me if in a 4-digit combination, the amount of correct combinations are 126, or 24 like I originally thought? I'm just trying to understand this here.
I think that we are talking about two different ideas here.
There are 24 ways to arrange the string
.
But there are 126 ways to select a set of four from
.
One of those 126 sets is
.
Then the numbers in that set can be arranged in 24 ways.
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
Plato
I think that we are talking about two different ideas here.
There are 24 ways to arrange the string

.
But there are 126 ways to select a set of four from

.
One of those 126 sets is

.
Then the numbers in that set can be arranged in 24 ways.
OH!!! Gosh! I get it! It does not matter how many ways you can arrange a set of four since order does not matter. I understand. One of these 126 sets encompasses all the ways you can arrange it since order does not matter.
So, if the person was good at math, they would realize that since order does not matter, there are only 126 possible combinations. Wow, I get it. Thank you.
EDIT: Is there a formula or calculator that can display all the possible sets for a 1-9, 4 digit combination? Or any other numbers for that matter?
Re: 9-Digit Combination Lock Chances And Probability
Quote:
Originally Posted by
FatalSylence
EDIT:[/B] Is there a formula or calculator that can display all the possible sets for a 1-9, 4 digit combination? Or any other numbers for that matter?
The good news is that this is a simple programming problem.
But the bad news I doubt that you can easily find it on the web.
I suggest that you discuss this with a friend who does programming.