Question: Can you think of two sets, A and B, where B is a subset of A, and B has the same number of elements as A. And yet almost every element of A is not in B?
How can B have the same size as A while also containing 0% of the elements in A?
This magical subset I have in mind is the Cantor Set. And the parent set A is the unit interval [0,1]. The Cantor set has a bunch of unintuitive properties that appear to be paradoxical, but is just an example of the strangeness of the real numbers. Here’s how it’s built:
The Cantor Set
Starting with a closed line segment, like the interval [0,1] and remove the middle third, leaving you with two line segments, L = [0, 1/3] and R = [2/3, 1]. Now remove the middle thirds of these, creating four line segments LL = [0,1/9], LR = [2/9,1/3], RL = [2/3,7/9], and RR = [8/9,1]. Then remove the middle thirds of all these, and repeat ad infinitum. Everything that survives is the Cantor Set.
What’s In It?
The Cantor set is far from empty. First of all, it contains each endpoint of each interval we removed, like the numbers 0, 1, 1/3, 2/3, 1/9, 2/9, 7/9, 8/9, and so on. It even contains the number 1/4, even though it’s never an endpoint of any of the middle thirds. It sure feels empty, because after infinitely many iterations, we’ve removed almost the entire interval [0,1]!
The Cantor Set Has Measure Zero
We started with the interval [0,1] which has a length (or measure) of 1.
The set of numbers we removed (visualized below in blue) in order to make the Cantor set have a combined length of 1.
… Thus the length (or measure) of the Cantor set is 0. It has the same measure as the empty set, or a single point! And yet it’s far from empty!
The Cantor Set Is Uncountably Infinite
Each point in the Cantor set can be uniquely determined by an infinite sequence of Ls and Rs, and there are uncountably many ways to do this! You can make a one-to-one pairing of these L,R sequences and the set [0,1] by writing each real number in [0,1] using base-2 (AKA binary), and then the bijection is done by simply replacing the Ls and Rs with 0s and 1s. To find out more about different levels of infinity, check out last week’s post.
The Cantor Set Is Nowhere Dense
Irrationals have a property known as density. Every real number is arbitrarily close to an irrational number. There are infinitely many irrationals packed in between 0 and 1, also between 0 and 0.01, and between 0 and 0.000000001! Even the rationals are dense. They’re packed in like sardines.
But the Cantor set isn’t. The points are in some sense spaced apart, living on little islands.
And yet it has a greater cardinality than the rationals!
Uncountably infinite sets don’t necessarily have to live on a continuum.
This is crazy to me. In terms of cardinality, the Cantor set is the same size as the set [0,1] and even the whole real number line. And simultaneously, the Cantor set is virtually empty, with measure zero! If you were to pick a number from the interval [0,1] at random, there is a 0% chance that it would be in the Cantor set!
Numbers are fascinating.
There is a video version of this post, which you can watch here!