For every set $X$ and every topology $\tau$ over $X$ we have that $\tau$ contains the trivial topology $\{ X, \emptyset\}$, which is compact, and is contained in the discrete topology $\{ S: S \subseteq X\}$, which is Hausdorff. I was wondering if there is any topology on X "between" the trivial and the discrete such that it has both properties.
It seems that there is such a topology for specific sets, such as the natural numbers, but I haven't found any result for arbitrary $X$. I don't know if any additional condition must be established on $X$ for the result to hold, or if it isn't possible in general.