64.7k views
2 votes
In this exercise, we consider strings made from uppercase letters in the English alphabet and decimal digits.

How many strings of length 10 can be constructed in each of the following scenarios?

(a) The first and last characters of the string are letters.

(b) The first character is a vowel, the second character is a consonant, and the last character is a digit.

(c) Vowels (not necessarily distinct) appear in the third, sixth, and eighth positions and no other positions.

(d) Vowels (not necessarily distinct) appear in exactly two positions.

(e) Precisely four characters in the string are digits and no digit appears more than one time.

1 Answer

5 votes

Answer:

  • a)
    26^2 36^8
  • b)
    21\cdot10\cdot36^7
  • c)
    5^3 31^7
  • d)
    10\cdot 9\cdot 8 \cdot 7 \cdot 26^6

Explanation:

We will use the product rule from combinatorics.

  • a) There are 26 letters in the English alphabet, so there are 26 possible choices for the first character and 26 possible choices for the last one. Each one of the remaining eight characters of the string has 36 choices (letters or digits). By the product rule, there are
    26\cdot36\cdot 36\cdots 36\cdot 26=26^2 36^8 strings.
  • b) We have 5 possible choices for the first character, it must be some vowel a,e,i,o,u. The second character can be chosen in 21 ways, selecting some consonant. There are 10 possibilities for the last character because only of the digits are allowed. The other seven characters have no restrictions, so each one can be chosen in 36 ways. By the product rule there are
    21\cdot 10\cdot 36^7 strings.
  • c) The third character has 5 possibilities. Repetition of vowels is allowed, so the sixth and eighth characters have each one 5 possible choices. There are seven characters left. None of them are a vowel, but they are allowed to take any other letter or digit, so each one of them can be chosen in 36-5=31 ways. Therefore there are
    5^3 31^7 strings.
  • d) Remember that the binomial coefficient
    \binom{n}{k} is the number of ways of choosing k elements from a set of n elements. In this case, to count all the possible strings, we first need to count in how many ways we can select the four positions that will have the digits. This can be done in
    \binom{10}{4} ways, since we are choosing four elements from the set of the ten positions of the string. Now, for the first position, we can choose any digit so it has 10 possibilities. The second position has 9 possibilities, because we can't repeat the digit used on the first position. Similarly, there are 8 choices for the third position and there are 7 choices for the fourth. Now, these are the only digits on the string, so the remaining 6 characters must be letters, then each one of them has 26 possibilities. By the product rule, there are
    10\cdot 9\cdot 8 \cdot 7 \cdot 26^6 strings.
User Rodislav Moldovan
by
6.9k points