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

The logic of $7!\times4!\times\binom{5}{1}$ if clearly flawed. It also contains instances in which 5 girls were standing consecutively which is in contradiction with the demand of the question.

So, we can't do it the way you did. We have to make sure that $5$ girls do not stand consecutively in the queue.

The first part of the task is to identify a girl which will not be in the consecutive part of the queue. This can be done in $\binom{5}{1}$ ways.

Remaining $4$ girls will be standing consecutively but they may be standing in any order. So the number of orders possible for these girls is $4!$.

We have a group of $7$ objects, $4$ girls(counted as $1$), $1$ girl and $5$ different boys. These can be permuted in $7!$ ways but we have a restriction and we have to take care of that. First of all, we'll keep $4$ girls and $1$ girl in position with the given restriction. These $2$ objects can be kept in $7$ slots in $\binom{7}{2}\times2$ ways but we have $6\times2$ positions where we don't want these two groups to sit. SO the total no. of ways in which these $2$ groups can sit is:- $\binom{7}{2}\times2 - 6\times2 = 6\times5$. Now the remaining 5 boys can sit in 5 slots in $5!$ ways.

Hence the value of $m$ is $\binom{5}{1}\times4!\times6\times5\times5!$. This explains the answer you found in the book.


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

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