# Trouble understanding concept: number of strings of 6 characters with exactly two vowels.

So in order to count the number of strings with exactly two vowels, the equation would be $5^2 * C(6,2) * 21^4$. I understand that we use the $C(6,2)$ to count the total combination of positions that can be made for two spots in a string of 6 characters. However, I'm not sure if I understand why we do not impose the same limitation for the number of consonants, $21^4$. For the remaining 4 spots, why am I not required to find the number of positions that could be made for the 4 spots in a string of 6 characters, or $C(6,4)$? Wouldn't we be overcounting when we count the permutations of positions for the consonants? Or is it because $C(6,4)$ is the symmetry of $C(6,2)$, and therefore results in a matching combination for the consonants?

After you choose $2$ places for vowel, you have $4$ more places to choose from. Hence it is actually

$$5^2 \cdot C(6,2) \cdot 21^4 \cdot C(4,4)= 5^2 \cdot C(6,2) \cdot 21^4$$

In another word, the moment you choose the positions for vowels, you know that you have to fill the rest for consonants.

• Thanks for the reply. I think that makes sense. Since repetition is allowed for the consonants, how do we know we are not counting twice for same consonants in different positions? Ie. C1,C2,D,E and C2,C1,D,E. Are these positions also automatically chosen when we choose positions for the vowels? – Joe Mar 28 '18 at 0:57
• after you choose the position for vowel, look at the slots reserved for consonants from left to right. For the first box, we have $21$ choices, for the second box we have another $21$ choices, similarly for the third and fourth box. We decide the consonant for the box one at a time from the left to right and hence there is no double counting. – Siong Thye Goh Mar 28 '18 at 1:29

To avoid complication let's say you want to use lower case letters in your string.

When you choose $2$ positions to be vowels you are, in fact, saying that the remaining $4$ positions are not vowels. If you then intend to fill these remaining $4$ spaces with letters then they must be consonants.

e.g The choice of vowel positions here actually implies the consonant/vowel ($C/V$) "configuration" beneath it:

$$\begin{array}{cccccc}\_&\_&V&\_&\_&V\\\downarrow&\downarrow&\downarrow&\downarrow&\downarrow&\downarrow\\C&C&V&C&C&V \end{array}$$

There are

$$C(6,2)=\binom{6}{2}=15$$

different configurations of $4$ consonants and $2$ vowels similar to the one shown here.

For each different configuration we can replace each of the $2$ $V$s with vowels $a,e,i,o,u$ in $5$ ways, so that's $5^2$ ways for vowels.

Then for each of those we can replace each of the $4$ $C$s with consonants $b,c,d,\ldots ,z$ in $21$ ways, so that's $21^4$ ways for consonants.

In total, for each configuration of $C$s and $V$s we can replace $C$s and $V$s in $5^2\cdot 21^4$ ways.

Since we have $\binom{6}{2}=15$ different $C/V$ configurations and $5^2\cdot 21^4$ ways to replace $C$s and $V$s in each different configuration there are

$$\binom{6}{2}\cdot 5^2\cdot 21^4$$

total strings with $2$ vowels and $4$ consonants.