In the program I am doing that generates anagrams for a given set of letters, my current approach is this:
- Get all combinations of all letters
- Get permutations of each group of combinations
- Sort the resulting permutations in alphabetical order
- Delete duplicate entries
My question is about math permutations. I am wondering if it is possible to calculate the size of the array needed to store all the remaining entries after deleting the duplicate entries (using, say, the number of duplicate letters combined with the permutation formula or something else).
I apologize for the vagueness of my question, I am still more versed in combinations and permutations. I will try to formulate my goal, as my understanding of combinations and permutations expands, and as soon as I re-evaluate myself with the help of my program (this was my last project last summer).
java math permutation combinations
mellowmaroon
source share