# Four boys and 4 girls are lined up in random order. What is the probability that the boys and girls alternate

Homework question and while there are very similar questions already answered my real concern is what the denominator should be in this question $8!$ or $4!$ since it is asking for the probability and not the number of possible arrangements.

The way I read it there are 8! possible ways to randomly order the boys and girls and then in the numerator there should only be two ways to alternate boys and girls??

so my answer is $2/8!$ but I'm unsure if this is correct??

• There's only two ways to alternate? – Thomas Andrews Feb 11 '15 at 23:00
• @ThomasAndrews, well I was doing b g b g b g b g or g b g b g b g b ?? Not sure what other way to get them alternated??? – jc707270 Feb 11 '15 at 23:01
• Then how do you get $8!$ different ways of ordering $bbbbgggg$? – Thomas Andrews Feb 11 '15 at 23:04
• @ThomasAndrews, ok not sure what you mean. My assumption possibly completely wrong is that the order has to be b g b g b g b g OR g b g b g b g b out of any possible random order of 4 boys and 4 girls, meaning to me at least there are 8! ways to arrange 8 people? Not sure if my question is then wrong, although it's word for word? – jc707270 Feb 11 '15 at 23:08
• Thomas is pointing out that if you say there are only two ways to alternate then you are not distinguishing one b from another, or one g from another. But if you say there are 8! ways to order them then you are distinguishing b1 from b2 from b3 from b4 and similarly for g. You can do the calculation correctly either way, but you have to pick one way for both parts: how many orderings there are, and how many of them alternate. – Colin McLarty Feb 11 '15 at 23:27

Alternatively, there are $\binom{8}{4}$ ways to chose the positions of the girls, and only $2$ ways of picking the locations so that they alternate with the boys, for a probability of $$\frac{2}{\binom{8}4}$$

• Thank you Thomas, didn't get what you were getting at until I read your answer and looked over some notes!! – jc707270 Feb 11 '15 at 23:53

There is a slight error in the reasoning, there are in fact $2\times 4!\times 4!$ ways in which they are alternated. Since there are first two choices as to which spots are occupied by the boys and which by the girls. After this there are $4!$ ways to arrange the boys and $4!$ ways to arrange the girls within their positions.

Hence we want $\frac{2\times 4!^2}{8!}=\frac{1152}{40320}$

Assuming $4$ identical boys and $4$ identical girls on a row, the number of permutations (i.e. the denominator of your ratio) is $\binom{8}{4}$. Among these ones, only two of them satisfy the requirement to be alternate boys/girls. It follows that the answer is $$\frac{2\cdot 4!\cdot 4!}{8!}=\frac{24}{35}.$$

• It doesn't actually matter if they are identical or not - the same reasoning works either way. That's a weird combinatorics distinction that has nothing to do with probability. – Thomas Andrews Feb 11 '15 at 23:03
• It was just to mean that "we cannot distiguish between boys, and between girls".. – Paolo Leonetti Feb 11 '15 at 23:04

There are $8!$ possible orderings of the eight people. If boys and girls alternate there are two cases.

Case 1: First person is a boy. In this case, there are 4 choices for the first person, 4 choices for the second person since it must be a girl, 3 choices for the 3 person, since there are 3 boys left, and so on. Continuing in this manner we see that the total number of possibilities are $(4!)^2$.

Case 2: First person is a girl. This case is similar and so there are $(4!)^2$ orders for case 2.

Therefore the probability is $2(4!)^2/8$!.