TITLE: Number of ways in which $5$ boys and $5$ girls are ordered in such a way that exactly $4$ girls stand consecutively in the queue
QUESTION [8 upvotes]: Let $n$ be the number of ways in which $5$ boys and $5$ girls can stand in a queue in such a way that all the girls stand consecutively in the queue. Let $m$ be the number of ways in which $5$ boys and $5$ girls in such a way that exactly $4$ girls stand consecutively in the queue. Then find $\frac{m}{n}$.

I could find $n$ correctly as $6!\times 5!$, but I am finding $m$ as $7!\times 4!\times \binom{5}{1}$, but the book says $m$ is $6!\times 4!\times 5\times \binom{5}{4}$. Where have I gone wrong? What is the proper logic to find $m$?

REPLY [5 votes]: You can line up the boys in $5!$ ways.
Next choose one of the $6$ gaps for the $4$ girls who are together.
Then choose the $4$ girls and arrange them in order, which can be done in $\binom{5}{4}4!=5!$ ways.
Finally, choose one of the $5$ gaps left for the remaining girl.

This gives $5!\cdot6\cdot5!\cdot5=5!\cdot6!\cdot5=432,000$ possibilities.