0
$\begingroup$

Let $A = \{ a, b, c, d, e, f \}$. How many different 3-letter sequences can be created by the following rule;

1-)Repetition of words is allowed and the sequence must contain the letter "e".

I solved it this question basically considering 3 different cases, which are the case where the sequence contains the letter "e" 3 times, 2 times and 1 time.After that I calculate the number of sequence with the corresponding situation and get the result 91.

However, the way that I used is pretty inefficient if the length of the sequence is much longer, so I'm looking for more "elegant" solutions to this problem.

  • 1
    Hint: it's easier to count the three letter sequences which don't use "e".2017-02-23
  • 0
    @lulu By using your logic, the answer should be 6*6*6 - 5*5*5 = 201 ?2017-02-23
  • 0
    Right, but $6^3-5^3=91$.2017-02-23
  • 0
    @lulu You're right, my mistake.2017-02-23

2 Answers 2

1

Hint -

I think another way to solve this is -

Total cases with 3 letters - Cases with no letter e.

$6^3 - 5^3 = 216 - 125 = 91$

0

Let us count according to the number of letter 'e' contained in string.

You have $3$ possibilities of placing $1$ letter 'e', then you have $5^2$ possibilities of placing the remaining letters.

You have $3$ possibilities of placing $2$ letter 'e', then you have $5$ possibilities of placing the remaining letters.

You have $1$ possibility of placing $3$ letters 'e'.

Total is $75+15+1=91$.