There are nC0=1 strings with exactly 0 zeroes.
There are nC1=n strings with exactly 1 zero.
There are nC2=n(n-1)/2 strings with exactly 2 zeroes.
There are 2^n total strings.
Thus the number of strings with 3 or more zeroes is
2^n-n(n-1)/2-n-1
|
Posted by Daniel
on 2018-10-03 07:48:06 |