I’m attempting to write a program that will generate a text file with every possible permutation of the alphabet from one character up to twenty-nine characters. I’ve chosen 29 as the longest English word that everyone knows is antidisestablishmentarianism which is 28 characters in length. There are longer ones, but they are mainly very technical and obscure.
I realise this will generate a huge number of strings. However I’ve no idea where to start or even how to figure out how many combinations this will generate.
Answers please for solutions in PHP, Processing, C++ or Java (I’m only familiar with those, PHP is preferred, but probably no the best for this I should imagine).
Or even just pseudo-code / ideas will be appreciated.
Also, before someone says it, this isn’t for brute forcing or anything like that. I’m an artist, albeit somewhat unknown and obscure with my concepts.
The word “permutation” usually means that each letter appears exactly once, so it would be impossible to generate any permutation with more than 26 letters. Anyway, since the number of generated strings is too big, you can use random strings instead (the following is C code):