[Math] counting how many ways boys and girls can sit together

combinatorics

We would like to count how many ways 3 boys and 3 girls can sit in a
row.
How many ways can this be done if:

(b) all the girls sit together?
Since all the girls must sit together, we treat the girls as a single unit. Then
we have 4 people to arrange with 3! positions for 3 girls for a total of 4!3!
ways to arrange them.

Best Answer

Another way is to observe, as you did, that there are $4$ legal arrangements of the letters $b$ and $g$. For each of these arrangements, the boys can be placed in $3!$ ways, and for each of these placements, the girls can be arranged in $3!$ ways, for a total of $(4)(3!)(3!)$.

That way of thinking about things might be useful if instead we want, for example, the number of arrangements that have a girl at each end.