#5: The Cantor Set and the Cantor Function

The Cantor set $C$ is a fractal that is obtained by repeatedly removing the middle third of a segment. Start with the closed interval $[0,1]$. Remove the open interval $(\frac{1}{3},\frac{2}{3})$ to obtain $[0,\frac{1}{3}] \cup [\frac{2}{3},1]$, i.e. two disjoint closed segments. Remove the middle thirds of those two segments, and you end up with four disjoint segments. After infinitely many steps, the result is called the Cantor set. The diagram below is only an approximation after a finite number of steps.