[Math] How many bit strings contain exactly five $0$s and fourteen $1$s if every $0$ must be immediately followed by two $1$s

bit-stringscombinatoricsdiscrete mathematics

How many bit strings contain exactly five $0$s and fourteen $1$s if
every $0$ must be immediately followed by two $1$s?

What I need help with: For this question, the answer is 126-bit strings. However, I don't understand why the combination formula $n\choose r$ is used. I solved this question by using the permutation formula $\frac{n!}{n1!n2!}$ = $\frac{9!}{5!4!}$

Basically, can I look at the question as if it were asking "How many ways can one arrange five $0$s and fourteens $1$s such that every $0$ is followed by two $1$s?

Also, what is the difference between the two formulas above, I am very confused

The two formulas I'm talking about are the combination formula and the permutation one where you divide the total number of objects by the number of indistinguishable objects. Are these the same formulas? because I found that using either gives the same result for this question.

Best Answer

Let $a = 011$ and $b = 1$. What you are looking for is the number of words on the alphabet $\{a,b\}$ containing 5 $a$'s and $4$ $b$'s (since the number of $b$'s is $14 - 2 \times 5 = 4$). Such a word is determined by the positions of the $a$'s (or of the $b$'s, as you prefer). This gives you $\binom{9}{5} = \binom{9}{4} =216$ possibilities.