[Math] Prob. 17, Chap. 2, in Baby Rudin: The set of all numbers in $[0,1]$ with only $4$ and $7$ as decimal digits is countable, dense, compact, perfect

analysiscompactnessgeneral-topologyreal-analysis

Here is Prob. 17 in the Exercises after Chapter 2 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition.

Let $E$ be the set of all $x \in [0,1]$ whose decimal expansion contains only the digits $4$ and $7$. Is $E$ countable? Is $E$ dense in $[0,1]$? Is $E$ compact? Is $E$ perfect?

My effort:

The set $E$ is not countable. The proof is essentially the same as that for showing that the set of all the binary sequences is uncountable. Am I right?

The set $E$ is not dense in $[0, 1]$. The smallest element in $E$ is
$$x_\min \colon= \frac{4}{10} + \frac{4}{10^2} + \frac{4}{10^3} + \ldots = \frac{4}{9},$$
and the largest element in $E$ is
$$x_\max \colon= \frac{7}{10} + \frac{7}{10^2} + \frac{7}{10^3} + \ldots = \frac{7}{9}.$$
Thus, the set $E$ is (strictly) contained in the closed interval $[\frac{4}{9}, \frac{7}{9}]$. So, the element $\frac{1}{5}$ of $[0,1]$, for example, does not lie in the closure of $E$. Am I right?

The set $E$ is clearly bounded. So, for compactness, it suffices to show that $E$ is closed. [It does not matter if $E$ is closed in $[0,1]$ or $\mathbb{R}$, as the former is a closed set in the latter.] So we show that the complement of $E$ in $[0,1]$ is open in $[0,1]$.

Let $x \colon= \sum_{n=1}^\infty \frac{d_n}{10^n}$ be an arbitrary element of $[0,1]-E$, where each $d_n \in \{ 0, 1, 2, \ldots, 9 \}$. Then there is a positive integer $n$ such that $d_n \not\in \{4, 7\}$. Let $N$ be the least such positive integer, and let $\delta$ be a real number such that
$$0< \delta < \frac{\min\left( \vert d_N – 4 \vert, \vert d_N – 7 \vert \right)}{10^{N+2}}. $$
Let $y \colon= \sum_{n=1}^\infty \frac{e_n}{10^n}$ be an element of $E$, where each $e_n$ is either $4$ or $7$. Let's also assume that $e_n = d_n$ for all $n \in \{1, \ldots, N-1\}$. What next? How to show that $y$ fails to be within $\delta$ of $x$?

For showing that $E$ is perfect, we need to show that $E$ is closed and that each element of $E$ is a limit point of $E$.

Let $x \colon= \sum_{n=1}^\infty \frac{d_n}{10^n}$ be an arbitrary element of $E$, where each $d_n$ is either $4$ or $7$. Let $\delta > 0$. Then there exists a smallest positive integer $N$ such that $$\frac{3}{10^N} < \delta.$$

Let $y \colon= \sum_{n=1}^\infty \frac{d_n^\prime}{10^n}$, where each $d_n^\prime$ is either $4$ or $7$, be the element of $E$ such that $$d_n^\prime =
\begin{cases}
d_n \ \mbox{ if } \ n \in \mathbb{N} \ \mbox{ and } n \neq N; \\
4 \ \mbox{ if } \ n = N \ \mbox{ and } d_N = 7; \\
7 \ \mbox{ if } \ n = N \ \mbox{ and } d_N = 4.
\end{cases}
$$
Then
$$0< \vert x -y \vert < \delta.$$
This shows that each element $x$ of $E$ is also a limit point of $E$. Am I right?

Best Answer

Your arguments for uncountable and not dense look good to me. As far as showing $[0,1]-E$ is open, I think for simplicity since you know that $d_N\not\in\{4,7\}$, and we're dealing with integers, take $$\delta<\frac{1}{10^{N+2}}.$$ Then if $y$ is such that $|x-y|<\delta$ you know that $y$ has to agree with $x$ at $d_N$, and thus $y\not \in E$.

I believe that your argument for $E$ being perfect is correct as well :)

Related Question