Seating arrangements with no 3 objects together. 
Suppose that five $1$'s and six $0$'s need to be arranged in such a way that no three $0$'s are consecutive. How many different arrangements are possible? 

This is a variation on a problem where some number of boys and girls need to be seated such that no two boys sit next to each other. What are the solution strategies if the number of boys is increased to $3$, $4$, etc?
Thank you.
 A: First line up the five 1's, creating 6 gaps.  We will count the number of ways to put the 0's in these gaps, depending on how many pairs of consecutive 0's we have; so let $n$ be the number of these pairs.
1) If $n=0$, we have to distribute the 6 0's in the 6 gaps, which can be done in 1 way.
2) If $n=1$, we have $\binom{6}{1}$ ways to place the pair and $\binom{5}{4}$  ways to place the remaining 0's, 
$\;\;\;$so there are  $6\cdot5=30$ possibilities.
3) If $n=2$, we have $\binom{6}{2}$ ways to choose the gaps for the pairs, and $\binom{4}{2}$ ways to place the remaining 0's,
$\;\;\;$so there are  $15\cdot6=90$ possibilities.
4) If $n=3$, we have $\binom{6}{3}=20$ ways to choose the gaps for the 3 pairs.
This gives a total of 141 possibilities.
A: We solve the specific problem. Generalization of the procedure used is messy. There is no issue if there are $17$ $1$'s instead of $5$. But taking care of more $0$'s involves unpleasant Inclusion/Exclusion. 
We count the number of bad arrangements, in which there is a block of $3$ or more $0$'s. We also deliberately double-count the situations in which there are $2$ separated blocks of $3$ $0$'s, and then compensate. Then one can finish by subtracting the number of bad from the total number $\binom{11}{6}$ of possible arrangements. 
We can have a block of $3$ or more $0$'s starting in positions $1$ to $9$.
How many start at position $1$? There are $8$ slots left, and we can choose where the remaining $0$'s go in $\binom{8}{3}$ ways.
How many start at position $2$? Then we must have $1$ in position $1$, and there are $\binom{7}{3}$ ways to choose the remaining places where $0$'s go.
How many start at position $3$? Then we must have a $1$ in position $2$, and there are $\binom{7}{3}$ ways to position the rest of the $0$'s.
Continue. In each of the remaining cases there are $\binom{7}{3}$ ways to place the remaining $0$'s. 
We have double-counted the situations in which there are $2$ blocks of $3$ $0$'s separated by one or more $1$'s. So let's count these and subtract. We need at leat one $1$ between the blocks, so put a $1$ there. The $4$ remaining $1$'s will go into the space before the first block, or between the two blocks, or after. We have to decide how to split the four $1$'s between these places. This is a standard Stars and Bars problem, splitting $4$ candies between $3$ kids. There are $\binom{4+3-1}{3-1}$ ways to do it.
Remark: The approach of user84413 is much better than mine. 
A: user84413 has provided an elegant approach to solving this problem.  
Here is another approach:
If we place five ones in a row, we create six spaces, four between successive ones and two at the ends, which we wish to fill with six zeros.  If we let $x_k$ denote the number of zeros placed in the $k$th space from the left, then the number of ways we can arrange five ones and six zeros so that at most two zeros are consecutive is the number of nonnegative integer solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 6 \tag{1}$$
subject to the restrictions that $x_k \leq 2$ for $1 \leq k \leq 6$.
When there were no restrictions, then the number of solutions of equation 1 in the nonnegative integers is equal to the number of ways we can place five addition signs in a row of six ones, which is $\binom{6 + 5}{5} = \binom{11}{5}$.  However, we must exclude those cases in which three or more zeros are consecutive.  
Suppose that $x_1 \geq 3$.  Let $y_1 = x_1 - 3$.  Then $y_1$ is a nonnegative integer and
\begin{align*}
x_1 + x_2 + x_3 + x_4 + x_5 + x_6 & = 6\\
y_1 + 3 + x_2 + x_3 + x_4 + x_5 + x_6 & = 6\\
y_1 + x_2 + x_3 + x_4 + x_5 + x_6 & = 3 \tag{2}
\end{align*}
Equation 2 is an equation in the nonnegative integers, with $\binom{3 + 5}{5} = \binom{8}{5}$ solutions.  Since there are six ways one of the variables could exceed $2$, we must subtract $\binom{6}{1}\binom{8}{5}$ from $\binom{11}{5}$.  However, doing so subtracts those cases in which there are two distinct blocks of three zeros twice. There are $\binom{6}{2}$ ways to fill two of the six spaces with three zeros.  Therefore, by the Inclusion-Exclusion Principle, the number of bit strings consisting of five ones and six zeros in which at most two zeros are consecutive is 
$$\binom{11}{5} - \binom{6}{1}\binom{8}{5} + \binom{6}{2}$$
