[Math] How many bit strings of length 12 contain at least three 1 s and at least three 0 s

combinations

i have this question but i don't know the answer please help me: How many bit strings of length 12 contain at least three 1 s and at least three 0 s?

Best Answer

There are $2^{12}=4096$ bit strings altogeher. Of these, the number of bit strings containing exactly 0,1 or 2 1's is $${12\choose 0}+{12\choose 1}+{12\choose 2}=1+12+66=79$$Similarly, the number of bit strings containing exactly 0,1 or 2 0's is also 79. There is no overlap. Thenumber of bit strings satisfying the condition is 4096 - 2 $\times$79=4096-158=3938.