The Cantor set , sometimes also called the Cantor comb or no middle third set (Cullen 1968, pp. 78-81), is given by taking the interval (set ), removing the open middle third (), removing the middle third of each of the two remaining pieces (), and continuing this procedure ad infinitum. It is therefore the set of points in the interval whose ternary expansions do not contain 1, illustrated above.
Iterating the process 1 -> 101, 0 -> 000 starting with 1 gives the sequence 1, 101, 101000101, 101000101000000000101000101, .... The sequence of binary bits thus produced is therefore 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, ... (Sloane's A088917) whose th term is amazingly given by (mod 3), where is a (central) Delannoy number and is a Legendre polynomial (E. W. Weisstein, Apr. 9, 2006). The recurrence plot for this sequence is illustrated above.
This produces the set of real numbers such that
|
(1)
|
where may equal 0 or 2 for each . This is an infinite, perfect set. The total length of the line segments in the th iteration is
|
(2)
|
and the number of line segments is , so the length of each element is
|
(3)
|
and the capacity dimension is
(Sloane's A102525). The Cantor set is nowhere dense, and has Lebesgue measure 0.
A general Cantor set is a closed set consisting entirely of boundary points. Such sets are uncountable and may have 0 or positive Lebesgue measure. The Cantor set is the only totally disconnected, perfect, compact metric space up to a homeomorphism (Willard 1970).