1. Math Problem - Probability of Password Duplication

Hi All:
Can someone who knows math & probability theory better than me (this isn't hard
to
do :)!) tell me how to figure out how many possible passwords I can generate by
having the following parameters?

Password Length = 11 to 14 characters
Possible Password Content = each character can be any 1 of 89 different
characters.
Character Set = a-zA-Z1-9{}[]()^_`~:;<=>? at !#$%&'+,-./
Excluded Characters = 0|\"

My understanding is that it would be:

char14 = 89*89*89*89*89*89*89*89*89*89*89*89*89*89 -- (1.95641099e+027)
char11 = 89*89*89*89*89*89*89*89*89*89*89          -- (2.77517307e+021)

result = char14 - char11

Also, could anyone give me a small function that would generate a random
password
using this character set?

Thanks In Advance
Regards
Brian Keene


=====
Regards
Brian Keene

new topic     » topic index » view message » categorize

2. Re: Math Problem - Probability of Password Duplication

> Can someone who knows math & probability theory better than me (this isn't
hard to
> do :)!) tell me how to figure out how many possible passwords I can
generate by
> having the following parameters?
>
> Password Length = 11 to 14 characters
> Possible Password Content = each character can be any 1 of 89 different
> characters.
>
> char14 = 89*89*89*89*89*89*89*89*89*89*89*89*89*89 -- (1.95641099e+027)
> char11 = 89*89*89*89*89*89*89*89*89*89*89          -- (2.77517307e+021)
>
> result = char14 - char11

My first instinct is that you should probably add these. Your 11-character
passwords are unique from the 14-character passwords. You would also add the
12- and 13-character length password combinations.

> Also, could anyone give me a small function that would generate a random
password
> using this character set?

chars = { "...your valid character set... " }
for t=1 to passwordLength do
    password &= chars[rand(length(chars))]
end for

Something like that...
ck

new topic     » goto parent     » topic index » view message » categorize

3. Re: Math Problem - Probability of Password Duplication

> Hi All:
> Can someone who knows math & probability theory better than me (this isn't
> hard to
> do :)!) tell me how to figure out how many possible passwords I can generate
> by
> having the following parameters?

> Password Length = 11 to 14 characters
> Possible Password Content = each character can be any 1 of 89 different
> characters.
> Character Set = a-zA-Z1-9{}[]()^_`~:;<=>? at !#$%&'+,-./
> Excluded Characters = 0|\"

> My understanding is that it would be:

> char14 = 89*89*89*89*89*89*89*89*89*89*89*89*89*89 -- (1.95641099e+027)
> char11 = 89*89*89*89*89*89*89*89*89*89*89          -- (2.77517307e+021)

> result = char14 - char11

As far as I can see it would be:
result = power(89,11)+power(89,12)+power(89,13)+power(89,14)

> Also, could anyone give me a small function that would generate a random
> password
> using this character set?

constant PASSWORD_CHARS =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789{}[]()^_`~:;<=>? at
!#$%&'+,-./"
constant MIN_LENGTH = 11
constant MAX_LENGTH = 14
function GenPass()
  sequence pass
  pass = {}
  for i = 1 to rand(MAX_LENGTH - MIN_LENGTH + 1) + MIN_LENGTH - 1 do
      pass &= PASSWORD_CHARS[rand(length(PASSWORD_CHARS))]
  end for
  return pass
end function 
puts(1,GenPass())

> Thanks In Advance
> Regards
> Brian Keene


> =====
> Regards
> Brian Keene

Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.rat-software.com/
Please leave quoted text in place when replying

new topic     » goto parent     » topic index » view message » categorize

4. Re: Math Problem - Probability of Password Duplication

CK:
Sorry.  What I meant was that the passwords needed to be a minimum of 11 chars.
&
a maximum of 14 chars.  NOT that they would need to be 11 OR 14 chars long.  So
your function looks perfectly fine to me.  Thanks!

The only question my boss wants to know is how many possible unique passwords
can
this generate?  Is my formula correct or is my math wrong?  Which is quite
possible! :)

Regards
Brian Keene

--- "C. K. Lester" <cklester at yahoo.com> wrote:
> 
> > Can someone who knows math & probability theory better than me (this isn't
> hard to
> > do :)!) tell me how to figure out how many possible passwords I can
> generate by
> > having the following parameters?
> >
> > Password Length = 11 to 14 characters
> > Possible Password Content = each character can be any 1 of 89 different
> > characters.
> >
> > char14 = 89*89*89*89*89*89*89*89*89*89*89*89*89*89 -- (1.95641099e+027)
> > char11 = 89*89*89*89*89*89*89*89*89*89*89          -- (2.77517307e+021)
> >
> > result = char14 - char11
> 
> My first instinct is that you should probably add these. Your 11-character
> passwords are unique from the 14-character passwords. You would also add the
> 12- and 13-character length password combinations.
> 
> > Also, could anyone give me a small function that would generate a random
> password
> > using this character set?
> 
> chars = { "...your valid character set... " }
> for t=1 to passwordLength do
>     password &= chars[rand(length(chars))]
> end for
> 
> Something like that...
> ck
> 
> 
> 


=====
Regards
Brian Keene

new topic     » goto parent     » topic index » view message » categorize

5. Re: Math Problem - Probability of Password Duplication


new topic     » goto parent     » topic index » view message » categorize

6. Re: Math Problem - Probability of Password Duplication

Brian Keene wrote:

> Hi All:
> Can someone who knows math & probability theory better than me (this isn't
hard to
> do :)!) tell me how to figure out how many possible passwords I can
generate by
> having the following parameters?
>
> Password Length = 11 to 14 characters
> Possible Password Content = each character can be any 1 of 89 different
> characters.
> Character Set = a-zA-Z1-9{}[]()^_`~:;<=>? at !#$%&'+,-./
> Excluded Characters = 0|\"
>
> My understanding is that it would be:
>
> char14 = 89*89*89*89*89*89*89*89*89*89*89*89*89*89 -- (1.95641099e+027)
> char11 = 89*89*89*89*89*89*89*89*89*89*89          -- (2.77517307e+021)
>
> result = char14 - char11

result = char14 + char13 + char12 + char11
       = power(89,14)+power(89,13)+power(89,12)+power(89,11)

...since all groups are mutually exclusive.

Here's what makes 'char14 - char11' seem logical (both of these are also the
right answer):

result = (char15 - char11)/88
       = (power(89,15)-power(89,11))/(89-1)

As for the function:

constant validChars="abc..xyzABC..XYZ..etc"

function password()
   sequence p
   integer len
   len = length(validChars)
   p = {}
   for i = 1 to 10+rand(4) -- 11..14
       p &= validChars[rand(len)]
   end for
   return p
end function

Carl

new topic     » goto parent     » topic index » view message » categorize

7. Re: Math Problem - Probability of Password Duplication

> The only question my boss wants to know is how many possible unique
passwords can
> this generate?

Thomas answered this one thusly, and I think it's correct:

> As far as I can see it would be:
> result = power(89,11)+power(89,12)+power(89,13)+power(89,14)

That comes to 1,978,642,898,134,390,000,000,000,000, according to MS Excel.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Math Problem - Probability of Password Duplication

CK Lester wrote:

> > As far as I can see it would be:
> > result = power(89,11)+power(89,12)+power(89,13)+power(89,14)
>
> That comes to 1,978,642,898,134,390,000,000,000,000, according to MS
Excel.

bc under linux says 1,978,642,898,134,388,772,961,847,220, but Euphoria only
matches Excel in this regard. sad

Carl

new topic     » goto parent     » topic index » view message » categorize

9. Re: Math Problem - Probability of Password Duplication

> > > As far as I can see it would be:
> > > result = power(89,11)+power(89,12)+power(89,13)+power(89,14)
> >
> > That comes to 1,978,642,898,134,390,000,000,000,000, according to MS
> Excel.
>
> bc under linux says 1,978,642,898,134,388,772,961,847,220, but Euphoria
only
> matches Excel in this regard. sad

I'm not surprised. Windows and Excel are the Behemoth's products...

I just did a test using 89^11 with the standard Windows calculator, and it
comes out more precise than Excel!!

    2,775,173,073,766,990,340,489 vs. 2,775,173,073,766,990,000,000

MS = Massive Stupidity?
MS = Mathematical Simpletons

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu