# counting how many ways boys and girls can sit together

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.

-
You’re forgetting that the girls can sit in $3!$ different orders within their block. – Brian M. Scott Jan 27 '13 at 0:53
The $4$ is what gave rise to your $4!$. – André Nicolas Jan 27 '13 at 0:56
thanks brian, i got it. 3! is the different ways the girls can sit next to each other since they are all different individuals – user59795 Jan 27 '13 at 0:57

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!)$.
There are $4!$ ways to arrange the four blocks, where each boy is one block, and the three girls together are the fourth block. Once you’ve done that, you can arrange the $3$ girls in $3!$ different orders within their block. Thus, for each arrangement of the blocks you get $3!$ arrangements of the people, for a total of $4!3!$ arrangements of the people.