I need a math formula for counting distinct n- letter long array permutations.
Let me explain. Let's say we have 3 arrays of following letters: A, B, C, where A is a 4 member long array (A,A,A,A), B is a 4 member long array and C is a 1 member long array.
How do I calculate the total number of all unique n-letter long permutations, without programmatically permuting through them?
A, B, B, C
Given array lengths of each letter (as described above) I know there are 768 unique permutations. I got to 768 by writing a program that goes through all of the combinations, discarding duplicates.
These are unique combinations such as:
A,B,B,C or C,B,A,B
However, I need a mathematical formula to answer how many unique permutations are there for any number of letters and any length of the letter arrays.
I need this for my open source project that solves tetronimo based puzzles: https://github.com/JozefJarosciak/TetronimoPuzzleSolver/