# 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? [Extended answer]

In other previous questions alike, some of the answers were: "ANSWER: 609638400. Explanation: We can line up the eight men in P(8,8) ways. This creates nine spaces, seven between successive males and two at the ends of the row.

□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 9P5=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."

Now,I've got several questions:

1. Why is it not possible to have just 7 or 8 spaces for women instead of 9: M1 _ M2 _ M3 _ M4 _ M5_ M6 _ M7 _ M8

2. What about arrengements like:

W1 M1 M2 M3 W2 M4 M5 W3 M6 M7 W4 M7 W5

or

M1 M2 W1 M3 M4 W2 M5 W3 M6 W4 M7 M8 W5

How can these possibilities be taken into account when 2, 3 or even 4 men could be next to one another and still fulfill the restricions? Or it is logical to assume these problems with alternancy men/women?

Thanks!

• Not following. Of course you can put the $5$ women in those seven gaps. But you could also put one first or one last (or both) so you need the gaps on the sides if you want the full count. The point is that $\textit {any}$ good arrangement of the people can be described using those nine gaps. – lulu Sep 17 '20 at 15:44
• Yeah, understood!. But how about arrengements when 2, 3 or even 4 men could be next to each other. This creates less spaces. So is it logical to always assume alternancy in these problems Men, women in order to get to the maximum ways possible? – Simon Garcia Sep 17 '20 at 16:38
• Of course there will be blocks of men next to each other, there is no way to avoid that given the numbers. So what? Some of those $9$ gaps are certainly going to be empty. – lulu Sep 17 '20 at 16:41
• Unused gaps after everyone is arranged can be thought of as collapsing into nothing. For a smaller example with two men and one woman WM□M□ collapses into WMM, meanwhile □MWM□ collapses into MWM and □M□MW collapses into MMW. And vice versa... if we started with MMW there is only one arrangement with gaps still present that this could have come from... □M□MW. The same can be said to be true for the larger original problem. – JMoravitz Sep 17 '20 at 17:46
• – sammy gerbil Sep 18 '20 at 17:23