2
$\begingroup$

The English alphabet contains $21$ consonants and $5$ vowels. How many strings of $7$ lowercase letters of the English alphabet (repeats allowed) contain:

(a) exactly one consonant

(b) exactly two vowels

(c) at least one consonant

(d) at least one vowel and at least one consonant

For (a) I got $C(21,1) \times C(7,1) \times 5^6$

For (b) I got $5^2 \times C(7,2) \times 21^5$

I have no idea if these are correct. The ones I struggled with are (c) and (d), could someone help me with the last two please?

Edit: After reading the comment by David G. Stork:

For (c), I did $26^7 - 5^7$. Since each of the $7$ positions can be one of $26$ letters, so total number of strings is $26^7$, then minus all the strings that does not have a consonant to get the strings that has at least one consonant.

$\endgroup$
7
  • 1
    $\begingroup$ For (c): Compute the total number of possible strings and subtract the number that have no consonants. $\endgroup$ Apr 20 '19 at 20:49
  • $\begingroup$ @DavidG.Stork thank you for your response! Are (a) and (b) correct? and do you have any idea how to do (d)? :) $\endgroup$
    – Pengibaby
    Apr 20 '19 at 20:52
  • 1
    $\begingroup$ For (a): The lone consonant can appear in one of seven places, and can be one of 21 letters, so there are $7 \cdot 21$ possible specifications. For the remaining $6$ positions, there are $5^6$ possible assignments of vowels. Multiply these two numbers together. For the rest... you're on your own. Good luck! $\endgroup$ Apr 20 '19 at 21:46
  • 1
    $\begingroup$ This tutorial explains how to typeset mathematics on this site. $\endgroup$ Apr 21 '19 at 10:39
  • 1
    $\begingroup$ @N.F.Taussig Thank you for that link, I was trying to figure out how to type in maths format but failed. For (c) I did 26^7 - 5^7. Since each of the 7 positions can be one of 26 letters, so total number of strings is 26^7, then minus all the strings that does not have a consonant to get the strings that has at least one consonant. Is that correct? $\endgroup$
    – Pengibaby
    Apr 21 '19 at 16:36
2
$\begingroup$

Your answers to the first three questions are correct.

How many strings of $7$ lowercase letters of the English alphabet (repeats allowed) contain at least one vowel and at least one consonant.

The strings that contain at least one vowel and at least one consonant are those that are those not composed only of vowels or only of consonants.

Let $S$ denote all strings of $7$ lowercase letters.

Let $V$ denote all strings of $7$ lowercase letters that contain at least one vowel.

Let $C$ denote all strings of $7$ lowercase letters that contain at least one consonant.

Then we wish to find $V \cap C$. To do so, we subtract those strings that contain no consonants or no vowels from the total number of strings.

$$|V \cap C| = |S| - |V^C \cup C^C|$$

If we subtract those strings with no vowels and no consonants from the total number of strings, we will have subtracted those strings with neither vowels nor consonants twice. Since we only want to subtract such strings once, we must add them back. However, it is not possible to form a string of length $7$ that contains neither consonants nor vowels. Hence, the answer can be obtained by subtracting the number of strings with no vowels and the number of strings with no consonants from the total. Since there are $21^7$ strings with no vowels and $5^7$ strings with no consonants, we obtain \begin{align*} |V \cap C| & = |S| - |V^C \cup C^C|\\ & = |S| - (|V^C| + |C^C| - |V^C \cap C^C|)\\ & = |S| - |V^C| - |C^C| + |V^C \cap C^C|\\ & = 26^7 - 21^7 - 5^7 + 0\\ & = 26^7 - 21^7 - 5^7 \end{align*}

$\endgroup$
3
  • 1
    $\begingroup$ Thank you so much for the taking the time to answer and explain to me the steps as well! I really appreciate it :) $\endgroup$
    – Pengibaby
    Apr 21 '19 at 20:44
  • $\begingroup$ At line 3: |S|−|VC|+|CC|+|VC∩CC| . shouldn't this be |S|−|VC|-|CC|+|VC∩CC| ? $\endgroup$
    – Garuda
    Apr 21 '20 at 9:39
  • $\begingroup$ @Garuda Yes, you are correct. Thank you for alerting me to the error. $\endgroup$ Jun 30 '20 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.