# Counting ways of sitting in adjacent seats

In how many ways can $m$ people entering a theatre be seated in two rows, each containing $n$ seats with the condition that no two sit in adjacent seats in the first row?

-

First calculate how many ways $j$ seats can be occupied from $n$: this is ${n \choose j}$ if $n\ge j$.

Then calculate how many ways $k$ seats can be occupied from $n$ with none adjacent: this is ${n+1-k \choose k}$ if $n+1 \ge 2k$

So the answer to the original question is $$\sum_{k= \max(0,m-n)}^{\min \left(m ,\lfloor(n+1)/2\rfloor \right)} {n+1-k \choose k}{n \choose m-k}$$ if $2m \ge 3n+1$, and $0$ otherwise.

Multiply by $m!$ if order of the individuals matters.

-

First figure out how many ways there are to choose which seats are sat in in the first place. The answers to your earlier question describe useful ways of looking at that subproblem.

Then figure out, given any decision about which $m$ seats to use, how many ways there are to distribute the $m$ people among them. That is a standard problem.

Finally multiply the two subresults.

-