All the combinations of word with length of 5 divided to groups

40 Views Asked by At

I have alphabet with length $20$.
All the combinations of word with length of $5$ is $20^5 = 3,200,000$

I divided it to groups but when I sum them I didn't get $3,200,000$ and I have some mistake in the calculations.

Here are the groups:
All the combinations that:

  1. Each letter is different from the other
    $20*19*18*17*16 = 1,860,480$
    Example: abcde

  2. Two letter are equal and the rest are different from each other
    ${20\choose 1}*{5\choose 2}*19*18*17 = 1,162,800$
    Example: aabcd

  3. Thee letter are equal and the rest are different from each other
    ${20\choose 1}*{5\choose 3}*19*18 = 68,400$
    Example: aaabc

  4. Four letter are equal and the rest are different from each other
    ${20\choose 1}*{5\choose 4}*19 = 1,900$
    Example: aaaab

  5. All the letters are equal
    ${20\choose 1}=20$
    Example: aaaaa

  6. Two letters are equal, two different other letters are equal and one different letter
    ${20\choose 1}*{5\choose 2}*{19\choose 1}*{3\choose 2}*18 = 205,200$
    Example: aabbc, hhggf

  7. Three letters are equal and two different other letters are equal
    ${20\choose 1}*{5\choose 3}*{19\choose 1} = 3,800$
    Example: aaabb

When I sum it:
$1,860,480 + 1,162,800 + 68,400 + 1,900 + 20 + 205,200 + 3,800 = 3,302,600$

It is more than $3,200,000$ so I probably didn't calculate some group correctly, can you find where is my mistake ?

1

There are 1 best solutions below

0
On BEST ANSWER

Your item $6$ counts every combination twice. When you have aabbc you could choose a to be the first pair and b to be the second or the other way around. If you divide your count by $2$ you get the correct total.