Skip to Content.
Sympa Menu

internetworkers - Re: [internetworkers] Math Problem

internetworkers AT lists.ibiblio.org

Subject: Internetworkers: http://www.ibiblio.org/internetworkers/

List archive

Chronological Thread  
  • From: "Alan MacHett" <machett AT ibiblio.org>
  • To: internetworkers AT lists.ibiblio.org
  • Subject: Re: [internetworkers] Math Problem
  • Date: Fri, 25 Feb 2005 23:25:25 -0500 (EST)

Greg, Ian,

You're AWESOME! Thanks!

I'd already used Google's calculator ability to find for N=26:
http://tinyurl.com/72ybu ==> A = 6.40236436 × 10^36
(much larger than N! for N=26 == 4.03291461 × 10^26)**

but doing so would've been a drag for N=95: 7.73282629 × 10^187

** N-factorial (N!) wasn't the answer. The problem with it, in my usage,
is that it assumes [1]that every space of N spaces will contain a
character (such that if you have an 8-character limit on your password, N!
assumes that your password is 8 characters long; but my query assumes a
password of 1-8 characters long (in this example)) and ([2]that no
character repeats in any given sequence (again, a useless assumption for
passwords; N! assumes that a sequence such as 88888888 is not used).

So!, assuming use of the 95 non-control characters of a standard English
keyboard, what would be the formula to calculate the number of possible
combinations for a password allowed N characters long (remember the
password *could* be 1-N characters long in actuality). Is it as simple as
95^N??

-Alan

In reference to Greg's and Ian's messages:
>> -- the number of unique combinations of N
>> characters up to a sequence of N characters. for example, for 3 the
>> answer is 39:
>> 3 + 3^2 + 3^3 = 3 + 9 + 27 = 39
>> because the unique combinations are A, B, C, AA, ...CC, AAA, ...CCC
>
> X characters, strings of max N length, A = answer.
>
>
> A = X + X^2 + X^3 + .... + X^(N-1) + X^N
>
> XA = X^2 + X^3 + .... + X^(N-1) + X^N + X^(N+1)
>
> XA - A = X^(N+1) - X
>
> A(X-1) = X^(N+1) - X
>
> A = (X^(N+1) - X) / (X-1)
>
>
>> Ian Meyer's message:
> you can do this...
>
> where the <'s form a sigma
>
> N
> < N^n
> <
> n=1
>
> which would add up N^1 + N^2 + ... + N^n
>
> since N is the limit of n, N^n = N^N
>
> so you could then drop that into, say, maple, with something like
> sum('N^n','n'=1..N)
>
> to get an answer
>
> hth
> ian
>





Archive powered by MHonArc 2.6.24.

Top of Page