Solution check for counting in a list 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$
 A: 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}$.
A: Seeking: |A ∪ B| = |A| + |B| - |A ∩ B|A: 4-letter lists are there that don’t begin with T
$$5 \cdot 6^3 = 1080$$
B: 4-letter lists that don’t end in Y
$$6^3 \cdot 5 = 1080$$
A ∩ B: How many 4-letter lists are there that don’t begin with T AND don’t end in Y
$$5 \cdot 6 \cdot 6 \cdot 5 = 25 \cdot 36 = 900$$
So:
$$|A ∪ B| = 1080 + 1080 - 900 = 1260$$
A: Your calculation of $|A|$ and $|B|$ are correct, but there are a number of lists that are counted in both of them, so twice in your total of $2160$.  For example, the list $HHHH$ is one of your $1080$ in $A$ and again one of the $1080$ in $B$, so when you try to find $|A \cup B|$ you have counted it twice.
A: We can also calculate it like that:
We calculate the number of 4-letter lists without restrictions and from this number we subtract these one,which begin with T and  these,which end in Y.But subtracting the number of lists that begin with T and the number of lists that end in Y,we subtract twice the number of lists that begin with T AND end in Y,so wehave to add this number once.
So,it is:
$$6^4-1 \cdot 6 \cdot 6 \cdot 6 -6 \cdot 6 \cdot 6 \cdot 1+1 \cdot 6 \cdot 6 \cdot 1$$
If you have questions,feel free to ask..
