Back

Question: 2017 Fall Final - 4

Author: Michiel Smid
Consider strings consisting of 40 characters, where each character is one of the letters $a$, $b$, and $c$. How many such strings contain at least three $a$'s?
(a)
${40 \choose 3}$
(b)
$3^{40} - 1 - 40 \cdot 3^{39} - {40 \choose 2} \cdot 3^{38}$
(c)
$3^{40} - 2^{40} - 40 \cdot 2^{39} - {40 \choose 2} \cdot 2^{38} -$ $ {40 \choose 3} \cdot 2^{37}$
(d)
$3^{40} - 2^{40} - 40 \cdot 2^{39} - {40 \choose 2} \cdot 2^{38}$