Back

Solution: 2015 Winter Midterm - 17

Author: Michiel Smid

Question

In order to celebrate that the COMP 2804 midterm went well, you go to your neighborhood pub. This pub has 16 different beers on tap:
  • There are 7 beers of the pilsner type.
  • There are 5 beers of the India pale ale type.
  • There are 4 beers of the German wheatbeer type.
You order 4 different beers with at least one beer of each type. What is the number of ways in which you can do this? (The order in which you order the beers does not matter.)
(a)
${16 \choose 4} - {7 \choose 3} - {5 \choose 3} - {4 \choose 3}$
(b)
${16 \choose 4}$
(c)
${7 \choose 2} \cdot 5 \cdot 4 + 7 \cdot {5 \choose 2} \cdot 4 + 7 \cdot 5 \cdot {4 \choose 2}$
(d)
None of the above.

Solution

We can grab 2 pilsner beers, 1 India pale ale beer, and 1 German wheatbeer beer.

$\binom{7}{2} \cdot 5 \cdot 4$

We can also grab 1 pilsner beer, 2 India pale ale beers, and 1 German wheatbeer beer.

$7 \cdot \binom{5}{2} \cdot 4$

We can also grab 1 pilsner beer, 1 India pale ale beer, and 2 German wheatbeer beers.

$7 \cdot 5 \cdot \binom{4}{2}$

Thus, the total number of ways is $\binom{7}{2} \cdot 5 \cdot 4 + 7 \cdot \binom{5}{2} \cdot 4 + 7 \cdot 5 \cdot \binom{4}{2}$