# What is the distribution of the number of boys standing between the leftmost girl and the rightmost girl?

$$10$$ Boys and $$10$$ Girls get ordered in a line. How is $$X$$, the number of boys standing between the leftmost girl and the rightmost girl, distributed?

I tried thinking of selecting one place from the $$20$$ for the leftmost girl, and then selecting k places from the $$19$$ left for the boys. Or selecting one place from the $$19$$ left for the rightmost girl. I can't figure how to solve this.

Any help is appreciated.

• Consider the possible number of positions between the leftmost girl and rightmost girl. Jun 26 at 9:53

The total number of placements is $$\binom{20}{10}$$. The number of placements with $$n$$ boys between the outermost girls is $$(11-n)\binom{8+n}8$$, namely $$11-n$$ ways for the pair of outermost girls to be placed, and $$\binom{8+n}8$$ ways to place the remaining $$8$$ girls in the places in between. So the distribution is given by those numbers for $$n=0,\ldots,10$$ over a common denominator of $$\binom{20}{10}=184756$$. The respective numerators are $$11,90,405,1320,3465,7722,15015,25740,38610,48620,43758$$ and indeed their sum is $$184756$$.

• Why is it okay to think only about positioning the girls? Is it because for the boys we pick n places from n? Jun 27 at 6:38
• @topzeramail Once you know which positions are occupied by girls, those at the remaining positions must be boys; there is no choice (or more precisely, just one possible choice) left. I guess this glosses over the possibility of non-binary kids, but that omission is more or less enshrined in the question. Jun 27 at 10:20
• What is a "non-binary kid"? Jun 27 at 11:44
• @John_Krampf A kid that does not identify itself with either the (pure) female or male gender Jun 27 at 11:53
• Is this an American thing? I never heard of them before Jun 27 at 14:04

Between the leftmost girl and the rightmost girl are always 8 girls plus $$0$$ to $$10$$ boys.

Now:

• If there is no boy between them, the group of $$\color{red}{10}$$ girls may be in 11 different configurations:

[GGGGGGGGGG]bbbbbbbbbb
b[GGGGGGGGGG]bbbbbbbbb
...
bbbbbbbbbb[GGGGGGGGGG]

• If there is 1 boy, the group from the leftmost girl to the rightmost girl will have $$\color{red}{11}$$ members, and there are only 10 different places for the group as a whole, for example

bb[GGGGGGbGGGG]bbbbbbb


On the other hand, every of 10 possible locations may have that 1 boy in 9 different positions inside a group, so there are 10 × 9 = 90 possibilities.

• If there are 2 boys, the group from the leftmost girl to the rightmost girl will have $$\color{red}{12}$$ members, and there are only 9 different places for the group as a whole.

But every of 9 possible locations may have those 2 boys in $$\binom{10} 2$$ = 45 different positions inside a group, so there are 9 × 45 = 405 possibilities.

So the distributions of boys between the leftmost and the rightmost girl is for now:

Boys Occurrences
0 11
1 90
2 405

And you may continue ...

• The boys cannot be at an outermost position in the group. Jun 26 at 12:10
• @MarcvanLeeuwen, thank you very much, you are right, I corrected my answer. Jun 26 at 12:15