# 4 Boys & 4 Girls are to be seated in a line find number of ways , so that Boys & Girls are in alternate seats.

4 Boys & 4 Girls are to be seated in a line find number of ways , so that Boys & Girls are in alternate seats.

My approach:

If boys are seated in B$1$,B$2$,B$3$,B$4$ positions than at each gap between two consecutive boys a girl can sit so, there will be C$(5,4)$ ways for girls and they can be arranged in C$(5,4)$ *4! and boys too can be arranged in 4! so total number of ways are C$(5,4)$ *4! *4!

But in textbook it's answer is 2*4!*4!

Please note: I am just a high school student . So,please don't close my question.

One of the $C(5,4)$ ways you count to seat the girls fills gaps 1,3,4,5. But then boys B1 and B2 are seated next to each other, so boys and girls don't alternate. So there are not $C(5,4)$ ways to choose the spots for girls.

• Sir I didn't got " the girls fills gaps 1,3,4,5" according to me they will fill like GBGBGBGB OR BGBGBGBG Aug 20, 2018 at 15:55
• Please explain sir if I wrong because I am new to this chapter ,,,,,,and this chapter is killing me............It's too difficult Aug 20, 2018 at 15:58
• @jamesamjoe And that is exactly why you should have $2$ instead of $C(5,4)=5$. When you count $C(5,4)$, then $GBBGBGBG$ is one of those five possibilities. Aug 20, 2018 at 15:58
• @jamesamajoe You have identified five gaps (before B1, between B1 and B2, etc.) and are choosing four to designate as girls' seats. Suppose the chosen four are the first, third, fourth, and fifth (i.e., all but between B1 and B2). Then the seating is G B1 B2 G B3 G B4 G, i.e., GBBGBGBG, which does not alternate. Aug 20, 2018 at 15:58

Look at it this way, we have$$BGBGBGBG$$

We have $4$ ways for first boy, $4$ ways for first girl, $3$ ways for second boy, $3$ ways for second girl, and so on.

So we have $$4*4*3*3*2*2*1*1 = 4!*4!$$

But note that we could have also started with the pattern $$GBGBGBGB$$ so we need to double our previous answer, giving the desired result.

Edit: The original answer you found was number of ways only girls were not sitting next to each other. For your method to work, you need to complete an additional step where you subtract number of ways that girls aren't sitting next to each other but some of the boys are.

To find this number, note that girls must be on both ends of the line. So now we fill up our holes: $$GB\_ GB \_ GB\_ G$$ We have $3$ slots to choose for the last remaining boy. Therefore the number of ways girls are alternating but boys are touching is $C(3,1) = 3$ (and don't forget your permutations of these $3$ arrangements) So our new answer would be:

$$C(5,4) *4!*4! - C(3,1) *4!*4!$$ $$= 5*4!*4! - 3*4!*4!$$ $$=(5-3)*4!*4!$$ $$=2*4!*4!$$ Personally I feel this is a longer and slightly more complicated way to solve this problem, but it shows that your method does work if you include the extra step to correct it

• yepp!!! I got it but i want to know what mistake I had done Aug 20, 2018 at 15:51
• Essentially what the answer above provided, the binomial coefficient out front shouldn't be C(5,4) Aug 20, 2018 at 15:52