Relations and Combinatorics exercise Be $A=\{1,2,3,\ldots,10\}$ Determine how many equivalence relations can be defined in $A$ with exactly two equivalence classes.
Determine how many equivalence relations can be defined in $A$ with exactly three equivalence classes.
What I did for two is:
$${10\choose1}+{10\choose2}+\cdots+{10\choose9}=\sum_{i=1}^9{10\choose i}=2^{10}-2$$
For three:
$$\text{ #(All the posible Classes)} - {10\choose1}{9\choose0}-{10\choose0}=2^{10}-11$$
is this ok? is there a easier way to do think it?

If the chosen subset is $\{1,2,3\}$, then it's the SAME equivalence relation as if the chosen subset is $\{4,5,6,7,8,9,10\}$.  Therefore when you add $\dbinom{10}{3}+\dbinom{10}{7}$, you're counting each of those equivalence relations twice.
Similarly with $\dbinom{10}{1}+\dbinom{10}{9}$ and with $\dbinom{10}{2}+\dbinom{10}{8}$ and with $\dbinom{10}{4}+\dbinom{10}{6}$.
A different sort of thing happens with $\dbinom{10}{5}$.  That one term alone counts each of $126$ equivalence relations twice: $\{1,2,3,4,5\}$ corresponds to the SAME equivalence relation as $\{6,7,8,9,10\}$.
So the answer is
$$\dfrac{\sum_{k=1}^9 \binom{10}{k}}{2} = \dbinom{10}{1} + \dbinom{10}{2} + \dbinom{10}{3} + \dbinom{10}{4} + \frac{\dbinom{10}{5}}{2}  = 511$$
