[Math] In how many ways 5 boys and 3 girls can be seated such that no two girls are together

permutations

In how many ways $5$ boys and $3$ girls can be seated such that no two girls are together?

Now I came up with a arrangement as

GBGBGBBB

Clearly, the boys can sit in $5!$ ways, but I am having a bit of trouble with girls as the third girl (prior to three B's) can also sit between last two boys and so this creates a confusion.
How do I do this?

Thanks

Best Answer

Have the $5$ boys stand in a line. This can be done in $5!$ ways. For the moment, add a boy at each end, who will be removed when we're done. Now send the $3$ girls, one at a time, to stand between two boys. The first girl has $6$ choices, the second girl will have $5$ choices, and the third girl will have $4$ choices. This gives a total of

$$5!\cdot6\cdot5\cdot4=14{,}400$$

arrangements. Remove the two extra boys, and have the others sit.

Remark: the fiction of the extra two boys is simply to avoid having to elaborate that each girl can either wedge herself between two boys or else stand next to a boy at one end or the other.