# Queue of 5 boys and 5 girls

How many permutations can happen if none of the boys stand next to each other?

Hint - perhaps it is 28800 but not quite sure.

Simpler question - calculate number of permutations when girls stand in front of boys. I think it will be 5!x5! = 14400

For the first part, will I be able to use provided solution for the following task? Black, red and white balls. There is nine of them. Find number of permutations if the same colored balls are not beside each other?

-

Hint: Suppose you are to first take out the boys, then how many permutations are there the remaining 5 girls? Once you have that, consider the arrangement $$__G__G__G__G__G__$$ You see that you have $6$ places to put the $5$ boys so there is (at least) one girl between them. So, how many ways are there to put the $5$ boys into the $6$ slots?

To finish, you will find the the answer is (the number of ways to arrange the five girls on their own) times (the number of ways to put the $5$ boys into the $6$ slots). This finishing step is an application of the so-called "fundamental counting principle".

-
This is the way I would do it too. –  Mark Bennet Aug 17 '14 at 18:20
Correct me if I am wrong. Does it mean? $$5! \times {6 \choose 6-5} = 86400$$ –  TommyLeeJones Aug 17 '14 at 18:38
@TommyLeeJones Close.. You are undercounting by a factor of $5!$ which arises from the fact that once you choose $5$ of the $6$ spots where the boys will go (your factor of ${6 \choose 6-5}$) you still need to account for the fact that different permutations of the boys result in a different arrangement. –  Tom Aug 18 '14 at 1:54

Imagine that the positions of the boys are like this: $$\text{X}\qquad \text{X}\qquad \text{X}\qquad \text{X}\qquad \text{X}$$ Where can the $5$ girls go? There are $3$ kinds of possible pattern:

$1$.) A girl at the left end, and $1$ girl between each boy;

$2$.) A girl at the right end, and $1$ girl between each boy;

$3$.) No girl at either end. Then one of the $4$ gaps between boys must have $2$ girls, and the rest $1$ girl each.

That gives a total of $6$ patterns. Multiply by $5!5!$, to take account of the fact that the girls/boys are all distinct.

Added: Note that the solution by Tom is better. For $5$ and $5$, it is somewhat more efficient. But it is far better for the problem of say $5$ boys and $12$ girls.

-