I'm having trouble with the following problem.
Consider a random arrangement of $20$ boys and $16$ girls in a line. Let $X$ be the number of boys with girls on both sides. Let $Y$ be the number of girls with boys on both sides. Find $E(X+Y)$.
Any help would be greatly appreciated.
P.S. Here $E(\cdot)$ denotes expectation. For a discrete random variable $Z$ that takes the values $z_1,z_2,\ldots,z_n$ with the corresponding probabilities $p_1,p_2,\ldots,p_n$, the expectation of $Z$ is defined as $E(Z)=\sum_{i=1}^n z_ip_i$.