Problem:
Suppose that 7 boys and 13 girls line up in a row. Let S be the number of places in the row where a boy and a girl are standing next to each other. For example, for the row GBBGGGBGBGGGBGBGGBGG we have S=12. The average value of S (if all possible orders of these 20 people are considered) is closest to
Answer Choices:
A. 9
B. 10
C. 11
D. 12
E. 13
Solution:
Suppose that John and Carol are two of the people. For i=1,2,β¦,19, let Jiβ and Ciβ be the numbers of orderings (out of all 20!) in which the ith and (i+1)nt persons are John and Carol, or Carol and John, respectively. Then Jiβ=Ciβ=18! is the number of orderings of the remaining persons.
For i=1,2,β¦,19, let Niβ be the number of times a boy-girl or girl-boy pair occupies positions i and i+1. Since there are 7 boys and 13 girls, Niβ=7β
13β
(Jiβ+Ciβ). Thus the average value of S is
20!N1β+N2β+β¦+N19ββ=β20!19[7β
13β
(18!+18!)]β=1091β.β
OR
In general, suppose there are k boys and nβk girls. For i=1,2,β¦,nβ1 let Aiβ be the probability that there is a boy-girl pair in positions (i,i+1) in the line. Since there is either 0 or 1 pair in (i,i+1),Aiβ is also the expected number of pairs in these positions. By symmetry, all Aiβ's are the same (or note that the argument below is independent of i). Thus the answer is (nβ1)Aiβ.
We may consider the boys indistinguishable and likewise the girls. (Why?) Then an order is just a sequence of k Bs and nβk Gs. To have a pair at (i,i+1) we must have BG or GB in those positions, and the remaining nβ2 positions must have kβ1 boys and nβkβ1 girls. Thus there are 2(kβ1nβ2β) sequences with a pair at (i,i+1). Since there are (knβ) sequences,
answer =(nβ1)Aiβ=(knβ)(nβ1)2(kβ1nβ2β)β=n2k(nβk)β.
In our case, the answer is 202β
7β
13β=1091β.