Tutorials › Measure Theory › Uncountability and Topology of the Cantor Set

Non-Measurable Sets and the Cantor Function · Tutorial 153 of 798

Uncountability and Topology of the Cantor Set

See how the Cantor set’s finite-stage geometry and restricted ternary expansions establish its basic topological properties and uncountability.

Advanced 10 min read

What You'll Learn

  • Define the Cantor set as the intersection of its finite stages.
  • Describe each finite stage by closed intervals indexed by finite digit words.
  • Prove that the Cantor set is closed and has empty interior.
  • Encode binary sequences as points of the Cantor set using ternary digits zero and two.
  • Prove that this encoding is injective and use diagonalization to establish uncountability.
  • Recognize why a ternary expansion containing the digit one does not rule out membership in the Cantor set.

From Finite Stages to the Cantor Set

Removing open middle thirds produces a set whose geometry can be examined at every finite stage. The intersection of those stages is closed, but it contains no interval, however small. At the same time, its points can encode every infinite binary sequence. These facts show how a set can be topologically thin without being countable.

Work in the real line \(\mathbb{R}\) with its usual topology; the arguments in this tutorial concern sets and topology, not a measure. Let \(C_0=[0,1]\). Given \(C_n\), form \(C_{n+1}\) by removing the open middle third of every closed interval that makes up \(C_n\). The middle-third Cantor set is

$$ C=\bigcap_{n=0}^{\infty}C_n. $$

At each stage, \(C_n\) consists of \(2^n\) closed intervals, each of length \(3^{-n}\). More precisely, for a word \(w=(d_1,\ldots,d_n)\) with each \(d_j\in\{0,2\}\), define

$$ s_w=\sum_{j=1}^n\frac{d_j}{3^j}. $$

Then the intervals at stage \(n\) are \([s_w,s_w+3^{-n}]\). Indeed, the tail after a fixed prefix of length \(n\), if all later digits are 2, has sum \(\sum_{j=n+1}^{\infty}2/3^j=3^{-n}\). At the next step each interval splits into its left and right closed thirds, whose left endpoints correspond to appending 0 and 2, respectively. This verifies the description by induction, starting from \(C_0=[0,1]\). In particular, \(C_{n+1}\subseteq C_n\).

Worked Example: The Two Endpoints

The all-zero digit sequence has sum \(0\), while the sequence with every digit equal to 2 has sum

$$ \sum_{j=1}^{\infty}\frac{2}{3^j} =\frac{2/3}{1-1/3}=1. $$

For every \(n\), the zero sequence has its length-\(n\) prefix interval \([0,3^{-n}]\), so 0 belongs to every \(C_n\). The all-2 sequence has prefix interval \([1-3^{-n},1]\), so 1 belongs to every \(C_n\). Thus both endpoints lie in \(C\). Check: at stage 2 the intervals are \([0,1/9]\), \([2/9,1/3]\), \([2/3,7/9]\), and \([8/9,1]\); they include both 0 and 1.

Closedness and Empty Interior

Theorem: The Cantor set \(C\) is closed in \(\mathbb{R}\) and has empty interior.

Proof. Each \(C_n\) is a finite union of closed intervals, so each \(C_n\) is closed. An arbitrary intersection of closed sets is closed: its complement is the union of their open complements, which is open. Therefore \(C=\bigcap_{n=0}^{\infty}C_n\) is closed.

To prove that \(C\) has empty interior, suppose instead that it contains a nonempty open interval. Then it contains some bounded open interval \(J=(a,b)\) of positive length. Choose \(n\) so large that \(3^{-n}<b-a\). Since \(C\subseteq C_n\), we would have \(J\subseteq C_n\). But \(C_n\) is a finite union of disjoint closed intervals, each of length \(3^{-n}\), separated by nonempty gaps. An interval contained in this union must lie in one of its component intervals: if it met two components, it would also contain a point in the gap between them. It follows that \(b-a\le 3^{-n}\), contradicting the choice of \(n\). Hence no nonempty open interval lies in \(C\), which means \(C\) has empty interior. \(\square\)

Closedness and empty interior express different properties. Closedness says that \(C\) contains all its limit points. Empty interior says that no open interval is contained in \(C\). The proof of the second property relies on the interval lengths tending to zero, not on any claim that the set itself is small in some other sense.

Worked Example: Locating the Point with Digits 2020...

Consider the infinite sequence of ternary digits \(2,0,2,0,\ldots\). Its sum is

$$ x=\frac23+\frac{2}{3^3}+\frac{2}{3^5}+\cdots =\frac{2/3}{1-1/9} =\frac34. $$

The first digit gives the stage-1 interval \([2/3,1]\), which contains \(3/4\). The first two digits give \([2/3,7/9]\), and \(2/3\le 3/4\le 7/9\). The first three digits give \([20/27,21/27]=[20/27,7/9]\); indeed \(20/27\le3/4\le7/9\), since \(80\le81\) and \(81\le84\) after multiplying by 108. Each longer prefix likewise identifies an interval at its finite stage containing the sum: the remaining tail is nonnegative and at most \(3^{-n}\) after \(n\) digits. Thus \(x\in C_n\) for every \(n\), and \(3/4\in C\). Check: the displayed series sums to \((2/3)/(1-1/9)=3/4\), as claimed.

Encoding Infinite Binary Sequences

For each infinite binary sequence \(a=(a_1,a_2,\ldots)\), where \(a_j\in\{0,1\}\), define a real number by using ternary digits \(2a_j\):

$$ \Phi(a)=\sum_{j=1}^{\infty}\frac{2a_j}{3^j}. $$

The series converges because its terms are nonnegative and bounded above term by term by the convergent geometric series \(\sum_{j=1}^{\infty}2/3^j=1\). For a prefix of length \(n\), let \(s_n=\sum_{j=1}^n2a_j/3^j\). The remaining tail satisfies

$$ 0\le \Phi(a)-s_n \le \sum_{j=n+1}^{\infty}\frac{2}{3^j} =3^{-n}. $$

Consequently \(\Phi(a)\in[s_n,s_n+3^{-n}]\), one of the stage-\(n\) intervals. This holds for every \(n\), so \(\Phi(a)\in C\).

Proposition: The map \(\Phi:\{0,1\}^{\mathbb{N}}\to C\) defined above is injective.

Proof. Suppose \(a\) and \(b\) are distinct binary sequences. There is a first index \(k\) at which they differ. Interchanging their names if necessary, take \(a_k=1\) and \(b_k=0\); then \(a_j=b_j\) for \(j<k\). At index \(k\), the difference \(\Phi(a)-\Phi(b)\) contributes \(2/3^k\). The largest possible opposing contribution from all later indices occurs if \(a_j=0\) and \(b_j=1\) for every \(j>k\); its magnitude is at most \(\sum_{j=k+1}^{\infty}2/3^j=1/3^k\). Therefore

$$ \Phi(a)-\Phi(b)\ge \frac{2}{3^k}-\frac{1}{3^k} =\frac{1}{3^k}>0. $$

In particular \(\Phi(a)\ne\Phi(b)\), proving injectivity. \(\square\)

Theorem: The Cantor set \(C\) is uncountable.

Proof. First, the set of infinite binary sequences is uncountable. If all such sequences could be listed as \(a^{(1)},a^{(2)},\ldots\), define a sequence \(b\) by \(b_n=1-a^{(n)}_n\). Each \(b_n\) is either 0 or 1, so \(b\) is an infinite binary sequence. For every \(n\), \(b\) differs from \(a^{(n)}\) in its \(n\)-th coordinate, so it is absent from the proposed list. This contradiction proves uncountability. Since \(\Phi\) is injective and maps every binary sequence into \(C\), its image in \(C\) is uncountable. Thus \(C\) is uncountable. \(\square\)

Worked Example: A Point with Digits 200200...

Take the binary sequence \(1,0,0,1,0,0,\ldots\), which produces ternary digits \(2,0,0,2,0,0,\ldots\). Its value is

$$ x=\frac23+\frac{2}{3^4}+\frac{2}{3^7}+\cdots =\frac23\left(1+\frac1{27}+\frac1{27^2}+\cdots\right) =\frac23\cdot\frac{1}{1-1/27} =\frac{9}{13}. $$

The encoding argument shows that each prefix places \(x\) in the corresponding finite-stage interval, so \(9/13\in C\). For a direct check at stage 3, the prefix 200 gives \([2/3,19/27]\). We have \(2/3<9/13<19/27\): cross-multiplication gives \(26<27\) and \(243<247\). At stage 4 the prefix 2002 gives \([56/81,57/81]\); indeed \(9/13=56/81+1/1053\), and \(0<1/1053<1/81\). Check: the geometric series evaluates to \(18/26=9/13\), agreeing with the stated value.

A Common Ternary-Expansion Pitfall

A point’s membership in \(C\) is not decided by inspecting an arbitrary ternary expansion and rejecting it whenever a digit 1 appears. Such expansions need not be unique. For example, \(1/3\) has the expansion \(0.1\) in base three, but it also has the expansion \(0.02222\ldots\), because

$$ \sum_{j=2}^{\infty}\frac{2}{3^j} =\frac{2/9}{1-1/3} =\frac13. $$

The second expansion uses only digits zero and two, and the prefix argument shows that \(1/3\in C\). In particular, the removed middle third is the open interval \((1/3,2/3)\), not the closed interval \([1/3,2/3]\): its endpoints remain in the Cantor set. The encoding above needs only to assign a point to each restricted digit sequence and prove that this assignment is injective; it does not require claiming that every possible ternary representation is unique.

The three properties proved here describe different aspects of the same set: \(C\) is closed, has empty interior, and is uncountable. Its finite-stage intervals make the first two properties visible, while restricted ternary expansions connect the third to the diagonal argument for binary sequences.

Check Your Understanding

Use the finite-stage interval description and the proofs above to answer the following.

  1. Why is each stage \(C_n\) closed, and what fact about intersections of closed sets gives closedness of \(C\)?
  2. In the empty-interior proof, why must an interval contained in \(C_n\) lie in a single component interval?
  3. For two distinct binary sequences whose first difference is at index \(k\), what is the largest possible opposing contribution from all later digits?
  4. Compute the point encoded by the binary sequence \(1,1,0,1,1,0,\ldots\), and explain why its value belongs to \(C\).
  5. Explain why the expansion \(0.1\) in base three does not show that \(1/3\) is absent from the Cantor set.