Find a compact, totally disconnected subset of $\mathbb{R}$ which is not a finite set.

general-topologyreal-analysis

Find a compact, totally disconnected subset of $\mathbb{R}$ which is
not a finite set.

I am trying to solve this problem, but I don't see how this could be possible. If finiteness wasn't a condition I would just say a couple of point on $\mathbb{R}$ but with that condition the only sets that I can think of are the integers, rationals, irrationals and their subsets. But none of these satisfy both of the conditions.

Best Answer

Hint: Find an open set $U$ containing the rationals whose measure is less than $1/2.$ Then look at $[0,1]\setminus U.$