# How many ways are there …

There are $$n$$ women and $$n$$ men, where $$n$$ is divisible by 3. We want to divide them into groups of 3 members, but three men can't form a group, and three women can't form a group. Only groups of two women and a man, or of two men and a women are allowed. How many ways are there to do this?

• Starting point: there must be the same number of groups no training 2 men and 1 woman as there are containing 2 women and 1 man. Have you tried doing this for say $n=6$? – JavaMan Dec 21 '18 at 14:56
• Hello and welcome to math.stackexchange. This is a nice question., What have you done so far? Can you find answers for $n=3, 6, 9$? – Hans Engler Dec 21 '18 at 14:57
• Here are some steps that might help: Every group is a man-woman pair plus a third person of either gender. So work out the number of groups, start by working out the number of ways to form a pair plus third person, ie let $3k=n$ and you choose $2k$ men, $2k$ women, then pair them up into $2k$ pairs. Now distribute the remaining $2k$ people between the groups. Finally, decide how many times you have over counted. – Dan Robertson Dec 21 '18 at 15:03

Let $$n=3m$$. Then there will be $$m$$ groups containing one man and two women, and there will be another $$m$$ groups containing one woman and two men. The $$m$$ single men, as well as the $$m$$ single women, can be chosen in $${3m\choose m}$$ ways each. When these choices have been made each of the $$m$$ single men can choose two of the remaining $$2m$$ women in totally $$N_m={2m\choose2}{2m-2\choose2}\cdots{2\choose 2}={(2m)!\over 2^m}$$ ways, and similarly each of the $$m$$ single women can choose two of the remaining $$2m$$ men in $$N_m$$ ways. It follows that the total number $$N$$ of admissible partitions into $$(2+1)$$-groups is given by $$N=\left({3m \choose m}{(2m)!\over 2^m}\right)^2=\left({n!\over m!\cdot 2^m}\right)^2\ .$$
We say a biased group is a pair of man and woman, along with a third person, written $$((m,w),p)$$. How many biased groups are there?
Let $$3k=n.$$ then choose $$2k$$ men. There are $$\binom n {k}$$ ways to do it. And choose $$2k$$ women: $$\binom n {k}$$ ways. Then for each man choose a woman, $$(2k)!$$ ways. Finally for each pair, choose a third person, $$(2k)!$$ ways. So there are $$(\binom n k(2k)!)^2 = \left({n!\over k!}\right)^2$$ biased groupings.
How many different biased groups are there for each group? Well there is one gender twice and one of those people can go in the first pair with the other as the third person. So each group corresponds to two biased groups. So $$2k$$ groups can be made out of $$2k$$ biased groups in $$2^{2k}$$ ways.
So the final answer is $$\frac{(n!)^2}{(k!)^24^k}$$