# Perfect set without rationals [closed]

Give an example of a perfect set in $\mathbb R^n$ that does not contain any of the rationals.

(Or prove that it does not exist).

• What is a perfect set? Also, this looks like a homework problem. Jul 28, 2010 at 21:36
• Why are you asking if you apparently know the answer? Jul 28, 2010 at 21:37
• @Kevin: Line Bundle is not asking homework questions - no-one would have homework on so many different areas at once Jul 28, 2010 at 21:37
• @Kevin, a perfect set is one which is equal to its derived set, as in en.wikipedia.org/wiki/Perfect_set Jul 28, 2010 at 21:38
• Mariano has started a discussion at meta: meta.math.stackexchange.com/questions/313/… Jul 28, 2010 at 21:40

An easy example comes from the fact that a number with an infinite continued fraction expansion is irrational (and conversely). The set of all irrationals with continued fractions consisting only of 1's and 2's in any arrangement is a perfect set of irrational numbers.

• This is a really nice answer! Jul 29, 2010 at 4:52
• Beautiful answer! Jul 30, 2010 at 7:16

Consider the set of reals x whose binary expansion, if you look only at the even digit places, is some fixed non-eventually-repeating pattern z. This is perfect, since we have branching at the odd digits, but they are all irrational, since z is not eventually repeating.

You can draw a picture of this set, and it looks something like the Cantor middle third set, except that you divide into four pieces, and take either first+third or second+fourth, depending on the digits of z.

Another solution: Begin with an interval having irrational endpoints, and perform the usual Cantor middle-third construction, except that at stage n, be sure to exclude the n-th rational number (with respect to some fixed enumeration), using a subinterval having irrational endpoints. By systematically excluding all rational numbers, you have the desired perfect set of irrationals.

(Hi François!)

• Hi Joel! Nice answer! Jul 30, 2010 at 18:30
• I was answering this in baby Rudin 2.18, with an approach similar to the first approach of yours, and found it easier to construct explicit bounds on neighborhoods especially when proving that the set is closed if we instead consider decimal expansion and limit ourselves to numbers in [0,1] with digits in 4 and 7 , since we obviate the need to reason about carries in the decimal representation for sufficiently small neighborhoods. Note that the previous exercise in baby Rudin already has you prove some properties about the set of numbers in [0,1] with digits in 4 and 7. Jun 25, 2020 at 8:35

It is well-known that $C$ is homeomorphic to $C \times C$, where $C$ is the Cantor set, as both are zero-dimensional compact metric spaces without isolated points. So $C$ contains uncountably many disjoint homeomorphic copies of $C$ and at most countably many of them can contain rationals...

• This is now my favorite example of a nonconstructive proof.
– user123641
Sep 9, 2014 at 20:36
• @Bryan Thx. It shows the power of the characterisation theorem nicely, I think. It's a folklore argument, don't know whose it is originally. Sep 9, 2014 at 20:43

Just consider a translation of Cantor set $C$, denote as $E=C+\{x_0\}$. The perfectness of $E$ is trivial due to the perfectness of $C$. To make $E\cap\mathbb{Q}=\varnothing$, we need to choose an $x_0\notin \mathbb{Q}-C$. The only thing left is to show $\mathbb{Q}-C\neq\mathbb{R}$, i.e. $\mathbb{Q}+C\neq\mathbb{R}$. By Baire Category theorem $$\mathbb{Q}+C=\bigcup_{r\in\mathbb{Q}}\{r\}+C$$ can't have any interior point, since $\{r\}+C$ don't have any interior point, for any $r\in\mathbb{Q}$. The conclusion follows.

Let $A$ be an open subset of $R$ of finite measure and containing $Q$. This is possible because $Q$ is countable. Let $B=R$ \ $A$. Now $B$ is closed, and uncountable (because it has infinite measure). Let $C$ be the family of open real intervals that, each, have countable intersection with $B$. Then $\cup C$ is equal to $\cup D$ where $D$ is a countable subset of $C$, so $B$ has countable intersection with $\cup C$. The uncountable closed set $E= B$ \ $\cup C$ is perfect. Indeed, if $p \in E$ and $V$ is an open interval containing $p$, then $E \cap V$ is uncountable.