200k views
1 vote
How many strings are there over the alphabet {a, b, c} that begin with the letter b and have a length of 7 or 8? a) 37 b) 38 c) 36 d) 37

1 Answer

3 votes
To count the number of strings over the alphabet {a, b, c} that begin with the letter b and have a length of 7 or 8, we can break this down into two cases:

Case 1: Strings of length 7 starting with 'b'
In this case, we have 7 positions to fill with the letters 'a', 'b', or 'c'. The first position is fixed as 'b', and the remaining 6 positions can each be filled with one of the three letters.

So, for this case, there are 3 choices for each of the 6 remaining positions:

3^6 = 729 strings

Case 2: Strings of length 8 starting with 'b'
In this case, we have 8 positions to fill with the letters 'a', 'b', or 'c'. The first position is fixed as 'b', and the remaining 7 positions can each be filled with one of the three letters.

So, for this case, there are 3 choices for each of the 7 remaining positions:

3^7 = 2187 strings

Now, add the results from both cases:

729 (from Case 1) + 2187 (from Case 2) = 2916 strings

So, there are 2916 strings over the alphabet {a, b, c} that begin with the letter 'b' and have a length of 7 or 8.

The closest option to this count is d) 37, which is not correct. The correct answer is not among the given options.
User Blank
by
7.7k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.