Problem
COM-B1-M01-P015 At Least \(A\) and \(B\)
#15
★★★☆☆ Level 3 of 5
How many words of length \(5\) over \(\{A,B,C\}\) contain at least one \(A\) and at least one \(B\)?
Subtract words without \(A\) and without \(B\), then add back the intersection.
Total: \(3^5=243\). Without \(A\): \(2^5=32\). Without \(B\): \(32\). Without both letters: only \(CCCCC\), one word. Answer: \(243-32-32+1=180\).
Two forbidden conditions are a classic trap.