Set Theory – Cantor Set and Ternary Expansions

calculuselementary-set-theoryreal-analysis

Does there exists any systematic way to represent a number in ternary expansion?

Also, I have hard time trying to figure it out this:

Let $x = \sum \frac{a_k}{3^k} = 0.a_1a_2…. $

why is it that $x \in [0,1]$ belongs to the cantor set $C$ iff all its $a_k$ equal $0$ or $2$?

I would really appreciate if someone can explain this to me. Thanks

Best Answer

I hope the following procedure is "systematic" enough.

Start with $x\in [0,1]$. Define $a_1$ to be the greatest number in $\{ 0,1,2\}$ such that $\frac{a_1}3\leq x$; so $a_1=0$ if $x\in [0,1/3)$, $a_1=1$ if $x\in [1/3,2/3)$ and $a_1=2$ if $x\in [2/3,1]$. In each case you have $$\frac{a_1}3\leq x\leq \frac{a_1}{3}+\frac13\,\cdot$$ Assuming $a_1,\dots ,a_{n-1}$ have already been found (for some $n\geq 2$) with $$\sum_{k=1}^{n-1}\frac{a_k}{3^k}\leq x\leq \sum_{k=1}^{n-1}\frac{a_k}{3^k}+\frac{1}{3^{n-1}}\, ,$$ define $a_n$ to be the greatest number in $\{ 0,1,2\}$ such that $\sum_{k=1}^{n-1}\frac{a_k}{3^k}+\frac{a_n}{3^n}\leq x$. Then $$\sum_{k=1}^n\frac{a_k}{3^k}\leq x\leq \sum_{k=1}^{n}\frac{a_k}{3^k}+\frac{1}{3^{n}}\cdot $$ Indeed, if $a_n=0$ or $1$ then $a_n+1$ is still in $\{ 0,1,2\}$, so by the definition of $a_n$ you have in fact $x<\sum_{k=1}^{n-1} \frac{a_k}{3^k}+\frac{a_n+1}{3^n}=\sum_{k=1}^n\frac{a_k}{3^k}+\frac{1}{3^n}$; and if $a_n=2$ then you may write (by the induction hypothesis) $x\leq \sum_{k=1}^{n-1}\frac{a_k}{3^k}+\frac{1}{3^{n-1}}=\sum_{k=1}^{n-1} \frac{a_k}{3^k}+\frac{2}{3^{n}}+\frac{1}{3^n}=\sum_{k=1}^n\frac{a_k}{3^k}+\frac1{3^n}\cdot$

So, constructing your sequence in this way, you obviously get $x=\sum_{k=1}^ \infty \frac{a_k}{3^k}\cdot$

As you know, the ternary expansion is not necessarily unique. If you start with a number $x$ of the form $x=\sum_{k=1}^N\frac{b_k}{3^k}$ (finite sum), then the procedure gives you $a_1=b_1, \dots , a_N=b_N$ and $a_k=0$ for all $k>N$.

As for your second question, you already have a nice answer.