A friend just asked me how to do the following exercise:
Calculate the amount of 25 bit arrangements that have exactly 15 $1$s and at least two of consecutive $0$s
I want to know if my approach is correct:
Counting disjoint cases is too much of a chore, so I decided to approach this by complement (counting the arrangements that have no consecutive zeroes)
So if I write the "word" $11110010101010101$... and replace the $1$s with $|$ and the $0$s with $*$, I get an arrangement of $15$ bars and $10$ stars. If I think of this as counting the ways of getting balls into containers, this is one possible permutation of the question how to distribute $10$ undistinguishable balls between $16$ distinguishable containers
Looking even further, two zeroes are consecutive is equivalent to saying a container has two balls. So I'm looking at the solutions of the equation
$$a_1 + a_2+ \dots + a_{16}= 10 \ \ , \text {where $a_i$} =1 \lor a_i =0$$
This is equivalent to choosing $10$ out of the 16 containers where I'll put exactly one ball, and leave the rest empty
So the amount of ways to make such an arrangement with no consecutive zeroes is ${16 \choose 10}$
Does what I did make sense?
Edit: Edited because for some reason my brain decided that $25-15 = 8$