# Number of equivalence relations on a set

If a set has $n$ elements then what are maximum number of equivalence classes and equivalence relations possible on it?

-

The maximum number of equivalence classes is $n$ -the identity relation $\{ (x,x) \ | \ x \in X \}$ is an equivalence relation. The number of equivalence relations is the Bell number. The series is in A000110 of OEIS.

-
the empty relation is not an equivalence relation (except on the empty set!). I think you meant to say "identity relation". Anyway, I'm sure we are both talking about the relation whose ordered pairs are $(x,x)$ for all $x \in X$. –  Pete L. Clark Feb 10 '11 at 16:53
@Pete: fixed. Thanks. Also added the OEIS reference –  Ross Millikan Feb 10 '11 at 16:56
it looks like there was some kind of strange edit conflict which caused part of your edit to be undone. Since we agree on the content, I went ahead and fixed it. –  Pete L. Clark Feb 10 '11 at 17:21
@Pete: Thanks much. –  Ross Millikan Feb 10 '11 at 17:22

The Stirling numbers of the second kind $S(n,k)$ are by definition the number of ways you can partition some set of $n$ elements into $k$ non-empty and disjoint subsets. But since an equivalence relation may partition your set into any amount of subsets, you need to sum over all possibilities:

$$\sum_{k=1}^n S(n,k)$$

gives you the anwser.