# How many 3-word sentences can be created?

I'm doing this old exam in my course and I stumble upon the question:

How many $$3$$-word sentences can be created from $$8$$ letters A, $$8$$ letters B and one of each of the letters C,D,E,F,G when each of these $$21$$ letters is used exactly once in each sentence?

So after some thinking I reason, if all the letters were unique/distinct the number of 3-word sentences should be the number of bijections. But now I have to somehow deduct that I have 8 A's and 8 B's. Can someone please provide an answer but emphasize on how to account for multiple A's and B's, meaning what would be the difference between all unique letters and with letters repeating.

Thank you.

• sentences having same words permuted are considered different ? – G Cab May 12 '19 at 10:26
• @GCab I'd assume so, seeing that that's how sentences work – DreamConspiracy May 12 '19 at 13:33

Use permutations with repetition. If whole sentence was 1 word, it would be: $$\frac{21!}{8!\cdot8!} = 31426995600$$ You have 21 letters so you have 21! on the top. 8 letters A and 8 letters B are the same, so you have twice 8! on the bottom.
After that, you need to add 2 spaces. There are 20 gaps between 21 letters, so the number of possibilities to add 2 spaces into 20 distinct gaps is $$\frac{20\cdot19}{2} = 190$$
The overall result is then the product of these two numbers, i.e.: $$\frac{21!}{8!\cdot8!}\cdot\frac{20\cdot19}{2} = 31426995600\cdot190 = 5971129164000$$
• You have counted the number of words that use all $21$ letters. We need to count the number of sentences with three words that use all $21$ letters. – N. F. Taussig May 12 '19 at 9:44
• Did you mean to write $\frac{21!}{8!8!}$? – N. F. Taussig May 12 '19 at 10:43