Maths WorkshopMaths problems with full solutions
Exercise 2097Logic, sets and proofs › Countability and cardinalityM1Added 3 Nov 2026

Cantor function

#Cantor function#cardinality#devil staircase

Statement

Describe the Cantor function (devil's staircase) and its role in cardinality.

Hint

It is a continuous, non-decreasing surjection [0,1]→[0,1][0,1]\to[0,1] that is constant on the removed intervals.

Show solutionHide solution

Solution

Construction. On the middle-third interval (1/3,2/3)(1/3,2/3) removed at step 11, set F=1/2F=1/2. On (1/9,2/9)(1/9,2/9) set F=1/4F=1/4, on (7/9,8/9)(7/9,8/9) set F=3/4F=3/4, etc.

Properties.
- Continuous and non-decreasing.
- Constant on each removed interval.
- Surjective onto [0,1][0,1].
- Derivative 00 almost everywhere.

Cardinality. Surjection from the Cantor set onto [0,1][0,1] confirms ∣K∣≥2ℵ0|K|\ge2^{\aleph_0}, hence ∣K∣=2ℵ0|K|=2^{\aleph_0}.

Conclusion. The Cantor function provides a concrete surjection from the Cantor set to [0,1][0,1].