Problem 1.1 Easy Free

Boys and Girls Alternating

Five boys and five girls sit in a row of ten seats. The seating is arranged so that no two children of the same sex are adjacent. In how many ways can the row be seated?

Work it out, then compare with the answer.

SolutionShow the worked solution

Read the row from left to right. No two children of the same sex may be adjacent, so the sexes must alternate. With five of each in ten seats, the row is therefore either BGBGBGBGBGBGBGBGBGBG or GBGBGBGBGBGBGBGBGBGB. That gives exactly 22 patterns. In the first, the boys occupy seats 1,3,5,7,91,3,5,7,9; in the second, they occupy seats 2,4,6,8,102,4,6,8,10.

Fix a pattern. The five boys can be placed in their five seats in 5!5! ways. Independently, the five girls can be placed in theirs in 5!5! ways. Hence

2⋅5!⋅5!=2⋅120⋅120=28800.2\cdot 5!\cdot 5! = 2\cdot 120\cdot 120 = 28800.
28800\boxed{28800}

Generalisation. With nn boys and nn girls the count is 2 (n!)22\,(n!)^2. With n+1n+1 boys and nn girls, the boys must take both ends, so there is only one pattern and the count is (n+1)! n!(n+1)!\,n!.