Back

Solution: 2017 Winter Midterm - 3

Author: Michiel Smid

Question

Let $b \geq 1$ and $g \geq 1$ be integers. Consider $b$ boys and $g$ girls. How many ways are there to arrange these kids on a line such that the leftmost kid is a girl or the rightmost kid is a boy?
(a)
$(b+g)! - b \cdot (b+g-1)! -\ $ $ g \cdot (b+g-1)!$
(b)
$g \cdot (b+g-1)! + b \cdot (b+g-1)!\ -$ $ b \cdot g \cdot (b+g-2)!$
(c)
$g \cdot (b+g-1)! + b \cdot (b+g-1)!\ -$ $ b \cdot g \cdot (b+g-1)!$
(d)
$(b+g)!$

Solution

We can break this down into 2 cases:

A = the leftmost kid is a girl

There are $ g $ ways to choose the leftmost kid: $ g $

There are $ (b+g-1)! $ ways to arrange the remaining kids:

B = the rightmost kid is a boy

There are $ b $ ways to choose the rightmost kid: $ b $

There are $ (b+g-1)! $ ways to arrange the remaining kids

$ A \cap B = $ the leftmost kid is a girl and the rightmost is a boy

There are $ g $ girls to choose to be the leftmost kid and $ b $ boys to choose to be the rightmost kid: $ g \cdot b $

There are $ (b+g-2)! $ ways to arrange the remaining kids

$ |A \cup B| = |A| + |B| - |A \cap B| $

$ |A \cup B| = g \cdot (b+g-1)! + b \cdot (b+g-1)! - g \cdot b \cdot (b+g-2)! $