[Math] Permuting and finding combinations of bit strings

combinatorics

I am working on typical computer science math and one theme in many text books is to find different permutations/combinations of binary strings:

1011011101 is an example op a binary number of length 10. How many
binary numbers of length 10 end up with 111 and contain exactly two
zeros.

The example above is a typical question and the question is often harder than the maths/math:

*The solution above is : The number is completely defined if we know
the places of the 2 zeros. The number starts with 1 and ends up with
111. There are still six digits to be determined. Once we identify two locations for the zeros, the number is fixed. The number of ways to
choose 2 places out of the 6, is $\bf\binom{6}{2}$.

Question: Why does the string have to start with a 1

I got $\binom{7}{2}$.

for example what about the sting 1111111100, which does not have a 1 in th efirst place?.

I sort of almost get it then slip up one one of the assumptions: do you have any way of solving these binary string questions eg by drawing them out so you don't slip up tha will help me from slipping up?

Best Answer

I think the trick is that the question specifies a binary number, rather than a string, so the normal assumption would be that a number has no leading zeroes (in this case a $10$ digit binary number must start with a $1$).

Of course a binary string is just a sequence of characters from $\{0,1\}$, so $01$ is clearly a different string to $1$, whereas we would consider them the same number.

There is an argument here about numbers vs. their representations, so we could consider that $01$ and $1$ are both representations of the same number, much as $2$ base ten is the same number as $10$ base two, it's just that we have some rules of usage that we often forget we are using when we discard leading zeroes and identify a number with its representation.

So given that it starts with a $1$, and the last three digits are $111$, there's only six spots left that could be a $0$.