TITLE: A continuous bijection from the Cantor Set to [0,1]
QUESTION [6 upvotes]: If $C$ is the Cantor Set, I am asked to show that there exists a continuous bijection, say $f$, that maps $C \to [0,1]$.
My best guess thus far has been the Cantor Function, however (using this construction) it doesn't appear to me to be a bijection, specifically not injective. If this is the case, is it possible for me to modify the Cantor Function to get a bijection?
Thanks in advance for any advice!

REPLY [3 votes]: On the one hand we have 
$C=\{ \sum_{k \in N}\frac{a_k}{3^k}$, where $a_k\in \{0,2\} \}$.
On the other hand we have
$[0,1]=\{ \sum_{k \in N}\frac{b_k}{2^k}$  where $b_k \in \{0,1\} \}$.
We put $f(\sum_{k \in N}\frac{a_k}{3^k})=\sum_{k \in N}\frac{c_k}{2^k}$
where $c_k=0$ if $a_k=0$ and $c_k=1$ if $a_k=2$. Then $f$ is a continuous surjection. It is not injective, because $f(\frac{1}3)=f(0.0222...)=\frac{1}{2}=f(0.2)=f(\frac{2}{3})$.