A basic problem on topology 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?

 A: The smallest number in $E$ is $0.\overline 4=\frac49$, and the largest is $0.\overline7=\frac79$; let $E_0=\left[\frac49,\frac79\right]$. No member of $E$ lies strictly between $0.4\overline7=\frac4{10}+\frac7{90}=\frac{43}{90}$ and $0.7\overline4=\frac7{10}+\frac4{90}=\frac{67}{90}$, though both of these numbers are in $E$; let $$E_1=\left[\frac49,\frac{43}{90}\right]\cup\left[\frac{67}{90},\frac79\right]\;.$$
No member of $E$ lies strictly between $0.44\overline7=\frac{403}{900}$ and $0.47\overline4=\frac{427}{900}$ or strictly between $0.74\overline7=\frac{673}{900}$ and $0.77\overline4=\frac{697}{900}$; let
$$E_2=\left[\frac49,\frac{403}{900}\right]\cup\left[\frac{427}{900},\frac{43}{90}\right]\cup\left[\frac{67}{90},\frac{673}{900}\right]\cup\left[\frac{697}{900},\frac79\right]\;.$$
If you continue in this fashion, you’ll find that each $E_n$ is the union of $2^n$ pairwise disjoint closed intervals, each of length $\frac1{3\cdot10^n}$. Clearly $E_0\supseteq E_1\supseteq E_2\supseteq\ldots$, and it’s not hard to see further that $E=\bigcap_{n\ge 0}E_n$.
If you’re familiar with the construction of the middle-thirds Cantor set, this should look very familiar: this is in fact a Cantor set, i.e., a topological space homeomorphic to the middle-thirds Cantor set, so it has the same topological properties, and they can be proved in the same ways. For instance, $E$ is an intersection of compact sets, so it’s compact.
A: By using Cantor diagonal argument, $E$ will be uncountable. 
It will not be dense in the interval because the minimum of $E$ is $0.44444...=\frac{4}{9}$ and below this point one can find a point which is neither a limit point nor a point of $E$.
Every point of $E$, say $e$ is a limit point. For each neighborhood $N_r(e)$ one can find $n$ such that $10^{-n}<r$ so by choosing the digits after $n$-th position equal to $4$ or $7$ different from $e$, one finds another point of $E$ in it. 
If there is a limit point $d$ not in $E$, then one can find a minimum position, say $k$ in which the digit is not 4 or 7. Now $d(e,d)$ for all $e\in E$, can be bounded as: 
$$
d(e,d)=a_1 10^{-k}+a_1 10^{-k-1}+....>10^{-k}
$$
So there will be no points in $E$ for a neighborhood of $d$ of radius $r<10^{-k}$ so it cannot be a limit point. So $E$ is closed. 
$E$ is closed and bounded in $[0,1] $ so it will be compact.
$E$ is perfect because it is closed and every point of $E$ is its limit points.
A: The set E is not dense in $[0,1]$; there is no sequence in E converging to, say 1, since 
$d(1,E)\geq 1-0.8=0.2 $ But $E$ is closed in $[0,1]$; take any x in $E^c$ . Then the decimal expansion of x has at least one term $a_n$ with $a_n \neq 4$ ; specifically, 
for any x in the complement, $d(x,E) \geq 10^n$ , where n is the first decimal place in the decimal expansion of x where $n \neq {4,7} $ . This allows you to build a 'hood (neighborhood) $B(x, 1/2(10^n))$ contained entirely in the complement. 
And E is not countable; it has measure larger than 0, since it contains the subintervals (0.4, 0.5) and (0.7, 0.8) ; every countable set has measure zero.
