# Combinatorics permutation problem

This is the problem in question:

Suppose $$18$$ different people are standing in line waiting for the grand opening of IKEA. There are $$6$$ men, $$8$$ women, and $$4$$ children. In how many ways can they line up if the first woman appears ahead of the first child?

I am thinking of creating a woman-child object, which can be done $$8 \cdot 4$$ ways. Then, place the remaining $$7$$ women and $$3$$ children to the right of that object. Finally, place the men into the slots. What I am having trouble with is determining how to represent placing $$7$$ women and $$3$$ children to the right of the object.

$$8 \cdot 4$$ ways to create the woman-child object.

$$11!$$ ways to arrange $$7$$ women and $$3$$ children.

Do I divide $$11!$$ by $$2$$? Will that means they must appear on one side?

• This tutorial explains how to typeset mathematics on this site. Oct 23, 2018 at 13:22

Choose one of the $$8$$ women and treat her as fixed "first woman", then freely arrange the remaining $$7$$ women and $$4$$ children behind her in any of the $$11!$$ possible ways. Then, finally, put the men anywhere you want in/around this arrangement. Place the men in one by one. There are $$13$$ slots for the first man, and then $$14$$ for the second man (think of the first man as effectively splitting his slot in $$2$$, as, if you put the second man in that slot, you have to choose whether to put him before or after the first man) and so on. Then the answer, by my reckoning, is

$$8 \cdot 11! \cdot \left(13 \cdot 14 \cdot \ldots \cdot 18\right) = 8 \cdot 11! \cdot \frac{18!}{12!}.$$

• Nice, this is a lot cleaner than my method Oct 22, 2018 at 16:37
• @kcborys Thanks! It's reassuring that we get the same answer, and it's nice to see another perspective. Oct 22, 2018 at 20:43

Not sure if there is a nice closed-form for this, but I think you can iterate over the position of the first woman. Since the first child is behind the first woman then only men can be in front of the first woman.

Suppose $$m$$ men are in front of the first woman. Then we have $$\binom{6}{m}\cdot m!$$ ways to arrange the men in front of the first woman. We have $$8$$ choices for the first woman, and then everyone else can be in any order, which gives $$(7+ 4 + (6-m))!$$ arrangements for the remaining $$7$$ women, $$4$$ children, and $$6-m$$ men.

So your answer should be $$\sum_{m=0}^{6}\binom{6}{m}\cdot m!\cdot 8\cdot (7+ 4 + (6-m))! = 4268249137152000$$

There are $$18!$$ ways to arrange the people without restriction. Since they include eight women and four children, in $$2/3$$ of these arrangements, the first woman will be to the left of the first child. Hence, the number of admissible arrangements is $$\frac{2}{3} \cdot 18!$$

• Beautiful solution! Nov 8, 2018 at 0:53