When some items are identical, not every rearrangement is new. Swapping two matching items does not create a different arrangement, so you must divide by the repeats.
If there are (n) items altogether, start with the number of arrangements of (n) distinct items: (n!).
If one item is repeated (r_1) times, another (r_2) times, and so on, divide by each repeated factorial:
[ \frac{n!}{r_1!,r_2!\cdots} ]
This gives the number of distinct arrangements.
Evaluate the factorials carefully, then simplify the fraction. If the answer is exact, leave it as a whole number.
A quick check is to ask: if all items were different, would the answer be larger? It should be. Also, repeated items should reduce the count compared with (n!).
Do not divide by the number of repeated items themselves; divide by the factorial of each repeat count.
Use this same method every time: total factorial first, then divide for each group of identical items.
© 2023-2026 AI MATH COACH