Take the closed interval [0, 1]. Remove the open interval that forms the middle third, that is, the open interval (⅓, ⅔). From each of the remaining intervals again remove the open interval that forms the middle third. The Cantor set is the set that remains when this process is continued indefinitely. It consists of those real numbers whose ternary representation (0.d1d2d3…)3 has each ternary digit di equal to either 0 or 2.
http://www.mste.uiuc.edu/reese/buffon/bufjava.html A visual representation of the Cantor set.