Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Re: Help Me ! » Expressing # of different character combinations for a given character » 2006-11-20 04:58:50

mwc

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.

#2 Help Me ! » Expressing # of different character combinations for a given character » 2006-11-20 02:52:28

mwc
Replies: 7

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

Board footer

Powered by FluxBB