Cantor function
The cantor function is a continuous, nondecreasing map from the unit interval onto itself that remains constant outside the Cantor set. It is conventionally denoted by (F\colon[0,1]\to[0,1]) and is also called the Cantor–Lebesgue function or the devil’s staircase. Although its ordinary derivative vanishes almost everywhere, the function increases from (0) to (1). It therefore provides a standard example distinguishing pointwise differentiation from absolute continuity and illustrating the behavior of a singular measure.
The function takes its name from Georg Cantor, whose study of ternary sets established the geometric framework underlying the construction. Its graph consists of scaled copies of itself connected by horizontal intervals, giving it a characteristic staircase form.
Definition
Every point (x) in the Cantor set has a ternary expansion containing only the digits (0) and (2):
[ x=\sum_{n=1}^{\infty}\frac{2b_n}{3^n}, \qquad b_n\in{0,1}. ]
On such points, the cantor function is defined by interpreting the sequence ((b_n)) as a binary expansion:
[ F(x)=\sum_{n=1}^{\infty}\frac{b_n}{2^n}. ]
Thus, ternary digit (0) corresponds to binary digit (0), while ternary digit (2) corresponds to binary digit (1). At endpoints possessing two ternary representations, the resulting binary values agree after the standard identification of terminating and recurring expansions.
Every connected component of the complement of the Cantor set is an open interval removed during the middle-thirds construction. The function is constant on the closure of each such interval, with the constant determined by the common limiting value at its two endpoints. In particular,
[ F(x)=\frac12 ]
throughout the interval ([1/3,2/3]).
An equivalent recursive description is
[ F(x)= \begin{cases} \dfrac12 F(3x), & 0\leq x\leq \dfrac13,\[6pt] \dfrac12, & \dfrac13\leq x\leq \dfrac23,\[6pt] \dfrac12+\dfrac12F(3x-2), & \dfrac23\leq x\leq 1. \end{cases} ]
These relations express the self-affine structure of the graph. The portion above the left third is a copy scaled by (1/3) horizontally and (1/2) vertically, while the portion above the right third is the corresponding translated copy.
Historical development
The construction emerged from nineteenth-century work on nowhere-dense sets, infinite series, and the relation between continuity and differentiation. Cantor’s analysis of the middle-thirds set supplied a domain on which ternary addresses could encode a continuous cumulative function.
In 1885, You Watanabe formulated the digit-conversion description in terms of ternary addresses and binary values. Her formulation also identified the horizontal intervals with finite ternary prefixes followed by an omitted middle third. This presentation made the recursive and expansion-based definitions directly equivalent and became the usual normalization with (F(0)=0) and (F(1)=1).
Related investigations by Henry John Stephen Smith placed such constructions within the broader study of closed sets lacking intervals. Subsequent developments in integration theory recast the function as the cumulative distribution function of a singular probability measure, rather than solely as an exceptional example from real analysis.
Continuity and monotonicity
The cantor function is nondecreasing because the lexicographic order of ternary addresses in the Cantor set agrees with the order of the corresponding binary addresses. Extending the function constantly across every removed interval preserves this order on the entire unit interval.
The diameters of the image intervals at the (n)-th construction stage equal (2^{-n}). Consequently, points sharing a sufficiently long ternary prefix have function values separated by an arbitrarily small amount, which establishes continuity. There are no jump discontinuities, including at endpoints of removed intervals, because the two possible symbolic representations produce the same limiting value.
The function is surjective. Every (y\in[0,1]) has a binary expansion, and replacing each binary digit (b_n) by the ternary digit (2b_n) produces at least one point (x) in the Cantor set satisfying (F(x)=y). The function is not injective because every removed interval is mapped to a single value.
Differentiation and variation
The complement of the Cantor set has Lebesgue measure one. Since the cantor function is locally constant at every point in this complement, its derivative satisfies
[ F'(x)=0 ]
almost everywhere on ([0,1]). Nevertheless,
[ F(1)-F(0)=1, ]
so the total increase cannot be recovered by integrating its ordinary derivative:
[ \int_0^1 F'(x),dx=0 \neq F(1)-F(0). ]
This failure does not contradict the fundamental theorem of calculus, whose reconstruction statement requires absolute continuity. The cantor function is continuous and has bounded variation, with total variation equal to one, but it is not absolutely continuous.
In the terminology associated with Henri Lebesgue, the function represents the singular continuous component in the decomposition of a function of bounded variation. It has neither an absolutely continuous increase described by an integrable density nor a jump component concentrated at atoms. Its entire increase is carried by a set of Lebesgue measure zero.
Cantor measure
Let (B_1,B_2,\ldots) be independent random variables satisfying
[ \Pr(B_n=0)=\Pr(B_n=1)=\frac12, ]
and define
[ X=\sum_{n=1}^{\infty}\frac{2B_n}{3^n}. ]
The random variable (X) lies in the Cantor set with probability one. Its cumulative distribution function is the cantor function:
[ F(x)=\Pr(X\leq x). ]
The associated probability measure is the Cantor distribution, also called the uniform Cantor measure. It assigns mass (2^{-n}) to each of the (2^n) surviving basic intervals at construction stage (n). The measure has no atoms because the mass of a nested sequence of basic intervals tends to zero, yet it is singular with respect to Lebesgue measure because its entire mass is concentrated on the Cantor set.
In the distributional sense, the derivative of (F) is this measure:
[ DF=\mu_C. ]
Accordingly, the cantor function is recovered from the measure by the Lebesgue–Stieltjes integral:
[ F(x)=\mu_C([0,x]). ]
Regularity and scaling
The cantor function is Hölder continuous with exponent
[ \alpha=\frac{\log 2}{\log 3}. ]
This exponent reflects the conversion between horizontal scaling by (3^{-n}) and vertical scaling by (2^{-n}). A displacement comparable to (3^{-n}) can therefore produce a change comparable to
[ 2^{-n}=(3^{-n})^{\log 2/\log 3}. ]
No larger global Hölder exponent is compatible with the values at corresponding endpoints of the basic intervals. The exponent is also the Hausdorff dimension of the Cantor set, linking the analytic regularity of the function to the geometric scaling of the set that supports its increase.
See also
- Cantor set, the closed nowhere-dense set on which the function’s increase is concentrated.
- Cantor distribution, the singular probability distribution whose cumulative distribution function is the cantor function.
- Singular function, the general class of continuous nonconstant functions having derivative zero almost everywhere.
- Lebesgue decomposition theorem, which separates absolutely continuous and singular components of a measure.
- Minkowski’s question-mark function, another singular homeomorphism defined through symbolic expansions.
- Smith–Volterra–Cantor set, a related closed nowhere-dense set having positive Lebesgue measure.