[Math] How many $7$ letter sequences (formed from the $26$ letters in the alphabet, with repetition allowed)

combinatorics

How many $7$ letter sequences (formed from the $26$ letters in the alphabet, with repetition allowed) contain exactly one A and exactly two Bs?

Soln:

My constraint is the one A and two Bs, thinking about this conatraint I am not concerned with order, but I want to know how many ways this set of 3 elements can be arranged in a string of length 7, tbis would be $$\binom{7}{3}$$

now the other thing I am concerned about is the number of ways the other four letters can be selected: $$24^4$$

now to find the number of sequences it would be the product of these two values: $$ \binom{7}{3} 24^4$$

Questions:

1) Is this the right way to decompose the problem?

2) the way I accounted for the A and Bs, why would I not have to do the same for the other set of letters?

Best Answer

1) You are close but you forgot to arrange $A$ and $B$ which you need to multiply again by ${3\choose1}$.

2) You could choose the other four letters instead and ${7\choose3}={7\choose4}$ so the result will be the same. You need not to do both because when you choose one set the other set is automatically chosen as well.