I want to find the number of permutations for element sets like AABC, AABBC, AABBCCFQQQ, etc. Element sets where there are distinct elements, whose placement relative to each other matters, but also identical elements (sub-sets of the element set), within which order doesn't matter. Put shortly, order matters within the element set, but not within the individual sub-sets.
In the case of AABC, there's four element spaces. If one is only directly moving the A-elements (and thus indirectly displacing the other elements), one gets six permutations. That makes sense because you're choosing two places out of four, and order doesn't matter: $\frac{4!}{(4-2)!2!}$, which is six. With the other elements, you're choosing one place out of four: $\frac{4!}{(4-1)!1!}$, which is four. So I thought, maybe the total number of permutations is all of these combinations added together?
AABC ...... Copy 1A
ABAC
ABCA
BAAC
BACA
BCAA ...... Copy 1B
BCAA ...... Copy 2B
CBAA
CABA
CAAB ...... Copy 1C
CAAB ...... Copy 2C
ACAB
AACB
AABC ...... Copy 2A
There are six copies, which divided by two yields three superfluous. Adding everything together, and subtracting three, gives eleven as the total number of permutations. This has led me to believe that this equation may give the answer. $$\frac{\text{No. elements}!}{(\text{No. elements} - \text{No. e}_1)! \ \ \text{No. e}_1!} + ... + \frac{\text{No. elements}!}{(\text{No. elements} - \text{No. e}_n)! \ \ \text{No. e}_n!} - n$$
If n is greater than 2, n being the number of distinct elements. e$_n$ is the nth element, and e$_1$ is the first element.
I've seen that when n = 2, there is no addition, but simply one combination. I think this may be because no. e$_1 = x$ and e$_2 = y$, $$\frac{(x+y)!}{(x+y-x)!x!} = \frac{(x+y)!}{(x+y-y)!y!}$$
Basically, by directly moving the A-elements through all of their combinations, one is indirectly displacing the B-elements through all of their combinations.
That's all I have, and it should give the answerer a rough notion of my level of combinatorics and math understanding. To conclude, I'm looking for an equation that gives the number of permutations with the input variables of the number of distinct elements, and the individual numbers of the element sub-sets.
EDIT:
I forgot to mention that I was looking for the permutations using all of the letters. Also, my brute force method missed ACBA.
ACBAfrom your list. A reminder that brute force, while easy to understand conceptually, is highly prone to error and should only be used as a last resort. – JMoravitz Sep 16 '21 at 12:18