[Math] Number of ways in which they can be seated if the $2$ girls are together and the other two are also together but separate from the first two

combinatorics

$5$ boys and $4$ girls sit in a straight line. Find the number of ways in which they can be seated if $2$ girls are together and the other two are also together but separate from the first two.


I divided the $4$ girls in two groups in $\frac{4!}{2!2!}$ ways.

I counted $10$ ways in which there is at least one boy between the two girl pairs. Boys can be arranged in $5!$ ways. Total number of ways$=\frac{4!}{2!2!}\times 10\times 5!=7200$

But the answer in the book is $43200$. I don't know where I am wrong.

Best Answer

First we count the number of strings of length $7$ made up of the letters b (a single boy) and $G$ (a pair of girls) such that the two G's are not together. Write down five b's like this, with a little gap between them. $$\text{b}\qquad\text{b}\qquad\text{b}\qquad\text{b}\qquad\text{b}$$ These determine $6$ gaps, the $4$ obvious ones and $2$ endgaps. We want to choose two of these to insert the G's into. This can be done in $\binom{6}{2}$ ways.

We have found the number of "patterns." Now permute the girls, permute the boys. The number of arrangements is $\binom{6}{2}4!5!$.