Space filling curve Let $C$ be the Cantor set. Then the Cantor function $f:C \to [0,1]$ can be extended to $F:[0,1]\to [0,1]$ linearly as the end points of an removed interval takes the same value. For example $f(1/3)=f(2/3)$.
But in order to get the space filling curve, the map $g:C \to [0,1]×[0,1]$ can't be extended linearly to [0,1] as $g(1/3)≠g(2/3)$. Then how to extend the map $g$ from $C$ to all over [0,1] to get a continuous space filling curve?
Edit: For any $t \in C$, $t$ can be written uniquely as $t=0.(2a_1)(2a_2)(2a_3) \dots $(base 3), where $a_i$ is either 0 or 1.
$f(t)=0.a_1a_2a_3\dots$(base 2)
$g(t)=(x(t),y(t))$, where $x(t)=0.a_1a_3a_5\dots$(base 2) and $y(t)=0.a_2a_4a_6\dots$(base 2)
 A: Let us collect some well-known facts about the Cantor set $C$. Usually it is defined by iteratively deleting the open middle third from each closed line segment in a finite disjoint union of such segments. Start by deleting the open middle third from the interval $[0, 1]$ which leaves $[0,1/3] \cup [2/3,1]$ and continue as described.
Fact 1. The map $\varphi : P = \prod_{n=1}^\infty \{0, 1 \} \to C, \varphi((x_n)) = \sum_{n=1}^\infty \frac{2x_n}{3^n}$, is a homeomorphism. Here the infinite product $P$ of copies of the discrete space $\{0, 1 \}$ is of course endowed with the product topology.
Fact 2. There exists a continuous surjection $f : C  \to [0,1]$. In fact, define $\psi : P \to [0,1], \psi((x_n)) = \sum_{n=1}^\infty \frac{x_n}{2^n}$. Then $f = \psi \varphi^{-1}$ will do.
Fact 3. There exists a homeomorphism $h : C  \to C \times C$. In fact, we have the obvious homeomorphism $H : P \to  P \times P, H((x_n)) = ((x_1,x_3,x_5,\dots), (x_2,x_4,x_6,\dots))$.
Now define
$$g = (f \times f) h : C \to [0,1] \times [0,1] .$$
This is a continuous surjection. The Tietze extension theorem gives us a continuous extension $G :  [0,1] \to [0,1] \times [0,1]$ which is again a continuous surjection. See for example https://en.wikipedia.org/wiki/Tietze_extension_theorem.
You can also directly define an extension $G$ without applying Tietze's theorem. On each of the removed open intervals $(a,b)$ let $G(t) = (1-\frac{t-a}{b-a})g(a) + \frac{t-a}{b-a}g(b)$ (note that $[0,1] \times [0,1]$ is a convex subset of $\mathbb{R}^2$). It can easily be shown that $G$ is continuous.
