How many $5$-digit numbers (including leading $0$'s) are there with no digit appearing exactly $2$ times? The solution is supposed to be derived using Inclusion-Exclusion.
Here is my attempt at a solution:
Let $A_0$= sequences where there are two $0$'s that appear in the sequence.
...
$A_{9}$=sequences where there are two $9$'s that appear in the sequence.
I want the intersection of $A_0^{'}A_1^{'}...A_9^{'}$= $N-S_1+S_2$ because you can only have at most two digits who are used exactly two times each in a $5$ digit sequence.
$N=10^5$, $S_1=10\cdot \binom{5}{2}\cdot[9+9\cdot 8 \cdot 7]$, and $S_2=10 \cdot 9 \cdot \binom{5}{4} \cdot8$.
The $S_1$ term comes from selecting which of the ten digits to use twice, selecting which two places those two digits take, and then either having the same digit used three times for the other three places, or having different digits used for the other three digits.
The $S_2$ term comes from selecting which two digits are used twice, selecting where those four digits go, and then having eight choices for the remaining spot.
So my answer becomes $10^5 -10 \cdot \binom{5}{2} \cdot [9+9 \cdot 8 \cdot 7]+10 \cdot 9 \cdot \binom{5}{4} \cdot 8$.
Am I doing this correctly?