How many ways are there for 8 men and 5 women to stand in a line so that no two women stand next to each other?

For this type of problem first consider the position of the men, then the position of the women.In general first consider the the group with more people.

How many possible ways are there to arrange eight men in a row? It will be $ ^8P_8 = 8! = 40320$

Now as no two women stand next to each other,we can imagine the situation as

                   * M * M * M * M * M * M * M * M *

Hence, we need to find how many ways we can arrange $5$ women in the $9$ possible (as shown above) places,this is actually $ ^9P_5 = 9*8*7*6*5 = 15120$

Now applying the fundamental law of counting (precisely product rule), total number of possible arrangements satisfying both constraints is: $15120 * 40320 = 609638400$ which is your required/desired answer.


Another way to compute the arrangements of men and women is to consider the way that the strings consisting of $m$s and $w$s can be put together. All the possible strings of any length can be constructed from one choice of terms in the product $$ (w+1)\sum_{k=0}^\infty(mw+m)^k $$ The $w$ in the $(w+1)$ will select those strings that start with a $w$; the $1$ selects those starting with an $m$. Since two women cannot stand together, $w$ only appears as $mw$ inside the sum of powers.

Thus, we need to compute the coefficient of $m^8w^5$ in $\sum\limits_{k=0}^\infty m^k(w+1)^{k+1}$, which is the coefficient of $m^8w^5$ in $m^8(w+1)^{8+1}$ which is $\binom{9}{5}$. There are $8!$ arrangements of the men and $5!$ arrangements of the women within each of these arrangements of $m$s and $w$s. Thus, the final answer is $$ \binom{9}{5}\,8!\,5!=609638400 $$


W M W M W M W M W M W M W M W M W this is the possibility.. We have 9 W and 8 M so we have to count 5 w from 9 w and that is C(9,5). then we have to multiply this with 8! and 5! for all possible arrangements. that is: 8!*5!*C(9,5)=609,638,400 (ans)