[Math] Solution check for counting in a list

combinatorics

This problem involves lists made from the letters T,H,E,O,R,Y, with repetition allowed.

How many 4-letter lists are there that don’t begin with T, or don’t end in Y ?

Just want to make sure my solution is right and my logic isn't flawed.

My solution:

A = 4 letter lists that don't begin with T

B = 4 letter lists that dont end in Y

$|A| = 5 * 6 * 6 * 6 = 1080$

$|B| = 6 * 6 * 6 * 5 = 1080$

$|A \cup B | = 1080 + 1080 = 2160$

Best Answer

We may simplify the problem by using De Morgan's laws:

\begin{align*} |A\cup B| &= \overline{\overline{|A\cup B|}} \\ &= \overline{|\overline{A}\cap \overline{B}|} \\ &= |U|-|\overline{A}\cap \overline{B}| \\ &= 6^4-6^2 \\ &= 1260 \end{align*}

Hence, for a $n$-letter list, the number of such lists is $6^n-6^{n-2}$.