Back

Question: 2017 Fall Final - 3

Author: Michiel Smid
Consider strings consisting of 40 characters, where each character is one of the letters $a$, $b$, and $c$. Such a string is called cool if
  • it contains exactly 8 many $a$'s
or
  • it contains exactly 7 many $b$'s.
How many cool strings are there?
(a)
$ {{40 \choose 8} \cdot 2^{32} + {40 \choose 7} \cdot 2^{33}}$
(b)
$ {{40 \choose 8} \cdot 2^{32} + {40 \choose 7} \cdot 2^{33} - {40 \choose 15} \cdot {15 \choose 8}} $
(c)
$ {{40 \choose 8} \cdot 2^{32} + {40 \choose 7} \cdot 2^{33} - {40 \choose 15} \cdot {15 \choose 8} \cdot 2^{25}} $
(d)
None of the above.