# How is this map injective? Re: the Cantor set [duplicate]

It is a standard problem in elementary topology to show that the cantor set is homeomorphic to the countable product $\displaystyle\prod \{0,2\}$ (with the product topology of the discrete topology on $\{0,2\}$ ). This is shown via the map $(a_n) \mapsto \displaystyle\sum \frac{a_n}{3^n}$, which is readily seen to be continuous and surjective. My question is

'How does one justify that this map is injective?'

In general, base 3 expansions are not unique. For example,

$1 =1\cdot3^0 + 0\cdot3^1 + 0\cdot3^2 + 0\cdot3^3 + \cdots = 0\cdot3^0 + 2\cdot3^1 + 2\cdot3^2 + 2\cdot3^3 + \cdots$

Is there some basic fact of general base expansion (non)uniqueness that I am overlooking? How does removing the digit '1' from the mix change anything?

-

## marked as duplicate by t.b., Asaf Karagila, Srivatsan, Sasha, Rudy the ReindeerDec 8 '11 at 1:09

Uniqueness fails only for numbers that have a ternary expansion ending in an infinite string of $2$’s, e.g., $0.2122222\dots$, which is equal to $0.22$, or $0.2022222\dots$, which is equal to $0.21$. These examples are typical of the two possibilities:

1. If the digit immediately before the final string of $2$’s is $0$, the other representation of the number terminates in a $1$.
2. If the digit immediately before the final string of $2$’s is $1$, the other representation of the number terminates in a $2$.

In each case one of the two representations must contain a $1$. Thus, at most one of them can arise from the map in question, which therefore must be injective.

Added: To see that the first statement is true, suppose that $$\sum_{k\ge 0}\frac{a_k}{3^k}=\sum_{k\ge 0}\frac{b_k}{3^k},$$ where $a_k,b_k\in\{0,1,2\}$ for all $k$. Then $$\sum_{k\ge 0}\frac{a_k-b_k}{3^k}=0\;,$$ where each $a_k-b_k\in\{-2,-1,0,1,2\}$. Let $m=\min\{k:a_k-b_k\ne 0\}$; then $$\frac{a_m-b_m}{3^m}+\sum_{k>m}\frac{a_k-b_k}{3^k}=0\;.$$

Without loss of generality we may assume that $a_m-b_m<0$, so that $a_m-b_m$ is $-1$ or $-2$, and $$\frac{a_m-b_m}{3^m}\le-\frac1{3^m},$$ and hence $$\sum_{k>m}\frac{a_k-b_k}{3^k}\ge\frac1{3^m}.$$

But $$\sum_{k>m}\frac{a_k-b_k}{3^k}\le\sum_{k>m}\frac2{3^k}=\frac{2/3^{m+1}}{1-1/3}=\frac1{3^m},$$ so the only possibility is that $a_m-b_m=-1$ and $$\sum_{k>m}\frac{a_k-b_k}{3^k}=\frac1{3^m}.$$ If $a_k-b_k$ were less than $2$ for some $k>m$, we’d have $$\sum_{k>m}\frac{a_k-b_k}{3^k}<\sum_{k>m}\frac2{3^k}=\frac1{3^m},$$ so we must have $a_k-b_k=2$ for every $k>m$. Since $a_k,b_k\in\{0,1,2\}$, this implies that $a_k=2$ and $b_k=0$ for every $k>m$. Similarly, either $a_m=0$ and $b_m=1$, or $a_m=1$ and $b_m=2$. In the first case the $a$ expansion ends in $\dots0222\dots$ and the $b$ expansion in $\dots1$; in the second, the $a$ expansion ends in $\dots1222\dots$ and the $b$ expansion in $\dots2$. These are cases (1) and (2) above.

-
Brian: thank you. However, if you could just humour me once more, may you please justify the statement "Uniqueness fails only for numbers that have a ternary expansion ending in an infinite string of 2’s" – georgC Dec 6 '11 at 4:24
@georgC: I’ve incorporated a full explanation into my answer. – Brian M. Scott Dec 6 '11 at 4:53