In a program I am making that generates anagrams for a given set of letters, my current approach is to:
- Get all the the combinations of all the letters
- Get the permutations of each combination group
- Sort the resulting permutations alphabetically
- Remove duplicate entries
My question pertains to the mathematics of permutations. I am wondering if it is possible to flat-out calculate the array size needed to store all of the remaining entries after removal of duplicate entries (using, say, the number of repeated letters in conjunction with the permutation formula or something).
I apologize about the vagueness of my question, I am still researching more about combinations and permutations. I will try to elaborate my goal as my understanding of combinations and permutations expands, and once I re-familiarize myself with my program (it was a spare-time project of mine last summer).