Let $|A| = n \geq 2$ a set. How many equivalence relations are there on $A$ that have two equivalence classes?
Note the answer is in this post. My problem is I don't fully understand it. Can someone give a concrete example with say a set $3 = n = |A| = |\{a_1, a_2, a_3\}|$ to show how they find the formula $\frac {2^n-2}2$?
I understand the first part of the sentence of "user873979" due to the simple fact that $$A = \bigcup_{\alpha \in A}[\alpha] \quad\text{and} \quad [\alpha]\cap[\beta] = \emptyset \quad \text{for }\alpha,\beta \in A.$$ But then then I get lost after that I don't understand.
Also note that I know that given a relation $\sim$ on an arbitrary set $|A|=n$, we know $|\sim| = \sum\limits_{i=1}^n |A_i|^2$.
Again, if one could explain the linked post in terms of the example set I gave, i.e., $3 = n = |A| = |\{a_1, a_2, a_3\}|$, that would be very helpful I am sure! Thank you!
You basically want to count the number of partitions of $A$ into two disjoint nonempty sets whose union is $A$.
You can count this by choosing a nonempty proper subset of $A$ to be one equivalence class, and letting the complement be the other equivalence class. (The original subset must be proper in order for the complement to be nonempty as well.)
There are $2^n$ subsets of $A$, and we don't want the empty set $\varnothing$ or the whole set $A$, so that leaves $2^n-2$. Finally, we don't care about which of the two equivalence classes is "first," so we divide by two.
Explicit explanation for $n=3$ with $A=\{1,2,3\}$:
There are $2^3=8$ subsets $\varnothing, \{1\}, \{2\}, \{3\}, \{1, 2\}, \{1, 3\}, \{2,3\}, \{1,2,3\}$. We ignore $\varnothing$ and $\{1,2,3\}$, leaving $2^3-2=6$.
Given one subset, say, $\{1,3\}$, we can let the complement, $\{2\}$ in this case, be the other equivalence class. So the equivalence classes $\{1,3\}, \{2\}$ corresponds to one relation on $\{1,2,3\}$. You can do this for any of the $6$ sets mentioned above. Finally, since $\{1,3\},\{2\}$ and $\{2\}, \{1,3\}$ correspond to the same relation (the order does not matter), we divide by $2$.