$36 \cdot 28$ There are 7 boys and 13 girls standing in a row, let $S$ be the number of positions where a boy and a girl are adjacent, for example, the arrangement $G B B G G G B G B G G G B G B G G B G G$ has $S=12$, then the average value of $S$ is closest to (considering all 20 positions)
(A) 9 .
(B) 10 .
(C) 11 .
(D) 12 .
(E) 13 .
(40th American High School Mathematics Examination, 1989)
[Solution] Clearly, $S_{\text{min}}=1, S_{\text{max}}=14$, which correspond to
BBBBBBBGGGGGGGGGGGGG,
GBGBGBGBGBGBGBGGGGGG.

For convenience, let boys be represented by “+” and girls by “-”. The problem then becomes finding the average number of sign changes in a sequence of 7 “+”s and 13 “-”s.

When $S=1$, it is equivalent to the arrangement problem of dividing the “+”s and “-”s into segments, with “+-” and “-+” (here, “+-” represents a segment) being the two possibilities, i.e., there are $2 C_{12}^{0} C_{6}^{0}$ ways. Let $\sigma_{1}=2 C_{12}^{0} C_{6}^{0}$;
When $S=2$, it is equivalent to the following two scenarios:
+-+ or -+ (here, “+-” represents a segment), i.e., dividing the “+”s into 2 groups and the “-”s into 1 group, or dividing the “-”s into 2 groups and the “+”s into 1 group.
At this time, $\sigma_{2}=C_{12}^{1} C_{6}^{0}+C_{6}^{1} C_{12}^{0}$,
Similarly,
$$
\begin{array}{ll}
\sigma_{3}=2 C_{12}^{1} C_{6}^{1}, \quad \sigma_{4}=C_{12}^{2} C_{6}^{1}+C_{6}^{2} C_{12}^{1}, & \sigma_{5}=2 C_{12}^{2} C_{6}^{2}, \\
\sigma_{6}=C_{12}^{3} C_{6}^{2}+C_{6}^{3} C_{12}^{2}, \quad \sigma_{7}=2 C_{12}^{3} C_{6}^{3}, & \sigma_{8}=C_{12}^{4} C_{6}^{3}+C_{6}^{4} C_{12}^{3}, \\
\sigma_{9}=2 C_{12}^{4} C_{6}^{4}, \quad \sigma_{10}=C_{12}^{5} C_{6}^{4}+C_{6}^{5} C_{12}^{4}, & \sigma_{11}=2 C_{12}^{5} C_{6}^{5}, \\
\sigma_{12}=C_{12}^{6} C_{6}^{5}+C_{6}^{6} C_{12}^{5}, \quad \sigma_{13}=2 C_{12}^{6} C_{6}^{6}, & \sigma_{14}=C_{12}^{7}, \\
\bar{S}=\frac{\sum_{k=1}^{14} k \sigma_{k}}{\sum_{k=1}^{14} \sigma_{k}}=9 .
\end{array}
$$

Therefore, the answer is $(A)$.