In mathematics, the Cantor function is an example of a function that is continuous, but not absolutely continuous. It is a notorious counterexample in analysis, because it challenges naive intuitions about continuity, derivative, and measure. Although it is continuous everywhere, and has zero derivative almost everywhere, its value still goes from 0 to 1 as its argument goes from 0 to 1. Thus, while the function seems like a constant one that cannot grow, it does indeed monotonically grow. It is also called the Cantor ternary function, the Lebesgue function, Lebesgue's singular function, the Cantor–Vitali function, the Devil's staircase, the Cantor staircase function, and the Cantor–Lebesgue function. Georg Cantor (1884) introduced the Cantor function and mentioned that Scheeffer pointed out that it was a counterexample to an extension of the fundamental theorem of calculus claimed by Harnack. The Cantor function was discussed and popularized by Scheeffer (1884), Lebesgue (1904), and Vitali (1905).
Definition
To define the Cantor function c:[0,1]→[0,1], let x be any number in [0,1] and obtain c(x) by the following steps:
Express x in base 3, using digits 0, 1, 2. If the base-3 representation of x contains a 1, replace every digit strictly after the first 1 with 0. Replace any remaining 2s with 1s. Interpret the result as a binary number. The result is c(x). For example:
14 has the ternary representation 0.02020202... There are no 1s so the next stage is still 0.02020202... This is rewritten as 0.01010101... This is the binary representation of 13, so c(14)=13. 15 has the ternary representation 0.01210121... The digits after the first 1 are replaced by 0s to produce 0.01000000... This is not rewritten since it has no 2s. This is the binary representation of 14, so c(15)=14. 200243 has the ternary representation 0.21102 (or 0.211012222...). The digits after the first 1 are replaced by 0s to produce 0.21. This is rewritten as 0.11. This is the binary representation of 34, so c(200243)=34. Equivalently, letting 𝒞 be the Cantor set on [0,1], the Cantor function c:[0,1]→[0,1] can be defined as c(x)={∑n=1∞an2n,if x=∑n=1∞2an3n∈𝒞 for an∈{0,1};supy≤x,y∈𝒞c(y),if x∈[0,1]∖𝒞. This formula is well-defined, since every member of the Cantor set has a unique base 3 representation that only contains the digits 0 or 2. (For some members of 𝒞, the ternary expansion is repeating with trailing 2's and there is an alternative non-repeating expansion ending in 1. For example, 13 = 0.13 = 0.02222...3 is a member of the Cantor set). Since c(0)=0 and c(1)=1, and c is monotonic on 𝒞, it is clear that 0≤c(x)≤1 also holds for all x∈[0,1]∖𝒞.
Properties The Cantor function challenges naive intuitions about continuity and measure; though it is continuous everywhere and has zero derivative almost everywhere, c(x) goes from 0 to 1 as x goes from 0 to 1, and takes on every value in between. The Cantor function is the most frequently cited example of a real function that is uniformly continuous (precisely, it is Hölder continuous of exponent α=log3(2)) but not absolutely continuous. It is constant on intervals of the form (0.x1x2x3...xn022222..., 0.x1x2x3...xn200000...), and every point not in the Cantor set is in one of these intervals, so its derivative is 0 outside of the Cantor set. On the other hand, it has no derivative at any point in an uncountable subset of the Cantor set containing the interval endpoints described above. The Cantor function can also be seen as the cumulative probability distribution function of the 1/2-1/2 Bernoulli measure μ supported on the Cantor set: c(x)=μ([0,x]). This probability distribution, called the Cantor distribution, has no discrete part. That is, the corresponding measure is atomless. This is why there are no jump discontinuities in the function; any such jump would correspond to an atom in the measure. However, no non-constant part of the Cantor function can be represented as an integral of a probability density function; integrating any putative probability density function that is not almost everywhere zero over any interval will give positive probability to some interval to which this distribution assigns probability zero. In particular, as Vitali (1905) pointed out, the function is not the integral of its derivative even though the derivative exists almost everywhere. The Cantor function is the standard example of a singular function. The Cantor function is also a standard example of a function with bounded variation but, as mentioned above, is not absolutely continuous. However, every absolutely continuous function is continuous with bounded variation. The Cantor function is non-decreasing, and so in particular its graph defines a rectifiable curve. Scheeffer (1884) showed that the arc length of its graph is 2. Note that the graph of any nondecreasing function such that f(0)=0 and f(1)=1 has length not greater than 2. In this sense, the Cantor function is extremal.
Lack of absolute continuity The Lebesgue measure of the Cantor set is 0. Therefore, for any positive ε < 1 and any δ > 0, there exists a finite sequence of pairwise disjoint sub-intervals with total length < δ over which the Cantor function cumulatively rises more than ε. In fact, for every δ > 0 there are finitely many pairwise disjoint intervals (xk,yk) (1 ≤ k ≤ M) with ∑k=1M(yk−xk)<δ and ∑k=1M(c(yk)−c(xk))=1.
Alternative definitions
Iterative construction
Below we define a sequence (fn)n of functions on the unit interval that converges to the Cantor function. Let f0(x)=x. Then, for every integer n≥0, the next function fn+1(x) will be defined in terms of fn(x) as follows:fn+1(x)={12fn(3x)if 0≤x≤1312if 13≤x≤2312+12fn(3x−2)if 23≤x≤1The three definitions are compatible at the end-points 13 and 23, because fn(0)=0 and fn(1)=1 for every n, by induction. One may check that (fn)n converges pointwise to the Cantor function defined above. Furthermore, the convergence is uniform. Indeed, separating into three cases, according to the definition of fn+1, one sees that
maxx∈[0,1]|fn+1(x)−fn(x)|≤12maxx∈[0,1]|fn(x)−fn−1(x)|,n≥1. If f denotes the limit function, it follows that, for every n≥0,
maxx∈[0,1]|f(x)−fn(x)|≤2−n+1maxx∈[0,1]|f1(x)−f0(x)|.
… excerpt ends here. Continue reading the full article.



