In mathematics, the Cantor set is a set of points lying on a single line segment that has a number of remarkable and deep properties. It was discovered in 1874 by Henry John Stephen Smith and introduced by German mathematician Georg Cantor in 1883. Through consideration of this set, Cantor and others helped lay the foundations of modern point-set topology. Although Cantor himself defined the set in a general, abstract way, the most common modern construction is the Cantor ternary set, built by removing the middle third of a line segment and then repeating the process with the remaining shorter segments. Cantor himself mentioned the ternary construction only in passing, as an example of a more general idea, that of a perfect set that is nowhere dense.

Construction and formula of the ternary set

The Cantor ternary set \mathcal is created by iteratively deleting the ''open'' middle third from a set of line segments. One starts by deleting the open middle third (, ) from the interval , 1 leaving two line segments: nbsp;∪  1 Next, the open middle third of each of these remaining segments is deleted, leaving four line segments: nbsp;∪  nbsp;∪  nbsp;∪  1 This process is continued ad infinitum, where the ''n''th set is : C_n = \frac 3 \cup \left(\frac 2 +\frac 3 \right) \text n \ge 1, \text C_0=,1 The Cantor ternary set contains all points in the interval , 1that are not deleted at any step in this infinite process: : \mathcal := \bigcap_^\infty C_n. The first six steps of this process are illustrated below. 729px|Cantor ternary set, in seven iterations Using the idea of self-similar transformations, T_L(x)=x/3, T_R(x)=(2+x)/3 and C_n =T_L(C_)\cup T_R(C_), the explicit closed formulas for the Cantor set are : \mathcal=,1\smallsetminus \bigcup_^\infty \bigcup_^ \left(\frac,\frac\right), where every middle third is removed as the open interval \textstyle \left(\frac,\frac\right) from the closed interval \textstyle \leftfrac,\frac\right= \leftfrac,\frac\right surrounding it, or : \mathcal=\bigcap_^\infty \bigcup_^ \left( \leftfrac,\frac\right\cup \leftfrac,\frac\right\right), where the middle third \textstyle \left(\frac,\frac\right) of the foregoing closed interval \textstyle \leftfrac,\frac\right= \leftfrac,\frac\right is removed by intersecting with \textstyle \leftfrac,\frac\right\cup \leftfrac,\frac\right. This process of removing middle thirds is a simple example of a finite subdivision rule. The Cantor ternary set is an example of a fractal string. In arithmetical terms, the Cantor set consists of all real numbers of the unit interval ,1/math> that do not require the digit 1 in order to be expressed as a ternary (base 3) fraction. As the above diagram illustrates, each point in the Cantor set is uniquely located by a path through an infinitely deep binary tree, where the path turns left or right at each level according to which side of a deleted segment the point lies on. Representing each left turn with 0 and each right turn with 2 yields the ternary fraction for a point.


Since the Cantor set is defined as the set of points not excluded, the proportion (i.e., measure) of the unit interval remaining can be found by total length removed. This total is the geometric progression :\sum_^\infty \frac = \frac + \frac + \frac + \frac + \cdots = \frac\left(\frac\right) = 1. So that the proportion left is 1 – 1 = 0. This calculation suggests that the Cantor set cannot contain any interval of non-zero length. It may seem surprising that there should be anything left—after all, the sum of the lengths of the removed intervals is equal to the length of the original interval. However, a closer look at the process reveals that there must be something left, since removing the "middle third" of each interval involved removing open sets (sets that do not include their endpoints). So removing the line segment (, ) from the original interval , 1leaves behind the points and . Subsequent steps do not remove these (or other) endpoints, since the intervals removed are always internal to the intervals remaining. So the Cantor set is not empty, and in fact contains an uncountably infinite number of points (as follows from the above description in terms of paths in an infinite binary tree). It may appear that ''only'' the endpoints of the construction segments are left, but that is not the case either. The number , for example, has the unique ternary form 0.020202... = . It is in the bottom third, and the top third of that third, and the bottom third of that top third, and so on. Since it is never in one of the middle segments, it is never removed. Yet it is also not an endpoint of any middle segment, because it is not a multiple of any power of 1/3. All endpoints of segments are ''terminating'' ternary fractions and are contained in the set : \ \qquad \Bigl(\subset \N_0 \, 3^ \Bigr) which is a countably infinite set. As to cardinality, almost all elements of the Cantor set are not endpoints of intervals, and the whole Cantor set is not countable.



It can be shown that there are as many points left behind in this process as there were to begin with, and that therefore, the Cantor set is uncountable. To see this, we show that there is a function ''f'' from the Cantor set \mathcal to the closed interval ,1that is surjective (i.e. ''f'' maps from \mathcal onto ,1 so that the cardinality of \mathcal is no less than that of ,1 Since \mathcal is a subset of ,1 its cardinality is also no greater, so the two cardinalities must in fact be equal, by the Cantor–Bernstein–Schröder theorem. To construct this function, consider the points in the , 1interval in terms of base 3 (or ternary) notation. Recall that the proper ternary fractions, more precisely: the elements of \bigl(\Z \smallsetminus \\bigr) \cdot 3^, admit more than one representation in this notation, as for example , that can be written as 0.13 = 3, but also as 0.0222...3 = 3, and , that can be written as 0.23 = 3 but also as 0.1222...3 = 3. When we remove the middle third, this contains the numbers with ternary numerals of the form 0.1xxxxx...3 where xxxxx...3 is strictly between 00000...3 and 22222...3. So the numbers remaining after the first step consist of * Numbers of the form 0.0xxxxx...3 (including 0.022222...3 = 1/3) * Numbers of the form 0.2xxxxx...3 (including 0.222222...3 = 1) This can be summarized by saying that those numbers with a ternary representation such that the first digit after the radix point is not 1 are the ones remaining after the first step. The second step removes numbers of the form 0.01xxxx...3 and 0.21xxxx...3, and (with appropriate care for the endpoints) it can be concluded that the remaining numbers are those with a ternary numeral where neither of the first ''two'' digits is 1. Continuing in this way, for a number not to be excluded at step ''n'', it must have a ternary representation whose ''n''th digit is not 1. For a number to be in the Cantor set, it must not be excluded at any step, it must admit a numeral representation consisting entirely of 0s and 2s. It is worth emphasizing that numbers like 1, = 0.13 and = 0.213 are in the Cantor set, as they have ternary numerals consisting entirely of 0s and 2s: 1 = 0.222...3 = 3, = 0.0222...3 = 3 and = 0.20222...3 = 3. All the latter numbers are “endpoints”, and these examples are right limit points of \mathcal. The same is true for the left limit points of \mathcal, e.g. = 0.1222...3 = 3 = 3 and = 0.21222...3 = 3 = 3. All these endpoints are ''proper ternary'' fractions (elements of \Z \cdot 3^) of the form , where denominator ''q'' is a power of 3 when the fraction is in its irreducible form. The ternary representation of these fractions terminates (i. e. is finite) or — recall from above that proper ternary fractions each have 2 representations — is infinite and “ends” in either infinitely many recurring 0s or infinitely many recurring 2s. Such a fraction is a left limit point of \mathcal if its ternary representation contains no 1's and “ends” in infinitely many recurring 0s. Similarly, a proper ternary fraction is a right limit point of \mathcal if it again its ternary expansion contains no 1's and “ends” in infinitely many recurring 2s. This set of endpoints is dense in \mathcal (but not dense in , 1 and makes up a countably infinite set. The numbers in \mathcal which are ''not'' endpoints also have only 0s and 2s in their ternary representation, but they cannot end in an infinite repetition of the digit 0, nor of the digit 2, because then it would be an endpoint. The function from \mathcal to ,1is defined by taking the ternary numerals that do consist entirely of 0s and 2s, replacing all the 2s by 1s, and interpreting the sequence as a binary representation of a real number. In a formula, :f \bigg( \sum_ a_k 3^ \bigg) = \sum_ \frac 2^   where   \forall k\in \N : a_k \in \ . For any number ''y'' in ,1 its binary representation can be translated into a ternary representation of a number ''x'' in \mathcal by replacing all the 1s by 2s. With this, ''f''(''x'') = ''y'' so that ''y'' is in the range of ''f''. For instance if ''y'' = 35 = 0.100110011001...2 = , we write ''x'' = = 0.200220022002...3 = 710. Consequently, ''f'' is surjective. However, ''f'' is ''not'' injective — the values for which ''f''(''x'') coincides are those at opposing ends of one of the ''middle thirds'' removed. For instance, take :13 = 3 (which is a right limit point of \mathcal and a left limit point of the middle third sup>1⁄3,23   and :23 = 3 (which is a left limit point of \mathcal and a right limit point of the middle third sup>1⁄3,23 so :\begin f\bigl(^1\!\!/\!_3 \bigr) = f(0.0\overline_3) = 0.0\overline_2 = \!\! & \!\! 0.1_2 \!\! & \!\! = 0.1\overline_2 = f(0.2\overline_3) = f\bigl(^2\!\!/\!_3 \bigr) . \\ & \parallel \\ & ^1\!\!/\!_2 \end Thus there are as many points in the Cantor set as there are in the interval , 1(which has the uncountable cardinality However, the set of endpoints of the removed intervals is countable, so there must be uncountably many numbers in the Cantor set which are not interval endpoints. As noted above, one example of such a number is 14, which can be written as 0.020202...3 = in ternary notation. In fact, given any a\in1,1/math>, there exist x,y\in\mathcal such that a = y-x. This was first demonstrated by Steinhaus in 1917, who proved, via a geometric argument, the equivalent assertion that \ \; \cap \; (\mathcal\times\mathcal) \neq\emptyset for every a\in1,1/math>. Since this construction provides an injection from 1,1/math> to \mathcal\times\mathcal, we have |\mathcal\times\mathcal|\geq|1,1=\mathfrak as an immediate corollary. Assuming that |A\times A|=|A| for any infinite set A (a statement shown to be equivalent to the axiom of choice by Tarski), this provides another demonstration that |\mathcal|=\mathfrak. The Cantor set contains as many points as the interval from which it is taken, yet itself contains no interval of nonzero length. The irrational numbers have the same property, but the Cantor set has the additional property of being closed, so it is not even dense in any interval, unlike the irrational numbers which are dense in every interval. It has been conjectured that all algebraic irrational numbers are normal. Since members of the Cantor set are not normal, this would imply that all members of the Cantor set are either rational or transcendental.


The Cantor set is the prototype of a fractal. It is self-similar, because it is equal to two copies of itself, if each copy is shrunk by a factor of 3 and translated. More precisely, the Cantor set is equal to the union of two functions, the left and right self-similarity transformations of itself, T_L(x)=x/3 and T_R(x)=(2+x)/3, which leave the Cantor set invariant up to homeomorphism: T_L(\mathcal)\cong T_R(\mathcal)\cong \mathcal=T_L(\mathcal)\cup T_R(\mathcal). Repeated iteration of T_L and T_R can be visualized as an infinite binary tree. That is, at each node of the tree, one may consider the subtree to the left or to the right. Taking the set \ together with function composition forms a monoid, the dyadic monoid. The automorphisms of the binary tree are its hyperbolic rotations, and are given by the modular group. Thus, the Cantor set is a homogeneous space in the sense that for any two points x and y in the Cantor set \mathcal, there exists a homeomorphism h:\mathcal\to \mathcal with h(x)=y. An explicit construction of h can be described more easily if we see the Cantor set as a product space of countably many copies of the discrete space \. Then the map h:\^\N\to\^\N defined by h_n(u):=u_n+x_n+y_n \mod 2 is an involutive homeomorphism exchanging x and y.

Conservation law

It has been found that some form of conservation law is always responsible behind scaling and self-similarity. In the case of Cantor set it can be seen that the d_fth moment (where d_f=\ln(2)/\ln(3) is the fractal dimension) of all the surviving intervals at any stage of the construction process is equal to constant which is equal to one in the case of Cantor set . We know that there are N=2^n intervals of size 1/3^n present in the system at the nth step of its construction. Then if we label the surviving intervals as x_1, x_2, \ldots, x_ then the d_fth moment is x_1^+x_2^ +\cdots+x_^=1 since x_1=x_2= \cdots =x_=1/3^n. The Hausdorff dimension of the Cantor set is equal to ln(2)/ln(3) ≈ 0.631.

Topological and analytical properties

Although "the" Cantor set typically refers to the original, middle-thirds Cantor described above, topologists often talk about "a" Cantor set, which means any topological space that is homeomorphic (topologically equivalent) to it. As the above summation argument shows, the Cantor set is uncountable but has Lebesgue measure 0. Since the Cantor set is the complement of a union of open sets, it itself is a closed subset of the reals, and therefore a complete metric space. Since it is also totally bounded, the Heine–Borel theorem says that it must be compact. For any point in the Cantor set and any arbitrarily small neighborhood of the point, there is some other number with a ternary numeral of only 0s and 2s, as well as numbers whose ternary numerals contain 1s. Hence, every point in the Cantor set is an accumulation point (also called a cluster point or limit point) of the Cantor set, but none is an interior point. A closed set in which every point is an accumulation point is also called a perfect set in topology, while a closed subset of the interval with no interior points is nowhere dense in the interval. Every point of the Cantor set is also an accumulation point of the complement of the Cantor set. For any two points in the Cantor set, there will be some ternary digit where they differ — one will have 0 and the other 2. By splitting the Cantor set into "halves" depending on the value of this digit, one obtains a partition of the Cantor set into two closed sets that separate the original two points. In the relative topology on the Cantor set, the points have been separated by a clopen set. Consequently, the Cantor set is totally disconnected. As a compact totally disconnected Hausdorff space, the Cantor set is an example of a Stone space. As a topological space, the Cantor set is naturally homeomorphic to the product of countably many copies of the space \, where each copy carries the discrete topology. This is the space of all sequences in two digits :2^\mathbb=\, which can also be identified with the set of 2-adic integers. The basis for the open sets of the product topology are cylinder sets; the homeomorphism maps these to the subspace topology that the Cantor set inherits from the natural topology on the real number line. This characterization of the Cantor space as a product of compact spaces gives a second proof that Cantor space is compact, via Tychonoff's theorem. From the above characterization, the Cantor set is homeomorphic to the p-adic integers, and, if one point is removed from it, to the p-adic numbers. The Cantor set is a subset of the reals, which are a metric space with respect to the ordinary distance metric; therefore the Cantor set itself is a metric space, by using that same metric. Alternatively, one can use the p-adic metric on 2^\mathbb: given two sequences (x_n),(y_n)\in 2^\mathbb, the distance between them is d((x_n),(y_n)) = 2^, where k is the smallest index such that x_k \ne y_k; if there is no such index, then the two sequences are the same, and one defines the distance to be zero. These two metrics generate the same topology on the Cantor set. We have seen above that the Cantor set is a totally disconnected perfect compact metric space. Indeed, in a sense it is the only one: every nonempty totally disconnected perfect compact metric space is homeomorphic to the Cantor set. See Cantor space for more on spaces homeomorphic to the Cantor set. The Cantor set is sometimes regarded as "universal" in the category of compact metric spaces, since any compact metric space is a continuous image of the Cantor set; however this construction is not unique and so the Cantor set is not universal in the precise categorical sense. The "universal" property has important applications in functional analysis, where it is sometimes known as the ''representation theorem for compact metric spaces''. For any integer ''q'' ≥ 2, the topology on the group G=Z''q''ω (the countable direct sum) is discrete. Although the Pontrjagin dual Γ is also Z''q''ω, the topology of Γ is compact. One can see that Γ is totally disconnected and perfect - thus it is homeomorphic to the Cantor set. It is easiest to write out the homeomorphism explicitly in the case ''q''=2. (See Rudin 1962 p 40.) The geometric mean of the Cantor set is approximately 0.274974.

Measure and probability

The Cantor set can be seen as the compact group of binary sequences, and as such, it is endowed with a natural Haar measure. When normalized so that the measure of the set is 1, it is a model of an infinite sequence of coin tosses. Furthermore, one can show that the usual Lebesgue measure on the interval is an image of the Haar measure on the Cantor set, while the natural injection into the ternary set is a canonical example of a singular measure. It can also be shown that the Haar measure is an image of any probability, making the Cantor set a universal probability space in some ways. In Lebesgue measure theory, the Cantor set is an example of a set which is uncountable and has zero measure.

Cantor numbers

If we define a Cantor number as a member of the Cantor set, then *(1) Every real number in , 2is the sum of two Cantor numbers. *(2) Between any two Cantor numbers there is a number that is not a Cantor number.

Descriptive set theory

The Cantor set is a meager set (or a set of first category) as a subset of ,1(although not as a subset of itself, since it is a Baire space). The Cantor set thus demonstrates that notions of "size" in terms of cardinality, measure, and (Baire) category need not coincide. Like the set \mathbb\cap,1/math>, the Cantor set \mathcal is "small" in the sense that it is a null set (a set of measure zero) and it is a meager subset of ,1 However, unlike \mathbb\cap,1/math>, which is countable and has a "small" cardinality, \aleph_0, the cardinality of \mathcal is the same as that of ,1 the continuum \mathfrak, and is "large" in the sense of cardinality. In fact, it is also possible to construct a subset of ,1that is meager but of positive measure and a subset that is non-meager but of measure zero: By taking the countable union of "fat" Cantor sets \mathcal^ of measure \lambda = (n-1)/n (see Smith–Volterra–Cantor set below for the construction), we obtain a set \mathcal:=\bigcup_^\mathcal^which has a positive measure (equal to 1) but is meager in ,1 since each \mathcal^ is nowhere dense. Then consider the set \mathcal^=,1setminus\bigcup_^\infty\mathcal^. Since \mathcal\cup\mathcal^ = ,1/math>, \mathcal^ cannot be meager, but since \mu(\mathcal)=1, \mathcal^ must have measure zero.


Smith–Volterra–Cantor set

Instead of repeatedly removing the middle third of every piece as in the Cantor set, we could also keep removing any other fixed percentage (other than 0% and 100%) from the middle. In the case where the middle 810 of the interval is removed, we get a remarkably accessible case — the set consists of all numbers in ,1that can be written as a decimal consisting entirely of 0s and 9s. If a fixed percentage is removed at each stage, then the limiting set will have measure zero, since the length of the remainder (1-f)^n\to 0 as n\to\infty for any ''f'' such that 0. On the other hand, "fat Cantor sets" of positive measure can be generated by removal of smaller fractions of the middle of the segment in each iteration. Thus, one can construct sets homeomorphic to the Cantor set that have positive Lebesgue measure while still being nowhere dense. If an interval of length r^n (r\leq 1/3) is removed from the middle of each segment at the ''n''th iteration, then the total length removed is \sum_^\infty 2^r^n=r/(1-2r), and the limiting set will have a Lebesgue measure of \lambda=(1-3r)/(1-2r). Thus, in a sense, the middle-thirds Cantor set is a limiting case with r=1/3. If 0, then the remainder will have positive measure with 0<\lambda<1. The case r=1/4 is known as the Smith–Volterra–Cantor set, which has a Lebesgue measure of 1/2.

Stochastic Cantor set

One can modify the construction of the Cantor set by dividing randomly instead of equally. Besides, to incorporate time we can divide only one of the available intervals at each step instead of dividing all the available intervals. In the case of stochastic triadic Cantor set the resulting process can be described by the following rate equation :=-c(x,t)+2\int_x^\infty (y-x)c(y,t) \, dy, and for the stochastic dyadic Cantor set :=-xc(x,t)+(1+p)\int_x^\infty c(y,t) \, dy, where c(x,t)dx is the number of intervals of size between x and x+dx. In the case of triadic Cantor set the fractal dimension is 0.5616 which is less than its deterministic counterpart 0.6309. In the case of stochastic dyadic Cantor set the fractal dimension is p which is again less than that of its deterministic counterpart \ln (1+p)/\ln 2. In the case of stochastic dyadic Cantor set the solution for c(x,t) exhibits dynamic scaling as its solution in the long-time limit is t^e^ where the fractal dimension of the stochastic dyadic Cantor set d_f=p. In either case, like triadic Cantor set, the d_fth moment (\int x^c(x,t)dx= \text) of stochastic triadic and dyadic Cantor set too are conserved quantities.

Cantor dust

Cantor dust is a multi-dimensional version of the Cantor set. It can be formed by taking a finite Cartesian product of the Cantor set with itself, making it a Cantor space. Like the Cantor set, Cantor dust has zero measure. A different 2D analogue of the Cantor set is the Sierpinski carpet, where a square is divided up into nine smaller squares, and the middle one removed. The remaining squares are then further divided into nine each and the middle removed, and so on ad infinitum. One 3D analogue of this is the Menger sponge. Christopher Domas presented a interactive binary visualization tool based on cantor dust at Black Hat USA 2012.

Historical remarks

Cantor himself defined the set in a general, abstract way, and mentioned the ternary construction only in passing, as an example of a more general idea, that of a perfect set that is nowhere dense. The original paper provides several different constructions of the abstract concept. This set would have been considered abstract at the time when Cantor devised it. Cantor himself was led to it by practical concerns about the set of points where a trigonometric series might fail to converge. The discovery did much to set him on the course for developing an abstract, general theory of infinite sets.

See also

*Smith–Volterra–Cantor set *Hexagrams (I Ching) *Cantor function *Cantor cube *Antoine's necklace *Koch snowflake *Knaster–Kuratowski fan *List of fractals by Hausdorff dimension *Moser–de Bruijn sequence



* * * * * . *

External links

Cantor Sets
Cantor Set and Function
at cut-the-knot
Cantor Set
at Platonic Realms {{DEFAULTSORT:Cantor Set Category:Measure theory Category:Topological spaces Category:Sets of real numbers Category:Georg Cantor Category:L-systems