Counting permutation of duplicate items I am not really sure I fully understand the formula for finding the number of permutation of duplicate items.
The formula is:
$$\frac{n!}{p!q!r!\cdots}$$
Where do the factorials in the denominator exactly come from?
If we asssume the string "ANNA" and we want the count of the permutation of duplicate items.
We have $4$ characters so since we have $4$ options for the first character, $3$ for the second, $2$ for the third and $1$ for the last we have $4!$ different permutations.
But some of the characters are duplicates.
We have "A" and "N" repeated, meaning it adds more permutations to the outcome.
If $p=2$ is the number of occurences of "A" and if $q = 2$ is the number of occurences for "N"  then would the $p!$ and $q!$ essentially be selecting $1$ item at a time from $2$ (or $p$) duplicates? So essentially are the denominators the binomial $\binom{2}{1}$ (or generally $\binom{p}{1}$ where $p$ are the number of repeated characters) where order does not matter?
Is my understanding correct?

A different way of viewing this formula which avoids "division by symmetry" arguments:
Given $n$ items, $p$ of which are identical of one type, $q$ of which are identical of another type, $r$ of which are identical of a third type, etc... with $p+q+r+\dots = n$, approach the count by following the steps:
Pick which of the spaces are used by the $p$ objects of the first type.  There are $\binom{n}{p}$ ways to make this choice
Pick which of the remaining spaces are used by the $q$ objects of the second type.  There are $\binom{n-p}{q}$ ways to make this choice given the earlier choice
Pick which of the remaining spaces are used by the $r$ objects of the third type.  There are $\binom{n-p-q}{r}$ ways to make this choice given the earlier choices
$\vdots$
This gives a final total of:
$$\binom{n}{p}\binom{n-p}{q}\binom{n-p-q}{r}\cdots$$
Note, this explanation was able to completely avoid division as an operation as binomial coefficients could have been defined recursively purely using addition and multiplication.
Now... if you insist on rewriting this using fractions, you should know that $\binom{a}{b}=\dfrac{a!}{b!(a-b)!}$ in which case you have
$$\binom{n}{p}\binom{n-p}{q}\binom{n-p-q}{r}\cdots = \dfrac{n!}{p!\color{red}{(n-p)!}}\cdot \dfrac{\color{red}{(n-p)!}}{q!\color{blue}{(n-p-q)!}}\cdot\dfrac{\color{blue}{(n-p-q)!}}{r!(n-p-q-r)!}\cdots$$
Cancelling the numerators of each term after the first in the product with a portion of the denominator from the previous term gives the well known $$\dfrac{n!}{p!q!r!\cdots}$$
