# Cantor Set Construction through Ternary Expansions

Recall the Cantor (middle-third) set $\Lambda$ which is equal to

$\displaystyle{\bigcap_{k=0}^{\infty}{E_k}}$

where $E_0 = [0,1]$ and $E_k$ for $k \geq 1$ is obtained by removing the middle-thirds of each of the disjoint closed intervals making up $E_{k-1}$, i.e. each disjoint closed interval $[a,b]$ making up $E_{k-1}$ gets mapped to $[a, a + 1/3^k] \cup [a+2/3^k, b]$.

For example, to obtain $E_1$, $[0,1]$ gets mapped to $[0,1/3] \cup [2/3,1]$, and this latter set is $E_1$. To obtain $E_2$, $[0,1/3]$ gets mapped to $[0,1/9] \cup [2/9,1/3]$, and $[2/3,1]$ gets mapped to $[2/3, 7/9] \cup [8/9, 1]$, and $E_2$ is the union of these disjoint intervals.

The purpose of this post is to show that in fact

$\displaystyle{S := \left\{ \sum_{k=1}^{\infty}a_{k}3^{-k}:a_{k}\in\left\{ 0,2\right\}\right\} } = \Lambda$

This set $S$ is the collection of all ternary expansions with coefficients $0$ and $2$.

First, it is important to note that the elements of $S$ all coverge to real numbers. This is true because

$\displaystyle{\sum_{k=1}^{\infty}{a_k 3^{-k}} \leq 2 \sum_{k=1}^{\infty}{3^{-k}} <\infty}$

the latter series being geometric.

Next, it will be shown that $\Lambda \subseteq S$. Let $x \in \Lambda$. It is sufficient to construct a sequence $a_k \subseteq \{0,2\}$ corresponding to $x$ such that

$\displaystyle{x = \sum_{k=1}^{\infty}{a_k 3^{-k}}} (*)$

By definition of $\Lambda$, $x \in E_k$ for all $k$. First, $x \in E_0 = [0,1]$. Second, $x \in E_1$. Since $E_1$ is the result of removing the middle-third of $[0,1]$, therefore necessarily $x$ is in the left or right remaining third. If it was the left, define $a_1 = 0$, and otherwise define $a_1 = 2$. Now let $k \geq 1$. Since $x \in E_{k-1}$, therefore it is in one of the disjoint closed intervals $[a,b]$ making up $E_{k-1}$. Since $x \in E_k$ and $[a,b]$ has its left and right thirds mapped into $E_k$, therefore necessarily $x$ is in the left third ($a_k = 0$) or the right third ($a_k = 2$).

Inductively this defines a sequence $a_k \subseteq \{0,2\}$ corresponding to $x$. Define the partial sums

$\displaystyle{S_k = \sum_{i=1}^k{a_i 3^{-i}}}$

To show (*) holds for our choice of $a_k$, it is sufficient to show that $\forall{k}$, $a_k$ and $S_k$ are in one of the disjoint closed intervals $[a,b]$ making up $E_k$ with $a = S_k$. This is sufficient because a property of $\Lambda$ is that the length of the $[a,b]$, excluding $E_0$, is $3^{-k}$ (e.g. by an inductive argument), so $|S_k - x| \leq |a-b| = 3^{-k} \rightarrow 0$ as $k \rightarrow \infty$. This would imply

$\displaystyle{\sum_{k=1}^\infty{a_k 3^{-k}} = \lim S_k = x}$

We proceed by induction. For $k=1$, if $a_1 = 0$, then by definition $x \in [0,1/3]$ and $S_1 = 0$. Otherwise $a_1 = 2$ in which case $x \in [2/3,1]$ and $S_1 = 2/3$. Hence the claim holds for $k=1$.

Now suppose that $x$ and $S_k$ are both in one of the disjoint closed intervals $[a,b]$ making up $E_k$ and $S_k = a$. Then $[a,b]$ is mapped to $[a,a+1/3^{k+1}] \cup [a+2/3^{k+1},b]$ for $E_{k+1}$. If $x$ is in the left interval, then $a_{k+1} = 0$, in which case $S_{k+1} = S_k = a$. Otherwise $x$ is in the right interval in which case $a_{k+1} = 2$, so

$S_{k+1} = S_k + 2/3^{k+1} = a + 2/3^{k+1}$

This completes showing (*) so that indeed $\Lambda \subseteq S$.

To show that $S \subseteq \Lambda$ as well, let $x \in S$. Then

$\displaystyle{\sum_{k=1}^\infty{a_k 3^{-k}} = x}$

and $a_k \in \{0,2\}$. The latter fact and an earlier argument show that the partial sums $S_k$ of $x$ are still a left endpoint of one of the disjoint closed intervals making up $E_k$ for all $k$. Consequently $S_k \in \Lambda$. Since $\Lambda$ is (topologically) closed, it then follows that

$\lim S_k = x$

is in $\Lambda$. This completes the proof.