How do I calculate the number of permutations of the list $(6, 6 ,5, 4)$? I have the list $l = (6, 6, 5, 4)$ and want to how to calculate the possible number of permutations.
By using brute force I know that there are 12 possible permutations:
$$\{(6, 5, 6, 4),
 (6, 6, 5, 4),
 (5, 6, 6, 4),
 (6, 4, 5, 6),
 (6, 5, 4, 6),
 (4, 6, 6, 5),
 (4, 5, 6, 6),
 (4, 6, 5, 6),
 (6, 4, 6, 5),
 (6, 6, 4, 5),
 (5, 4, 6, 6),
 (5, 6, 4, 6)\}$$
But how would I calculate this?
I know we talk about permutation as order matters also I know that repetition is allowed (at least for $x = 6$).
 A: Imagine there are two different $6$'s, say $6_a$ and $6_b$. Then there would be $4!=24$ permutations. Now let the two $6$'s be the same, so $(6_a,7,5,6_b)=(6_b,7,5,6_a).$ This halves the number of permutations, giving the answer of $24/2=12$.
A: For a list of $n$ distinct elements the number of permutations if $n!$. If you have $4$ distinct elements, the number of permutations is $24$.
However in this case we have the number $6$ appearing twice. For every ordering of the four numbers $6,6',5,4$ there is another ordering switching the $6$ and the $6'$, so you need to divide $24$ by $2$ which gives $12$ as you've got. 
A: Here is another way of thinking about the problem:  There are four positions to fill.  We can fill two of them with a $6$ in $\binom{4}{2}$ ways.  Once those two positions have been filled, we fill one of the remaining two positions with a $5$ in $\binom{2}{1}$ ways.  Once those three positions have been filled, we can fill the remaining position with a $4$ in $\binom{1}{1}$ way.  Thus, the number of ways we can fill four positions with two sixes, one five, and a four is 
$$\binom{4}{2}\binom{2}{1}\binom{1}{1} = \frac{4!}{2!2!} \cdot \frac{2!}{1!1!} \cdot \frac{1!}{0!1!} = \frac{4!}{2!1!1!} = 12$$
