I came across following problem:
How many bit strings of length four do not have two consecutive 1s?
I solved it as follows:
Total number of bit strings of length: $2^4$
Total number of length 4 bit strings with 4 consecutive 1s: 1
Total positions for three consecutive 1s in length 4 bit string: 2 (111X, X111)
Number of bit strings for each of above positions: 2 (X can be 0 or 1)
Total positions for two consecutive 1s in length 4 bit string: 3 (11XX, X11X, XX11)
Number of bit strings for each of above positions: 4
By inclusion exlcusion principle, the desired count $=2^4-3\times 4+2\times 2-1=16-12+4-1=7$
However the correct solution turns out to be 8. It seems that I incorrectly applied inclusion exclusion principle. Where did I go wrong?
If I were doing this by inclusion-exclusion, I'd go: $16$ strings of length four; $12$ with at least one pair of consecutive ones ($11xx,x11x,xx11$ with $x$s arbitrary); five with at least two pair of consecutive ones ($111x,1111,x111$); one with three pair of consecutive ones; so $16-12+5-1=8$.