In how many ways can three boys and four girls occupy seven seats in a row if
a. A girl and a boy occupy the end seats
b. If the four girls must sit together
For the part a
The probability that a boy and a girl occupy the end seats. The boy and the girl can seat in $2!$ ways, and the other $5$ people can occupy the rest seat in $5!$ ways ... $$= 2! \times 5! = 2 \times 1 \times 5 \times 4 \times 3 \times 2 \times 1 = 240$$ ways.
This is what I think, I'm not sure
This is the way I think it should be
If the four girls must sit together.. We can first ask the boys to seat together and there are $3!$ possible ways. Since the $4$ girls must sit together, they have the following four choices for their positions. GGGGBBB or BGGGGBB or BBGGGGB or BBBGGGG Where (B) denote Boy and (G) denote Girl. Therefore, their are total of $3! \times 4 \times 4!$. So the number of ways the $4$ girls can seat together is $$= 3! \times 4 \times 4! = 3 \times 2 \times 1 \times 4 \times 4 \times 3 \times 2 \times 1 = 576$$ ways.
For this part b, someone told me the answer is $6$ but I got $576$. So please am I doing anything wrong?