You will need to have an understanding of the following terms to use this Notebook and solve the problems:uniform convergence, monotone function, jump discontinuity, left- and right- derivatives, Riemann-Stieltjes integral, moments. Some problems may require the notion of measure and Lebesgue integral.
In this Notebook we construct a function y(x) which is closely related to the Cantor set. In fact, this function is increasing with its increase taking place only on the ``thinly scattered'' points of the Cantor set!. Because it is an increasing function with value 0 at the left end of the defining interval, and value 1 at the right end of the defining interval, it can be considered as a cumulative distribution function of the sort considered in probability and statistics. As such, it serves as an important example of a ``badly behaved function'' in a certain sense discussed in measure theory and integration. It is also of interest to consider the mean, the variance, and higher moments of this distribution as a concrete example of Riemann-Stieltjes integration.
Let Ek,j, (j= 1,....2k-1) denote the open deleted intervals complementary to Ik in the sequential construction of C[[a,b], r1,r2], numbered from left to right in order. Let yk(x) be the unique continuous function on [a,b] such that yk(a) = 0, yk(b) = 1, yk(x) is linear on each interval of Ik and Ek,j and
Then yk is clearly nondecreasing, yk+1 = yk on Ek,j, and
‰ yk+1(x) - yk(x)‰ < 2-k.
Hence the sequence converges uniformly on [a,b]. Its limit y(x) is continuous, y(a) = 0, y(b)=1, and y(x) is constant on any interval complementary to any set Ik.
Here is an illustration of the uniform convergence of these piecewise linear approximations.
:[font = input; preserveAspect; ]
Show[ Graphics[{cantorFunction[1],
cantorFunction[2],
cantorFunction[3]}
],
Axes -> True,
AspectRatio -> Automatic]
:[font = text; inactive; preserveAspect; ]
And here is an illustration of ( a very close approximation, to within screen resolution of ) the classical Cantor function.
:[font = input; preserveAspect; ]
Show[ Graphics[ cantorFunction[7]],
Axes -> True,
AspectRatio -> Automatic]
:[font = text; inactive; preserveAspect; ]
Here is an illustration of a generalized Cantor function, based on the generalized Cantor set with preservation ratios r1=1/10, and r2=1/2.5, that is, removing a portion 1 -( 1/10+1/2.5) at each stage.
Using the recursive function definition possible with Mathematica we can use these symmetries to draw the graph of the classical Cantor function. First define the function using the symmetries, slightly rearranged:
Then draw an approximation to the Cantor function, together with some boxes to make the symmetries apparent.
:[font = input; preserveAspect; ]
Show[ Graphics[Join[
Map[connect, complementaryIntervals[4]],
{ GrayLevel[0.5], Line[{{1/3,0},{1/3,1/2}}],
Line[{{0,1/2},{1/3,1/2}}],
Line[{{2/3,1/2},{1,1/2}}],
Line[{{2/3,1/2},{2/3,1}}]}],
AxesOrigin -> {0,0},
Axes -> True,
AspectRatio -> Automatic
]]
:[font = text; inactive; preserveAspect; ]
Finally draw (a very good approximation of, to within about screen resolution) the Cantor function using the recursivesymmetry relations to obtain the function values.
The symmetries illustrated again below shows that portions of the graph of the Cantor function are similar to sub-portions. Alternatively, the graph of the Cantor function may be expressed as the union of affine contractions. According to Barnsley's Collage Theorem, this means we may generate the graph of the Cantor function from an appropriate Chaos game.
The generalized Cantor function based on the Cantor set with ratios r1 and r2 (on the interval [0,1] for simplicity of notation) also satisfies some functional relationships:
It is easy to see from the graph of the Cantor Function that the derivative of the Cantor function is zero on the interior of any complementary interval. This follows rigorously from the definition as a limit of piecewise linear functions. At the endpoints of a complementary interval the derivative is more interesting. For instance, at a right-endpoint of a complementary interval, the left-derivative is zero. Consider the following graph of secant lines approximating the derivative to the Cantor function at x = 2/3. The secant lines are taken through the point on the graph of the Cantor function at an endpoint of another complementary interval to the right.
:[font = input; preserveAspect; ]
complementaryIntervals[5]
:[font = text; inactive; preserveAspect; ]
Define some functions to indicate the x-coordinate where the secant line will intersect the lines y = 1, and y = 0 ( at the top and bottom of the graphing region)
:[font = input; preserveAspect; ]
xtop[x_] := (1/2)*( 2/3 - x)/(1/2 - f[x]) +2/3
:[font = input; preserveAspect; ]
xbot[x_] := (-1/2)*( 2/3 - x)/(1/2 - f[x]) +2/3
:[font = text; inactive; preserveAspect; ]
Draw the Cantor function and several of the secant lines through endpoints chosen more or less arbitrarily from the list above.
Since the Cantor function is increasing, it is a natural for use with Riemann-Stieltjes integration. Alternatively, we can view the Cantor function as a cumulative distribution function for some probability and then calculate its mean: ù01 x dy(x). It is easiest to do this by calculating Riemann-Stieltjes sums for ù01 x dyk(x) and passing to the limit.
2. Suppose that f(x) is continous on [0,1], f(x) is differentiable almost everywhere, and f'(x) is integrable ( f'(x) ˛ L1[0,1]). Is it necessarily true that
1. Devise some Mathematica code or procedures to animate the secantlines through points on the graph of the Cantor function approaching the right-derivative at the endpoint of a complementary interval.
Information on the traditional Cantor function can be found anywhere there is information on the traditional Cantor set. Two readily available sources are
Principles of Mathematical Analysis,3rd edition, Walter Rudin, McGraw-Hill, New York, 1976
and
A Primer of Real Functions, Carus Mathematical Monographs 13, R. P. Boas, Mathematical Association of America, Washington, 1981.
The discussion of the functional relations and the symmetries of the traditional Cantor function comes from ``A Characterizationof the Cantor Function'', D. R. Chalice, Amer. Math. Monthly, Volume 98, Number 3, March 1991, pp. 255-259. This article also contains the idea for the ``stressed'' Cantor function.
:[font = text; inactive; preserveAspect; ]
The definition of the Cantor function used here comes from ``An Interesting Cantor Set'', W. A. Coppel, Amer. Math. Monthly, Volume 90, number 7, August-September 1983, pp.456-461. The discussion of the moments of the Cantor function comes from the same source.
Some of the ideas for the Mathematica code, and the animation of the generalized Cantor sets with a parameter are adapted from Mathematica in Action, Stan Wagon, W. H. Freeman, New York, 1991