- #1
Orion1
- 973
- 3
I am attempting to solve an anagram game puzzle just for fun, however what is difficult is the number of possible combinations for a typical anagram.
For example, in DNA there are 4 bases 'A','C','G','T'.
The equation that I derive for the number of possible combinations is:
[tex]N_c = N_b^L[/tex]
[tex]N_b[/tex] - base unit number
[tex]L[/tex] - base unit length
So, for one base of length L = 1, there are 4 combinations:
[tex]N_c = 4^1 = 4[/tex]
Increasing the length to L = 4, there are 256 combinations:
[tex]N_c = 4^4 = 256[/tex]
However, for English word anagram descrambling there are 26 base unit letters.
So, for one base of length L = 1, there are 26 combinations:
[tex]N_c = 26^1 = 26[/tex]
Increasing the length to L = 4, there are 456976 combinations:
[tex]N_c = 26^4 = 456976[/tex]
I am inquiring if any programmers here can write a simple program in Basic or in Visual Basic, with a better logistical code than I can write that does not require a lot of computational algorithmic cycles for descrambling an input anagram word and output all the possible combinations, for example:
input: edco
[tex]N_c = 4^4 = 256[/tex] - maximum combination number for input anagram word?
output 1: deco
...
output n: code
...
I am not certain that the number of possible combinations equation that I have stated is accurate for scrambled anagram words, since each anagram letter can only be used once in a sequence. So what would the equation be for a scrambled anagram word?
Reference:
http://en.wikipedia.org/wiki/Anagram"
Last edited by a moderator: