There are nC0=1 strings with exactly 0 zeroes.
There are nC1=n strings with exactly 1 zero.
There are nC2=n(n1)/2 strings with exactly 2 zeroes.
There are 2^n total strings.
Thus the number of strings with 3 or more zeroes is
2^nn(n1)/2n1

Posted by Daniel
on 20181003 07:48:06 