Algebra (1 Viewer)

Dick7Access

Dick S
Local time
Today, 18:51
Joined
Jun 9, 2009
Messages
4,201
I want to figure how many possibilities there are for any set of numbers. such as with 1, 2, 3, 4, 5 how many different pass words could be made. A friend sent me this formula but I don't know any algebra.


Can anybody break it down for me in non-algebra terms. Where would the 1, 2, 3, 4, 5 go and what divides or multiples what?
 

Cronk

Registered User.
Local time
Tomorrow, 08:51
Joined
Jul 4, 2013
Messages
2,772
You have to be more precise. Do all the digits have to be used to make so many 5 digit combinations? Can the digits be repeated and can the length of the password be less than 5, or more than 5 and if the latter what is the maximum length?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:51
Joined
Feb 28, 2001
Messages
27,178
OK, Dick....

The Combinatorial function is C(n,r) = n! / ( r! * ( ( n - r )! )

In this formula, you have n = number of possible elements and r = number of elements you will select from the list.

Couple of simple cases: First, how many combinations of 5 numbers taken 5 at a time?

Well, n is 5, so n! = 120 (= 5*4*3*2*1), r = 5, so that is ALSO 120. And (n - r) = 0. As it happens, 0! = 1. So based on the combinatorial analysis, you have ... 1 combination ( 120 / ( 120 * 1 ) )

Your friend gave you the wrong formula. That formula is for the possible number of combinations of something where ORDER DOES NOT MATTER and NO REPETITIONS are allowed. Neither of those is appropriate for passwords. Look over this article instead.

https://www.mathsisfun.com/combinatorics/combinations-permutations.html

In this linked article, you get FOUR formulas, but it is clear when to use each one. The four formulas are just after the sub-header "In Conclusion."
The differences are whether you can re-use one of the digits and whether the order of digits matters.

Now, simple case: You want to make a PIN (personal ID number) out of only digits. OK, 10 digits = 0, 1, ..., 8, 9. You want it to be a 4-digit PIN.

For this, N = 10, R = 4. The formula for R elements from a possible set of 10 elements, where order matters and repetition can occur, is N^R or in this case, 10^4 = 10000 possible PINs. For limits with the digits 1, 2, 3, 4, 5 and a 5-digit PIN, you would get 3125 possible combinations.
 

Dick7Access

Dick S
Local time
Today, 18:51
Joined
Jun 9, 2009
Messages
4,201
OK, Dick....

The Combinatorial function is C(n,r) = n! / ( r! * ( ( n - r )! )

In this formula, you have n = number of possible elements and r = number of elements you will select from the list.

Couple of simple cases: First, how many combinations of 5 numbers taken 5 at a time?

Well, n is 5, so n! = 120 (= 5*4*3*2*1), r = 5, so that is ALSO 120. And (n - r) = 0. As it happens, 0! = 1. So based on the combinatorial analysis, you have ... 1 combination ( 120 / ( 120 * 1 ) )

Your friend gave you the wrong formula. That formula is for the possible number of combinations of something where ORDER DOES NOT MATTER and NO REPETITIONS are allowed. Neither of those is appropriate for passwords. Look over this article instead.

https://www.mathsisfun.com/combinatorics/combinations-permutations.html

In this linked article, you get FOUR formulas, but it is clear when to use each one. The four formulas are just after the sub-header "In Conclusion."
The differences are whether you can re-use one of the digits and whether the order of digits matters.

Now, simple case: You want to make a PIN (personal ID number) out of only digits. OK, 10 digits = 0, 1, ..., 8, 9. You want it to be a 4-digit PIN.

For this, N = 10, R = 4. The formula for R elements from a possible set of 10 elements, where order matters and repetition can occur, is N^R or in this case, 10^4 = 10000 possible PINs. For limits with the digits 1, 2, 3, 4, 5 and a 5-digit PIN, you would get 3125 possible combinations.
Thanks
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:51
Joined
Feb 28, 2001
Messages
27,178
This IS the Watercooler, so I will respond. Outside of the Watercooler, it would be hijacking a thread.

@arnelgp - the equation Dick7Access was given was not the answer to his question. He has an answer now and a relatively decent article that explains the answer. (Not my explanation - it is the linked article that is decent and clear.)

The equation given to Dick was the "combinations when order doesn't matter but no duplication is allowed" formula - which isn't a password situation. Dick DID ask - or at least imply - that passwords might be involved.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:51
Joined
May 7, 2009
Messages
19,237
i don't see any difference on your answer in #3 and the portion of book in #1.
while your interpretation is same as in the book.
you are All knowing maybe you should write a book or teach algebra.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:51
Joined
Feb 28, 2001
Messages
27,178
Arnel, I am truly sorry that you don't see the difference, but I actually DO see a difference. This is something I had to understand in my computer classes AND in my probability classes for my advanced degree - because I had to know how to use varioius kinds of statistics to interpret my experiments. Then it came up again in passing while studying encryption for my security certificates for the Navy job.

The equation that Dick was given, if solved for a grouping of 5 digits taken from a group of 5 choices, said that only ONE combination was possible. That is the right answer for the equation he was given but the wrong answer for the case of building passwords.

I would hope we can avoid a nasty-gram match, though. I have never claimed to be all-knowing or all seeing. I just happen to know the different kinds of permutations and combinations that there are and how to characterize them. Dick was given a formula for "no duplication of digits and order doesn't matter." Passwords on the other hand DO care about order but DON'T care about duplication of digits. It makes a difference. I'm sorry you don't see that.
 

Cronk

Registered User.
Local time
Tomorrow, 08:51
Joined
Jul 4, 2013
Messages
2,772
@DocMan "I actually DO see a difference."

OP "for any set of numbers. such as with 1, 2, 3, 4, 5 how many different pass words could be made."

That does not exclude 1, 11, 111, 1111, 11111, .... Without further qualification, there is infinite number of passwords that could be generated.

OTOH, using 1,2,3,4,5 to generate passwords of 5 digit length, using each only once has an answer of 120
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:51
Joined
Feb 28, 2001
Messages
27,178
Of COURSE you have different choices. My point in this has always been that the answer depends on the rules. The answer that Dick was given by the person who gave him that formula, however, was ONE. Not 120 or some other number. ONE. If there is ANY controversy at all, it is that the formula he was given by that non-forum person was inappropriate to the question that he asked. The formula he was given was the "ORDER IS NOT IMPORTANT" formula - but for passwords, order IS important. I can't say that any clearer.
 

Users who are viewing this thread

Top Bottom