Question 1113018
<br>
What don't you understand about this problem...?<br>
A bit string contains only digits 0 or 1; if a bit string is of length 4, then the total number of different bit strings is 2*2*2*2 = 16.  It isn't a lot of work to write out all 16 of those strings and find the ones that have either 3 consecutive 0s or 3 consecutive 1s.<br>
Or you could do just a little basic logical analysis.  If a bit string of length 4 has 3 consecutive 0s, what are the possibilities?  And likewise if it has 3 consecutive 1s?<br>
And remember that the problem doesn't say EXACTLY 3 consecutive 0s or 1s.  The two strings 0000 and 1111 both contain 3 consecutive 0s or 3 consecutive 1s.