# In a queue of 4 men, 6 women and 20 kids, what is the probability that all men appear before the 2nd woman?

In a queue of 4 men, 6 women and 20 kids, what is the probability that all men appear before the 2nd woman?

What will be a good way to approach this problem?

My (wrong) attempt using combinatorics
Count number of ways all 10 adults(A) can be arranged first into 2 groups (left vs right group)
Left group: must contain all 4 men and 1 woman
Right group: contains the remaining 5 women

The 20kids(K) can then be distributed among the 2 groups. Denote (left group, right group)
Below are the different ways K can be chosen and distributed, with permutation in each group accounted for.
Case1: (20K & 5A, 0K & 5A) = 20C20 x 25! x 5!
Case2: (19K & 5A, 1K & 5A) = 20C19 x 24! x 6!
Case3: (18K & 5A, 2K & 5A) = 20C18 x 23! x 7!
...

Then sum up all 20cases and multiply by 6, since the woman in left group could have been any of the 6 women. However, there's definitely overcounting - eg. case1 and case2 both counts the arrangement where all 20K are in the center (queue looks like this: 5A 20K 5A)

• edited the question to include my attempt, but its definitely wrong... Commented Jul 23 at 4:01
• I think the simplest calculation is to consider of the 5 adults who have not passed through the line yet, what is the probability that they are all women. Commented Jul 23 at 4:20
• Zero, if the men have been brought up to let women and children go first. (I am only half joking, these math exercises should explicitly state assumptions. If they don't then students will wrongly assume those assumptions as always given and blindly apply them to real world problems where they are clearly wrong.) Commented Jul 23 at 13:01
• @user2705196 Actually I had the opposite thought - 1 - because it said it's a queue and listed the men first in the queue assignment, implying that the queue order is exactly as stated: 4 men, followed by 6 women, followed by 20 kids. Commented Jul 23 at 14:08

The positions of the children are irrelevant. What matters here are the relative positions of the men and women.

In any arrangement, of the $$10$$ positions occupied by the four men and six women, men must occupy four of the first five positions in order for all four men to appear before the second woman. Hence, the probability that all four men appear before the second woman is $$\frac{\dbinom{5}{4}}{\dbinom{10}{4}}$$

• As an intelligent layperson who wants to brush up on math, I can't read that math and I don't know how to punch it into my calculator. Can you explain how to read this out loud and then expand it and provide the final answer? Commented Jul 24 at 23:19
• @GabrielStaples The notation $\binom{n}{k}$, read "$n$ choose $k$", is the number of ways of selecting a subset with $k$ elements from a set with $n$ elements. It is given by the formula $$\binom{n}{k} = \frac{n!}{k!(n - k)!}$$ where $n!$, read "$n$ factorial", is the number of ways to arrange $n$ objects in order. Please see these links on factorials and combinations for more information. In this problem, $$\frac{\binom{5}{4}}{\binom{10}{4}} = \frac{\frac{5!}{1!4!}}{\frac{10!}{4!6!}} = \frac{1}{42}$$ Commented Jul 25 at 0:00
• Awesome! Thank you. Will you put that comment into your answer? Commented Jul 25 at 0:02
• @GabrielStaples I am going to leave my answer as it stands. However, perhaps a more detailed calculation would be helpful. For a positive integer $n$, $n!$ is the product of the first $n$ positive integers. Therefore, $$\frac{\binom{5}{4}}{\binom{10}{4}} = \frac{\frac{5!}{1!4!}}{\frac{10!}{4!6!}} = \frac{5!}{1!4!} \cdot \frac{4!6!}{10!} = \frac{5!}{1!} \cdot \frac{6!}{10!} = \frac{5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{1} \cdot \frac{6!}{10 \cdot 9 \cdot 8 \cdot 7 \cdot 6!} = \frac{5}{10 \cdot 3 \cdot 7} = \frac{1}{42}$$ Commented Jul 25 at 0:13

We can ignore children. We have 4 men and 6 women to queue.

The property "all men appear before the 2nd woman" is equivalent to "the last 5 positions in the queue are taken by women".

So, we can compute the probability of placing women in the last 5 positions. The last person is a woman with probability $$6/10$$. The next-to-last person is a woman with probability $$5/9$$ (remember we already placed one). And so on. We then get

$$\dfrac{6}{10} \cdot \dfrac{5}{9} \cdot \dfrac{4}{8}\cdot \dfrac{3}{7} \cdot \dfrac{2}{6} = \dfrac{1}{42}$$

Since probability has been asked for, a solution directly using probability

Considering the queue of $$6$$ women, to place the first man, there are $$2$$ permitted slots out of $$7$$ available, $$\color{blue}{\square }W \color{blue}{\square} W\color{red}{\square} W\color{red}{\square} W\color{red}{\square} W\color{red}{\square} W\color{red}{\square}$$
and each further placement increments permitted and available slots by $$1$$,

thus $$Pr = \Large\frac27\frac38\frac49\frac5{10}= \frac1{42}$$

with the children placed any which way.

Start by lining the women up in an arbitrary order (left to right). Now, fill in the men. In order for all the men to be left of the second woman, using stars and bars, we are looking for the number of ways for $$2$$ non-negative integers to add up to $$4$$. This can be done in $$5$$ ways.

The total number of ways to fill in the men can be also be found via stars and bars. We are looking for the number of ways for $$7$$ non-negative integers to add up to $$4$$. This is the same as the number of ways for $$7$$ positive integers to add up to $$11$$, which is done in $$\binom{11 - 1}{7 - 1} = \binom{10}{6}$$ ways.

Once the men and women have been arranged, the children can be filled in without restrictions. The desired probability is therefore

$$\frac{5}{\binom{10}{6}} = \boxed{\frac{1}{42}}$$

• Maybe I am missing something, but why does placing all men to the left of the second woman equate to the number of ways for 2 non-negative integers to add up to 4? Commented Jul 23 at 18:56
• @LateGameLank There are $4$ men, and we are choosing how many men to put left of the first woman, and how many to put between the first and second women. Actually, we can just enumerate them: $4 + 0$ (all men left of all women), $3 + 1$, $2 + 2$, $1 + 3$, $0 + 4$ (all men between first and second women). Commented Jul 23 at 20:14

Since the placement of the children does not matter, we can simply exclude them.

There are 5 ways for the ordering to fit the constraints:

WMMMMWWWWW
MWMMMWWWWW
MMWMMWWWWW
MMMWMWWWWW
MMMMWWWWWW


However, the figure of 5 excludes swaps between members of the same groups. Including this variation, the total amount of orderings fitting the constraints is actually $$5\times4!\times6!$$.

There are $$(4+6)!$$ total orderings, so the probability is thus

$$\frac{5\times4!\times6!}{(4+6)!}=\frac{5\times4!\times6!}{10!}=\frac{86400}{3628800}=\frac{1}{42}\approx2.38\%$$