How many bit strings of length 10 contain either five consecutive 0's or five consecutive 1's ?
My Solution:
for 5 consecutive 0's
After we have filled 0's from $1^{st}$ position we have 2 choices each for the rest 5 positions After we have filled 0's from $2^{nd}$ position we have 2 choices each for the rest 5 positions $\dots$ After we have filled 0's from $6^{th}$ position we have 2 choices each for the rest 5 positions
making it total $6 \times 2^{5}$
Now, for 5 consecutive 1's
After we have filled 1's from $1^{st}$ position we have 2 choices each for the rest 5 positions After we have filled 1's from $2^{nd}$ position we have 2 choices each for the rest 5 positions $\dots$ After we have filled 1's from $5^{th}$ position we have 2 choices each for the rest 5 positions
making it total $4 \times 2^{5}$
Becasue 1111100000 and 0000011111 is already counted above
So making a total of $(6+4) \times 2^{5}=10 \times 2^5$
Please correct me If I've done something wrong