# Number of ways in which four boys and four girls sit alternately in a row and one boy and one girl are not to sit in adjacent seats

Find the number of ways if four boys and four girls sit alternately in a row and one boy and one girl are not to sit in adjacent seats.

I tried to get number of possible ways to sit alternately which was $4! 4! 2!$, but I could not figure out in how many ways some boy and some girl not to sit next to each other.

• do you mean one particular boy and one particular girl are not supposed to be next to each other? Commented Jun 15, 2015 at 8:32
• yes I meant that :) Commented Jun 15, 2015 at 8:34
• Since this is a site that encourages and helps with learning, it is best if you show your own ideas and efforts in solving the question. Can you edit your question to add your thoughts and ideas about it?
– 5xum
Commented Jun 15, 2015 at 8:35
• I posted my try Commented Jun 15, 2015 at 8:40
• are the people labelled?
Commented Jun 15, 2015 at 21:56

First the special boy takes a seat at his will. His choice then also determines which seats are for boys and which are for girls. He can choose an end seat in $2$ ways, leaving three admissible seats for the special girl, or an interior seat in $6$ ways, which leaves two admissible seats for the special girl. So there are $2\cdot 3+6\cdot 2=18$ ways to seat the special pair. The rest of the people can then be seated in $3!\cdot 3!=36$ ways on the remaining seats, making a total of $18\cdot36=648$ possibilities.

• If the particular boy sits at the end of the row, then the girl must sit next to him, giving $2 + 6 \cdot 2 = 14$ ways to sit the special pair and $14 \cdot 36 = 504$ seating arrangements in which the particular boy and particular girl sit next to each other, which agrees with the $7 \cdot 2 \cdot 3! \cdot 3!$ excluded seating arrangements that I found. Commented Mar 26, 2016 at 14:46
• @N.F.Taussig: According to the title and the text of the question the two special people shall not sit in adjacent seats. Commented Mar 26, 2016 at 14:51
• I misunderstood what you were counting. I thought you were counting the excluded cases when in fact you were counting the permissible seating arrangements. Commented Mar 26, 2016 at 14:54

Since there are $4!$ ways to arrange the boys, $4!$ ways to arrange the girls, and either a boy or a girl sits in the leftmost seat, the total number of ways in which four boys and four girls can sit in alternate seats is $4!4!2!$, as you determined.

We wish to eliminate those arrangements in which the particular boy and particular girl sit next to each other. There are seven pairs of seats in which the particular boy and girl could sit next to each other since the person who sits on the left must sit in one of the first seven seats. There are two ways in which they could sit in those seats, depending on whether the boy or girl is in the leftmost seat of that pair. Once the particular boy and girl have sat down, there are three seats in which the boys can sit down (since the boys and girls must alternate), and $3!$ ways in which the boys can sit in those seats. Likewise, there are $3!$ ways in which the remaining girls can sit in the three seats that are available to them. Thus, the number of arrangements in which the particular boy and particular girl sit next to each other is $7 \cdot 2 \cdot 3! \cdot 3!$.

Hence, the number of seating arrangements in which four boys and four girls sit in alternate seats but a particular boy and particular girl do not sit in adjacent seats is $4!4!2! - 7 \cdot 2 \cdot 3! \cdot 3!$.

• There are seven pairs of seats they could sit at, including second and third. Commented Mar 26, 2016 at 14:21
• I just noticed that. I will edit. Commented Mar 26, 2016 at 14:22