How many ways are there for W women and M men to sit on N chairs, if no man can sit next to woman? So, we have:
W - count of women
M - count of men
N - count of chairs standing in a row (N > M + W)

Each person sits on her chair, and only two men or two women can sit on adjacent chairs. How many possibilities are there for them to sit?
 A: We shall be using both Theorem 1 and Theorem 2 of stars and bars
Let us put number of empty chairs as $E = N-(W+M)$, with $W,M,E >0$
These $E$ chairs act as bars (dividers) in the stars and bars approach, making $(E+1)$ boxes in which to put women and men, treated as just categories for the moment.
We can place the women in $A$ boxes, $1\le A \le E$, using Theorem $1$ in $\binom{W-1}{A-1}$ ways,
choosing the $A$ boxes in $\binom{E+1}{A}$ ways
$(E+1-A)$ boxes now remain, and we can place the men using Theorem $2$ in $\binom{M+E-A}{E-A}$ ways
If each person is treated as distinct, we shall, of course, have to multiply by $W!M!$
Putting the pieces together, # of ways = $$W!M!\sum_{A=1}^E\binom{E+1}{A}\binom{W-1}{A-1}\binom{M+E-A}{E-A}$$

ADDED NOTE
I have put the condition $W,M,E>0$ to exclude trivialities.
A: Let $F(N,M,W)$ be the answer.  We have boundary conditions
$$ \eqalign{F(N,0,W) &= {N \choose W} \ \text{for}\ W \le N\cr
            F(N,M,0) &= {N \choose M} \ \text{for}\ M \le N\cr
            F(N,M,W) &= 0 \ \text{for}\ M, W > 0,\; N \le M+W\cr
           }$$
Otherwise consider the possibilities for the first empty chair.
If the first empty chair is in position $j+1$, then the first $j$ positions are either all men or all women.
$$ F(N,M,W) = F(N-1,M,W) + \sum_{j=1}^{M} F(N-j-1, M-j,W) + \sum_{j=1}^{W} F(N-j-1,M,W-j)$$ 
Hmm.  It looks like $F(2i+n,i,i)$ is the coordination sequence for the lattice $A_n$: see e.g. OEIS sequence A005901. This has generating function
$$\sum_{k=0}^n {n \choose k}^2 z^k/(1-z)^n = P_n\left( \dfrac{1+z}{1-z}\right) $$ 
where $P_n$ is the $n$'th Legendre polynomial. 
And more generally, $F(n+2i+j,i+j,j)$ (for fixed $n$ and $j\ge 0$) seems to have generating function $$ \sum_{k=0}^n {n-j \choose k}{n+j \choose n-k} z^k/(1-z)^n $$
