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 thirds of a line segment. 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.
The Cantor ternary set is created by iteratively deleting the open middle third from a set of line segments. One starts by deleting the open middle third (1/3, 2/3) from the interval [0, 1], leaving two line segments: [0, 1/3] ∪ [2/3, 1]. Next, the open middle third of each of these remaining segments is deleted, leaving four line segments: [0, 1/9] ∪ [2/9, 1/3] ∪ [2/3, 7/9] ∪ [8/9, 1]. This process is continued ad infinitum, where the nth set is