Boy–girl neighbors in a line

1515 boys and 1010 girls line up in a uniformly random order. What is the expected number of adjacent positions occupied by a boy and a girl (in either order)?

Show hints (2)+
  1. There are 2424 adjacent pairs; use linearity of expectation.
  2. A pair is mixed (BG or GB) with probability 215251024=122\cdot\tfrac{15}{25}\cdot\tfrac{10}{24}=\tfrac12.

Answer

Reveal answer →

12

Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.

Asked at: Jane Street, Two Sigma

Related questions