How many strings of length 11 consisting only of the letters and are there that meet the following conditions?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There are a total of 2 1 1 = 2 0 4 8 strings of length 11. We now have to subtract the strings that don't meet the conditions. In the following, I will refer to the repeated letters as the row .
There are 4 different places where exactly 8 consecutive same letters can occur; from position 1–8, 2–8, 3–10 or 4–11, and 2 choices for the letter in the row. For 1–8 and 4–11, the letter next to the row has to be different and for the two remaining letters, there are 2 2 = 4 choices, so for 1–8 and 4–11 there are 2 ⋅ 2 2 + 2 ⋅ 2 2 = 1 6 strings. For 2–9 and 3–10, the letter before and after the row have are fixed (so that the row ends there), but the remaining letter has 2 options, so there are a total of 2 + 2 = 4 sequences with the row at 2–9 or 3–10.
We now do the same for a row of exactly 9 A 's. The row can be at 1–9, 2–10 or 3–11 and there are 2, 1 and 2 such sequences respectively, so a total of 2 + 1 + 2 = 5 .
Therefore, and since both conditions can't happen at the same time, the overall number of strings that meet both conditions is
2 0 4 8 − 1 6 − 4 − 5 = 2 0 1 9
H appy new Y ear!!