28

I have a homework problem in my textbook that has stumped me so far. There is a similar one to it that has not been assigned and has an answer in the back of the textbook. It reads:

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?

The answer is $609638400$, but no matter what I try I cannot reach that number. I have tried doing $2(8!5!/3!)*(8!/5!)$ since each woman must be paired with a man in order to prevent two women getting near each other. But of course, it's the wrong answer.

What am I doing wrong here?

Ajay
  • 109
Mark
  • 421

5 Answers5

54

For this type of problem first consider the position of the men, then the position of the women. In general first consider 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.

Quixotic
  • 22,817
  • 1
    Thanks, that makes it entirely clear. – Mark Dec 01 '10 at 07:36
  • 9
    I just noticed that you haven't accepted any answer of your earlier questions in this site...if you are satisfied with any answer you may consider accepting it. – Quixotic Dec 01 '10 at 10:03
  • 3
    @ Mark: Debanjan is right. You can accept an answer by clicking on the v-shaped figure, situated below the (in this case: large) number of up/downvotes the question has received. – Max Lonysa Muller Dec 06 '10 at 16:11
  • Why can't we say that no two women can be placed as MWMWMWMWMWMMM and the answer is not 8!*5!? Or why not MWMWMWMWMWMWMWM and 8!.P(7,5) – Naresh Joshi Nov 28 '19 at 12:30
4

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 $$

robjohn
  • 353,833
1

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)

0

You could try the concept of $\texttt{successive placement}$

Place the men successively in $1\cdot2\cdot3\cdot4\cdot5\cdot6\cdot7\cdot8 = 8!$ ways
[Of course, we could just have written $8!$ directly, this was to show that $\texttt{normally}$, each placement creates an extra place for the next]

The first woman can go in to any of the $9$ interstices including ends, but now each placement "eats up" two "forbidden" adjacent places, so there is a net $\texttt{reduction}$ of $1$ for each successive placement

Thus final answer $= 8!\times9\cdot8\cdot7\cdot6\cdot5$,
or more succinctly, using the falling factorial, $\large{\quad8!9^\underline{5} = 609638400}$

Remarks

Of course, $^8P_8\cdot^9P_5$ in Quixotic's answer is simple and natural here, but keep $\texttt{successive placement}$ in mind, because it can help in different types of constraints, as here and here

-3
  • M * M * M * M * M * M * M * M * .

there are 9 "*" . 8 "M" . now select 5 * from 9 * then == c(9,5)

vahid
  • 7
  • 2
    I think you haven't considered that the men (and the women) are different from each other. – Petr May 07 '13 at 20:04