Confused about Cantor function and measure of Cantor set

Solution 1:

The point here is that there are two different measures on the Cantor set $C$:

  1. Viewing the Cantor set as a subset of $\mathbb{R}$, there is the Lebesgue measure $m_1$ that gives the Cantor set measure 0.

  2. Viewing the Cantor set as the set $2^{\mathbb{N}}$ of all infinite binary sequences, the "fair coin" measure $m_2$ is defined so that for each $n \in \mathbb{N}$ and $i \in \{0,1\}$, the set $\{ f \in 2^{\mathbb{N}} : f(n) = i\}$ has measure $1/2$. This measure is also called the Hausdorff measure of dimension $\log(2)/\log(3)$, where $\log(2)/\log(3)$ is the Hausdorff dimension of the Cantor set $C$.

The Cantor function $g(x)$ is defined such that $g(x) = m_2([0,x) \cap C)$. This is just the cumulative distribution function of $m_2$, but now we again view $C$ as a subset of the real line.

Solution 2:

The Cantor function is constant on each of the open intervals that makes up the complement of the Cantor set. The distribution puts zero mass on the union of these open intervals. This gives $\mu([0,1]\setminus C)=0$, so that $\mu(C)=1$.