easy   Probability

Boy-Girl Line

A release-checked easy problem for training Exchangeability, Counting With Indicators, Linearity of Expectation, Combinations and Permutations.

Question

$b$ boys and $g$ girls stand a line of length $b+g$ uniformly at random. Find the expected number of positions where a boy and girl stand next to each other when $b = 10$ and $g = 15$. An example with $b = 4$ and $g = 3$ is $BGGBBGB$, in which there are $4$ positions.

Practice focus

This Probability problem is tagged Exchangeability, Counting With Indicators, Linearity of Expectation, Combinations and Permutations. State the random variables and conditioning information explicitly, then check the result against boundary cases before opening hints or a solution.

Explore related collections

Reviewed questions in this area

easyBaby BoyReviewed

Probability · SIG, DE Shaw

easyBad BagelReviewed

Probability · SIG, Jane Street