I am trying to count the number of bit-strings of length 8 with 3 consecutive zeros or 4 consecutive ones. I was able to calculate it, but I am overcounting. The correct answer is, I got .
I calculated it as follows:
Number of strings with 3 consecutive zeros =, because the 3 zeros can start at bit number 1, 2, 3, .., 6
Number of strings with 4 consecutive ones =, I used the same reasoning.
Now I am trying to count the number of bit-strings that contain both 3 consecutive zeros and 4 consecutive 1s. I reasoned as follows:
the strings can be of the following forms: 0001111x, 000×1111, x0001111..thus there arepossibilities for bit-strings where the 3 consecutive zeros come first. Symmetrically there are bit-strings where the 4 consecutive ones come first.
Thus the answer should be =