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$).