Let $S \subset \mathbb R$ be the set of all numbers in $[0, 1]$ that have a decimal expansion that consists only of $0$’s, $1$’s, and/or $9$’s. Some examples of numbers in $S$ include $$0,\ 0.01,\ 1.0 = 0.99999999......,$$ $$1/9= 0.11111111....,\ 1/10= 0.1 = 0.09999...... ,\ 1/11= 0.09$$ as well as many irrational numbers, such as the first decimal example of a transcendental number. Decimal expansions are not unique, so $S$ also contains some numbers that you might not initially consider, such as $1/5= 0.2 = 0.1999999...$.

  1. Is $S$ open? Prove your claim.

  2. Is $S$ closed? If so, is $S$ compact? Prove your claim(s).

  • $\begingroup$ I don't think it's open. No matter what $x\in S$ and $\epsilon>0$ you specify, one can always find a number $y$ whose decimal expansion ends $\ldots5000\dots$ far enough beyond the decimal point, s.t. $|x-y|<\epsilon$. Clearly $y\not\in S$. $\endgroup$ – Dan Apr 13 '15 at 7:54

$T=[0,1]\backslash S$ is open. You just have to show that any element of $T$ has an open neighborhood in $T$. Notice that $T$ is the set of numbers that have no decimal expansion with only $0,1,9$ (that is, of the two possible expansions when there are two, none satisfy this constraint).

Let $x\in T$, and if there are two decimal expansions, choose the one that does not end with infinitely many $9$s. Let $x=0.x_1x_2\dots$, then there is an index $i$ such that $x_i \not\in \{0,1,9\}$.

Then two possibilities:

  1. $x_i\in\{3,4,5,6,7,8\}$, then all numbers in $]a,b[$ are in $T$, with

$$a=0.x_1x_2\dots x_{i-1}(x_{i}-1)$$ $$b=0.x_1x_2\dots x_{i-1}(x_{i}+1)$$

  1. $x_i=2$, then either there is another index $j<i$ such that $x_j\not\in\{0,1,9\}$, either there is at least one nonzero $x_j$ for $j>i$ (maybe both). Otherwise, you could replace $x_i$ with a $1$ followed by infinitely many $9$s, and $x$ would be in $S$. In both cases, you can find an index $i$ (change if necessary) such that $x_i\not\in\{0,1,9\}$ and there is a $j>i$ such that $x_j\neq 0$.
    Then you can choose $a=0.x_1x_2\dots (x_{j}-1)5$, and $b$ is the same as above.

And of course $x\in]a,b[$. Therefore $T$ is open.

Since $T$ is open, $\Bbb R\backslash T$ is closed and $S=[0,1]\cap (\Bbb R\backslash T)$ is closed. Since $\Bbb R$ is connected, $S$ can't be both open and closed (unless it's empty or equal to $\Bbb R$, which it is not), hence it's not open.

Then Heine-Borel theorem tells $S$ is compact, since it's a closed and bounded subset of $\Bbb R$.


Direct answer on a):


  • $r_1=0.5$
  • $r_2=0.15$
  • $r_3=0.115$
  • $r_4=0.1115$

et cetera, a convergent sequence $(r_n)$ is constructed with $r_n\notin S$ and limit $r:=0.111\cdots\in S$. This tells us that the complement of $S$ is not closed, or equivalently that $S$ is not open.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.