# in a mountain climbing expeditions 5 men and 7 women are to walk

in a mountain climbing expeditions 5 men and 7 women are to walk single file so that no 2 men are adjacent. How many ways are possible?

• This is combinatorics not statistics, consider revising your tag – HBeel Jan 11 '15 at 12:23
• @Henry, I have changed the tag. – FundThmCalculus Jan 11 '15 at 12:35
• I thought that walking in a single file no two people are ever adjacent. – Marc van Leeuwen Jan 11 '15 at 12:42
• I think OP means next to each other in the line – HBeel Jan 11 '15 at 12:47
• @Henry: I think you meant behind each other. How English is difficult! – Marc van Leeuwen Jan 11 '15 at 12:50

Arrange the women in a line, in $7!$ ways. The $5$ men now each have to choose one of the eight possible positions: between, in front, or behind the women, this in $A_8^5$ ways. We get

$$7! \cdot \frac{8!}{3!}= 33,868,800$$

ways.

Compare this with the number of all the orderings $$12! = 479,001,600$$

The ratio of these numbers is $\frac{7}{99}=0.07070707\ldots$,

There are $7!$ permutations of the women and $5!$ permutations of the men, so for every valid placement we get $7!5!=604800$ different solutions; I will count placements, and multiply by that factor if that is intended.

After lining up, the $7$ women delimit $8$ spaces (among which two at the ends). The $5$ men must occupy a subset of those spaces, for $\binom85=56$ possibilities.

It is not fully clear from the problem if the sequences are unique or not, so I'll explain both:

1) All sequences are unique. In this case we need to account for every MF sequence (12! total). First, we fix the positions of F: 7!, since all women are different. We have 8 gaps in the sequence, every 'gap' can be filled by anything between 0 and 5 men. A better way of looking at it is by considering 5 'slots' (mean), and each slot takes any value between 1 and 8 (since we can put a man in any gap), so there are $8^5$ of allocating men, but we do not want 2 men in 1 gap, so clearly there are $\frac{8!}{3!}$ ways for this. Putting it all together, there are $\frac{7!8!}{3!}$ unique sequences.

2)All sequences are the same. In this case we have only 1 sequence for women (or $\frac{7!}{7!}$ if you want) and the number of allocations for men is differnt only in the selected gaps, so we need to divide $\frac{8!}{3!}$ through $5!$, hence the solution is $\binom{8}{3}$.

• It is not clear what you mean by sequences being unique or the sqme. Certainly all sequences are not the same. – Marc van Leeuwen Jan 12 '15 at 11:22
• are sequences $M_1 F_1 M_2$ the same as $M_2 F_1 M_1$? – Alex Jan 12 '15 at 12:18