[Math] How many distinct four-digit integers can one make from the digits $1,3,3,7,7,8$

combinatoricsdiscrete mathematicspermutations

This is a question from Discrete and combinatorial mathematics book by Ralph Grimaldi .

The question is : How many distinct four-digit integers can one make from the digits $1,3,3,7,7,8$?

In the guidance book, the question is separated into many cases and every case is calculated. My problem is when we want to calculate the case with one $7$ and two $3$'s, why is the answer $2 \cdot \frac{4!}{2!}$?

Best Answer

For the case in question, if there is exactly one $7$ and two $3$'s, the other digit must be a $1$ or $8$. We have two ways of choosing this number. We have $\binom{4}{2}$ ways of choosing the positions of the two $3$'s, which leaves two ways to choose the position of the $7$, and one way to place the remaining digit.
$$2 \cdot \binom{4}{2} \cdot 2 \cdot 1 = 2 \cdot \frac{4!}{2!2!} \cdot 2! = 2 \cdot \frac{4!}{2!}$$ The factor of $2!$ in the denominator represents the number of ways we could permute the two $3$'s within a given arrangement without producing an arrangement distinguishable from that arrangement.