Home > BV functions, Real Analysis > the Cantor function and some of its properties

## the Cantor function and some of its properties

Let’s start by definining the Cantor set. Define ${C_0=[0,1]}$ and ${C_{n+1} = C_n/3 \cup (2/3+C_n/3)}$. At each step we delete the middle third of all the intervals of ${C_n}$ to obtain ${C_{n+1}}$. Note that we obviously have ${C_{n+1} \subset C_{n}}$ (an easy inductive argument) and ${|C_n|=(2/3)^n}$. The sets ${C_n}$ are compact and descending, therefore we can define ${C=\bigcap_{n=0}^\infty C_n}$ which is a compact subset of ${[0,1]}$ with zero measure and it is called the Cantor set.

Since at each step we remove a middle third of all the intervals in ${C_n}$, one way to look at the Cantor set is to look at the ternary representation of the points in it. In the first step, we remove all the elements of ${[0,1]}$ which have ${1}$ on their first position in the ternary representation. In the second step we remove those (remaining) which have ${1}$ on the second position, and so on. In the end we are left only with elements of ${[0,1]}$ which have only digits ${0,2}$ in their ternary representation. Using this representation we can construct a bijection between ${C}$ and ${[0,1]}$ which maps

$\displaystyle x=\sum_{n=1}^\infty \frac{a_n}{3^n} \mapsto \sum_{n=1}^\infty \frac{b_n}{2^n}$

where ${b_n=0}$ if ${a_n=0}$ and ${b_n=1}$ if ${a_n=2}$. This proves that the Cantor set is uncountable.

We can construct the Cantor function ${g:[0,1] \rightarrow [0,1]}$ in the following way. Denote ${R_n}$ the set ${C_n\setminus C_{n+1}}$ (i.e. the set removed in step ${n}$). On ${R_1}$ we let ${g(x)=1/2}$. On ${R_2}$ we have two intervals: on the left one we let ${g(x)=1/4}$ and on the right one we let ${g(x)=3/4}$. We continue like this iteratively, at each step choosing ${g}$ constant on each of the intervals which construct ${R_n}$ such that the constant on an interval is the mean of the values of neighboring interval values.

A precise formula can be given:

$\displaystyle g(x) =\frac{1}{2^{N_x}}+\frac{1}{2}\sum_{n=1}^{N_x-1}\frac{a_{nx}}{2^n}$

where ${N_x}$ is the first index in the representation ${x=\sum_{n=1}^\infty a_{nx}/3^n}$ for which ${a_{nx}=1}$ or ${\infty}$ if no such index exists.

the graph of the Cantor function

The Cantor function ${g(x)}$ is monotone by construction (it is also called the devil’s staircase). Since ${g(x)}$ is constant on each interval in each ${R_n}$ and ${\bigcup R_n =[0,1]}$ almost everywhere we conclude that ${g'(x)}$ exists almost everywhere in ${[0,1]}$ and ${g'(x)=0}$.

We can deduce from the formula given for ${g}$ that the Cantor function is continuous. Indeed, if ${x \rightarrow y}$ then ${\min\{n: a_{nx}\neq a_{ny}\} \rightarrow \infty}$ so the difference between ${g(x)}$ and ${g(y)}$ will be of the order ${1/2^n}$ with ${n \rightarrow \infty}$.

Since ${g}$ is monotone, it has bounded variation, and here we can see a pathological example which illustrates the structure of a function with bounded variation. A function with bounded variation in one dimension is a function ${f}$ defined on an interval ${[a,b]}$ such that the quantity ${\sup \sum_{i=0}^{N-1} |f(x_{i+1})-f(x_i)| <\infty}$ for all partitions ${x_0<... of ${[a,b]}$ (${N}$ is not fixed).

An equivalent definition is

$\displaystyle f \in BV(\Omega) \Leftrightarrow \sup \{ \int_\Omega f\ \text{div}\varphi: \varphi \in C^\infty(\Omega), \|\varphi\|_\infty\leq 1\}<\infty$

and in this case there exists a Radon measure ${\mu=Du}$ such that

$\displaystyle \int_\Omega f\ \text{div}\varphi = -\int_\Omega \varphi d\mu,\ \forall \varphi \in C^\infty(\Omega)$

The structure theorem for functions of bounded variation says that if ${f}$ has bounded variation then ${Df}$ can be splitted into three parts:

• ${D^a f << \mathcal{L}_n}$; ${Df=D^a f+D^s f}$ (Radon Nikodym with respect to the Lebesgue measure)
• ${D^j f=D^s f \llcorner S(u)}$ where ${S(f)}$ is the jump part of ${f}$.
• ${D^c f=Df - D^a f-D^j f}$: the rest, which is called (what a coincidence) the Cantor part of ${Df}$.

Therefore a bounded variation function has a part which behaves as a Sobolev function (the ${n}$ dimensional part), it has a jump part (the ${n-1}$ dimensional part), and it may have a third part (in between dimensions ${n-1}$ and ${n}$) which usually cannot be well described.

The Cantor function ${g}$ is differentiable almpost everywhere (in ${[0,1]\setminus C}$) and ${g'(x)=0}$ for every ${x \in [0,1]\setminus C}$. The part where ${g}$ is differentiable represents the first component of ${g}$ and we see that ${D^a g=0}$. Since ${g}$ is continuous, we do not have a jump part. The only part of the distributional gradient which measures the vertical displacement of ${g}$ is concentrated on the cantor set ${C}$ (which is to be expected, since ${g}$ is constant on every interval outside ${C}$) and this is the Cantor part ${D^c g}$ of ${D g}$.

Usually the Cantor part is so nasty that we can say very little for these bounded variation functions. In order to obtain a space with nicer properties, the space ${SBV(\Omega)}$ was introduce, and its definition is exactly the ${BV(\Omega)}$ functions such that ${D^c f=0}$.

Another interesting property of the Cantor function is that the length of its graph is ${2}$ although the function is increasing, ${g(0)=0}$ and ${g(1)=1}$. Intuitively this seems to be false, since ${g}$ travels mostly horizontally. First notice that ${2}$ is an upper bound. Any curve which increases from ${(0,0)}$ to ${(1,1)}$ has length at most ${2}$. Now let’s see that the arclength is at least ${2}$. First look horizontally: on each ${R_n}$ the function ${g}$ is piecewise constant, and ${R_n}$ cover ${[0,1]}$ up to a set of measure zero. Therefore the horizontal arclength is ${1}$. Secondly, ${g}$ must move vertically from ${0}$ to ${1}$ and it does this continuously, so the vertical arclength is also ${1}$. As a consequence, the arclength of ${g}$ is ${2}$.