# How to line up 6 men and 4 women so that only 2 women are standing next to each other

Ok, so I have to following problem that I can't seem to understand:

There are 6 men and 4 women, in how many ways can you arrange them next to each other in a line so that two and only two women are standing next to each other?

This is the way I would tackle it:

Number of ways to order the men: 6!

We then have 7 boxes/ positions that the women can occupy between the men (the bars symbolizes men):

1|2|3|4|5|6|7

That means that the first woman can choose between 7 positions, the next woman can choose between 6 positions and the third woman can choose between 5 positions. The fourth woman has to take one of these three positions that are already taken. For each of these three positions, the woman can either be in front or standing behind the other woman that is already there, meaning that she can choose between two positions for every one of these three. In other words she can choose 6 different positions. In total, this gives us:

6!*7*6*5*3*2 = 9907200. The actual solution is somehow 1814400, which is double that of mine.

• Label the women A, B, C, D, You have counted arrangements with D next to A, B, C, but not those with two of A,B,C adjacent. – almagest Dec 11 '19 at 16:25

Your idea of counting positions for the women among the men is good. You could fix it like this: Pick two of the four women, choose one of $$7$$ boxes for them, choose one of the remaining $$6$$ boxes for one of the others, and one of the remaining $$5$$ boxes for the last, and one of $$2$$ orders for the two adjacent women, for a total of $$6!\cdot\binom42\cdot7\cdot6\cdot5\cdot2=1814400$$.