Hi I wanted to write a program to do this just out of boredom and i started to realize that the prog might take a very long time to run.
So we have the alphabet to start all capitals A-Z.
I want to write every possible combination of the letters to file. Up to 10 characters in length.
So the output file would look something like.
Code:
A
B // 1 char in length
C
...
...
AA
AB //2 char in length
AC
......
AAA
AAB //3 char in length and so on up to
AAC
.........
AAAAAAAAAA
ABAAAAAAAA
ACAAAAAAAA
.....
ZZZZZZZZZX
ZZZZZZZZZY //10 char in length.
ZZZZZZZZZZ
I dont know much concerning the math involved to caluculate the total possible combinations and i tried to study up on factorials but im not understanding them very well. So I was wondering if anyone could crunch some numbers and tell me the total # of possible combinations.
I was thinking it might be 26^1! + 26^2! + 26^3! ...... +26^10!
But i checked some of the math and 26^4! comes out to
9.107 x 10^33
=9107000000000000000000000000000000
I am thinking my reasoning above is wrong so if someone knows the correct way to calculate the total possibilities i would appreciate some help. Thanks.