0
$\begingroup$

the letters ABCDEFGH are to be used to form strings of length 5. How many strings contain the letter a if repetitions are allowed?

$\endgroup$

4 Answers 4

1
$\begingroup$

Hint: How many strings doesn't contain the letter A?

$\endgroup$
2
  • $\begingroup$ You're sure that there are $8^5$ strings with all $8$ letters (and that is correct), but not that there are $7^5$ with only $7$? Why wouldn't there be, the situation is the same. - In other words: Yes, there are $7^5$ strngs without the letter A. $\endgroup$ Commented Nov 20, 2014 at 23:56
  • $\begingroup$ That's what I get too. But there's no reason to assume I'm any better at entering that into a calculator than you are. $\endgroup$ Commented Nov 21, 2014 at 0:01
1
$\begingroup$

Yes the best way is to find how many string doen't contain A and subtract it from total i.e., $ 8^5 - 7^5 $

The other method is: find no. strings that has exactly 1 A : ${5 \choose 1} * 7^4$.

Then no. of string which has exactly two A : ${5 \choose 2} * 7^3$ and so on.

Thus, total no. of such strings would be = $({5 \choose 1} * 7^4 + {5 \choose 2} * 7^3 + {5 \choose 3} * 7^2 + {5 \choose 4} * 7^1 + {5 \choose 5} * 7^0)$

which equals to $15961$

$\endgroup$
0
$\begingroup$

You are halfway there. Now some of the strings do not contain A. How many strings are there that don't contain A? Subtract them from $8^5$ and you are done.

$\endgroup$
0
0
$\begingroup$

In general, among the very first things you should look at for counting problems is to look at the negation: in this case, how many strings don't contain a?

$\endgroup$
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.