Please help me with the last question on my discrete maths assignment because I can't get what I am doing wrong.
Find the number of 9 letter words using the letters P, Q, and R containing at least one P and at least two Qs.
number of $9$ letter words that use all $3$ letters $= 3^9$
$A_1 =$ number of $9$ letter words without the use of P $= 2^9$
$A_2 =$ number of $9$ letter words without the use of Q $= 2^9$
$A_3 =$ number of $9$ letter words using at least 1 Q $= 3^9 - 2^9$
$A_1 \cap A_2 = 1^9$
$A_1 \cap A_3 = 2^9 - 1$
$A_2 \cap A_3 = 0$
$A_1 \cap A_2 \cap A_3 = 0$
number of words using at least 1 P and at least 2 Qs $$= 3^9 - (2^9 + 2^9 + (3^9 - 2^9) - ( 1 + 2^9 - 1 - 0) + 0) = 0$$ I can't understand where I am making a mistake because everything seems to make sense.
You should define $A_3$ as words with exactly one Q: $ \displaystyle {9 \choose 1} \cdot2^8$
$ |A_1 \cap A_3| = 9$
$ |A_2 \cap A_3| = 0 $
$ |A_1 \cap A_2 \cap A_3| = 0$
$ |A_1 \cup A_2 \cup A_3| = |A_1| + |A_2| + |A_3| - |A_1 \cap A_2| - |A_1 \cap A_3|$
$ = 2^9 + 2^9 + 9 \cdot 2^8 - 1 - 9$
Finally the answer you are looking for is,
$ = 3^9 - |A_1 \cup A_2 \cup A_3|$