You are not logged in.
Pages: 1
Thanks "pi man". You were correct in assuming I meant characters
"UP TO" n. Sorry about the ambiguity in my explanation.
I was trying to come to some solution with just three terms. I never
thought of using summation notation.
Yes, "technically" I should have the null set. But filenames don't
have 0 characters. So your solution models it fine, if I change it to
start at 1 rather than 0.
I'm no mathematician I just found myself working out the complexity
of a little C program that I've just bashed together.
Thanks for your help.
M.
Expressing the number of different character combinations for a given character length...
Where n = the number of characters.
and x = number of possible characters.
e.g
for alphanumeric characters, case sensitive x = 62.
up to say 5 characters in length n = 5. I could express
the number of combinations as:
(x^n) + (x^(n-1)) + (x^(n-2)) + (x^(n-3) + x
or//
62^5 + 62^4 + 62^3 + 62^2 + 62 = 931,151,402 combinations.
I ask, how would i simplify it so it could be written for any n?
i.e. in the above example replacing the "62^4 + 62^3 + 62^2" with
something else.
It's got to be simple. I'm just not seeing it.
----------
Other examples, in case you didn't notice the obvious pattern:
where n = 4:
(x^n) + (x^(n-1)) + (x^(n-2)) + x
or// x^4 + x^3 + x^2 + x
where n = 3
(x^n) + (x^(n-1)) + x
or// x^3 + x^2 + x
Pages: 1