[Math] How many bit strings can be made with six 0’s AND eight 1’s

combinatoricsdiscrete mathematics

This was a question I had on an exam the other night. I was really stumped by this question on the exam, and I'm still having trouble figuring it out. When doing this type of problem, there's usually a set length, but this question asks for any length, and two different elements. I thought this could've been a stars and bars problem C(n+r-1, n-1), but I don't think that works.

The question is also kind of confusing. Is it asking for any type of bit string as long as you are choosing from six 0's and eight 1's. Does anyone have any idea on how to do this?

Edit: Just wanted to clarify that when I asked the professor about this question during the exam, he elaborated that it can be of any length, including the null string.

Best Answer

I suppose that you have to use all the 14 bits to make a string.

In that case you have to choose the 6 positions of the 0's out of the 14 possible positions, which gives you ${14 \choose 6} = 3003$ choices.

EDIT

If you are allowed to construct strings of size less than 14 (which means that you don't use all the bits), you would get $\sum_{n=0}^6 \sum_{m=0}^8 {n+m \choose n}$ choices. And you can simplify this sum using twice the hockey-stick identity.

$$\sum_{n=0}^6 \sum_{m=0}^8 {n+m \choose n}=\sum_{n=0}^6 {n+9 \choose n+1}=\sum_{n=0}^6 {n+9 \choose 8}=\sum_{n=0}^7 {n+8 \choose 8}-{8 \choose 8}={16 \choose 9}-1=11439$$