Sunday, February 7, 2010

Formula To Find All Possible Digit Combinations Possible Password Combinations?

Possible password combinations? - formula to find all possible digit combinations

Hello,

I want a formula to tell me all the possible combinations for a password for multiple lengths. For example, if I were a 4-digit number that contains the numbers 0-9 on the formula, something like 10 ^ 4. Now we say the password can be 1 to 4 digits. The formula that I thought was:
10 ^ 1 + 10 ^ 2 + 10 ^ 3 + 10 ^ 4
This formula works very well for a four-digit number, but if the password can be up to 65 characters long, it becomes very difficult. Has anyone an idea?

2 comments:

Ricky Jones said...

Any idea on the ground, I mean, if you let the number of different characters in all rated C and the total possible password L. While the total number of combinations:

C ^ ^ 1 + C 2 + C ^ 3 + .... + C ^ L.

What will be great.

JCS said...

Note that the closed form has become the sum of a geometric progression of a generic name:

Σ [k = 0 k to n] (a ^) = (a ^ (n + 1) - 1) / (a - 1)

And with a slight modification:

Σ [k = 1, n] (a ^ k) = (a ^ (n + 1) - a) / (a - 1) =

A = (a ^ n - 1) / (a - 1)

Therefore, the number of passwords with a length ≥ 1 and ≤ n-base number (leaving a 10 =) is:

a (a ^ n - 1) / (a - 1)

And the number of people with a length ≥ 1 and ≤ m:

Length ≥ 1 and ≤ m

Then, if n> m is the number of passwords with a length and m ≥ ≤:

a (a ^ n - 1) / (a - 1) - a (a ^ (m - 1) - 1) / (a - 1) =

= [A / (a - 1)] [Y ^ - a ^ (m - 1)]

Post a Comment