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

combinatoricsdiscrete mathematics

So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways

Second case (end with three $1's$): $2*2*2*2=16$

And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$

Best Answer

Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).

For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.

So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.

If these cases are not disjoint, then your answer is $44$.