[Math] How many bit strings of length 6 either begin with two 0’s or end with three 1’s

algebra-precalculuscombinatoricsdiscrete mathematics

How many bit strings of length 6 either begin with two 0's or end with three 1's

I have this so far:

Starting:

0 0 X X X X

so: $2^4$ combinations

Ending:

X X X 1 1 1

So $2^3$ combinations.

Would the answer be the sum of these two?

Best Answer

No, because you have counted $00X111$ twice. It qualifies both ways. You need to subtract out one set.