Video 4, chapter 3

The Cantor Set and What Remains After Removal

How the middle-thirds Cantor set is built by removing open intervals, why it has measure zero, and how ternary expansions with only the digits 0 and 2 name the points that remain.

  • Video 4, chapter 3
  • One rule, repeated

Start with the segment from 00 to 11 and remove its middle third. Then remove the middle third of each of the two pieces that are left, and keep going forever. Each step keeps only two thirds of the remaining length, so the total length shrinks toward zero. Is anything left at the end? This page builds the Cantor set, shows that it has total length zero and still contains infinitely many points, and uses base three to say exactly which points survive.

Key terms

Cantor set

Definition The middle-thirds Cantor set is built in stages. Stage 00 is the closed interval C0=[0,1]C_0 = [0, 1]. To pass from one stage to the next, take each closed interval [a,b][a, b] of the current stage, let d=(b−a)/3d = (b - a)/3, and remove its open middle third, the points strictly between a+da + d and b−db - d, keeping the two closed outer thirds [a,a+d][a, a + d] and [b−d,b][b - d, b]. Stage nn, written CnC_n, consists of 2n2^n separate closed intervals, each of length 3−n3^{-n}, with total length (2/3)n(2/3)^n. The Cantor set CC is the set of points that belong to every stage,

C=C0∩C1∩C2∩⋯ .C = C_0 \cap C_1 \cap C_2 \cap \cdots.

The total length of the stages tends to 00, and CC has total length zero, yet CC is not empty. It contains 00, 11 and every endpoint of every interval of every stage, because an endpoint is never strictly inside a removed middle third, and it also contains points that are never endpoints, such as 14\tfrac14. The Cantor set is made of two copies of itself, each scaled by 13\tfrac13,

C=13C∪(13C+23),C = \tfrac13 C \cup \left(\tfrac13 C + \tfrac23\right),

where 13C\tfrac13 C is the set of all numbers x/3x/3 with xx in CC, and adding 23\tfrac23 shifts that copy to the right end. It is named after Georg Cantor, who described it in 1883.

In plain words Keep cutting out the middle of every piece. The pieces get so short, so fast, that their total length disappears in the limit. But cutting out an open middle never touches the ends of a piece, and those ends, along with many other points, are never removed.

Example The first two stages are

C1=[0,13]∪[23,1],C2=[0,19]∪[29,13]∪[23,79]∪[89,1],\begin{aligned} C_1 &= \bigl[0, \tfrac13\bigr] \cup \bigl[\tfrac23, 1\bigr], \\[0.4em] C_2 &= \bigl[0, \tfrac19\bigr] \cup \bigl[\tfrac29, \tfrac13\bigr] \\[0.4em] &\quad \cup \bigl[\tfrac23, \tfrac79\bigr] \cup \bigl[\tfrac89, 1\bigr], \end{aligned}

with total lengths 23\tfrac23 and 49\tfrac49, and C3C_3 has 88 intervals of length 127\tfrac{1}{27} with total length 827\tfrac{8}{27}. The point 14\tfrac14 lies in the left third [0,13]\bigl[0, \tfrac13\bigr]. Stretching that third by 33 to fill [0,1][0, 1] sends 14\tfrac14 to 34\tfrac34, which lies in the right third, and stretching the right third [23,1]\bigl[\tfrac23, 1\bigr] to fill [0,1][0, 1] sends 34\tfrac34 back to 3⋅34−2=143 \cdot \tfrac34 - 2 = \tfrac14. So the pattern left, right, left, right repeats forever, 14\tfrac14 always lands in a kept third, and it is in CC. It is never an endpoint, because every endpoint is a fraction whose denominator is a power of 33, while 14=m/3n\tfrac14 = m/3^n would need 3n=4m3^n = 4m, an odd number equal to an even one.

Open interval

Definition For real numbers a<ba < b, the open interval (a,b)(a, b) is the set of all xx with a<x<ba < x < b, and the closed interval [a,b][a, b] is the set of all xx with a≤x≤ba \le x \le b. Both have length b−ab - a, but the open interval leaves out its two endpoints and the closed one includes them. Removing an open interval (c,d)(c, d) from a closed interval [a,b][a, b] with a≤c<d≤ba \le c < d \le b leaves the two closed intervals [a,c][a, c] and [d,b][d, b], so the points cc and dd stay. In the Cantor construction every removed middle third is open, so every stage is a union of closed intervals and every endpoint created at any stage stays in the Cantor set. A single point has length zero, so removing or keeping endpoints never changes a length, but it does change which points are left.

In plain words Open means without the ends. Taking out the open middle third of [0,1][0, 1] takes out every point strictly between 13\tfrac13 and 23\tfrac23, so 13\tfrac13 and 23\tfrac23 themselves stay.

Example Removing (13,23)\bigl(\tfrac13, \tfrac23\bigr) from [0,1][0, 1] leaves [0,13]∪[23,1]\bigl[0, \tfrac13\bigr] \cup \bigl[\tfrac23, 1\bigr]. The point 12\tfrac12 is strictly between 13\tfrac13 and 23\tfrac23, so it is removed at the first step. The point 13\tfrac13 is never removed, since at every later step it is the right endpoint of the interval that contains it, first [29,13]\bigl[\tfrac29, \tfrac13\bigr], then [827,13]\bigl[\tfrac{8}{27}, \tfrac13\bigr], and so on, and the removed middle of an interval never contains its endpoints.

Measure zero

Definition A set EE of real numbers has measure zero, or length zero, if for every positive number ε\varepsilon there is a finite or endless list of intervals that covers EE, meaning every point of EE lies in at least one of them, and whose lengths add up to less than ε\varepsilon. Each stage CnC_n covers the Cantor set with 2n2^n intervals of total length (2/3)n(2/3)^n, and because 23<1\tfrac23 < 1 this total drops below any given ε\varepsilon once nn is large enough. So the Cantor set has measure zero. Measure zero does not mean empty or finite. A single point, every finite set and every set whose elements can be arranged in one endless list, such as the rational numbers, have measure zero, and the Cantor set has measure zero although its points cannot be arranged in such a list at all.

In plain words A set has measure zero when it can be hidden inside intervals whose total length is as small as you like. Points have no length, so even infinitely many of them can take up no length at all.

Example To cover the Cantor set with intervals of total length less than 0.010.01, stage 1212 works. Its 40964096 intervals each have length 1531441\tfrac{1}{531441}, and their total is

(23)12=4096531441≈0.0077.\left(\tfrac23\right)^{12} = \frac{4096}{531441} \approx 0.0077.

Stage 1111 is not enough, since its total is 2048177147≈0.0116\tfrac{2048}{177147} \approx 0.0116. The removed intervals, 11 of length 13\tfrac13, then 22 of length 19\tfrac19, then 44 of length 127\tfrac{1}{27} and so on, have total length

13+29+427+⋯=1/31−2/3=1,\begin{aligned} &\tfrac13 + \tfrac29 + \tfrac{4}{27} + \cdots \\[0.4em] &\quad = \frac{1/3}{1 - 2/3} = 1, \end{aligned}

the whole length of [0,1][0, 1], and still they do not remove every point. Measure zero depends on removing enough. If step kk removed from each of the 2k−12^{k-1} intervals only an open middle piece of length 1/4k1/4^k, the removed lengths would add up to 12\tfrac12, and the points that remain, a set often called a fat Cantor set, would have total length 12\tfrac12.

Ternary expansion

Definition A ternary expansion, or base-three expansion, of a number xx in [0,1][0, 1] is an endless string of digits (0.a1a2a3…)3(0.a_1 a_2 a_3 \ldots)_3, each digit aka_k equal to 00, 11 or 22, such that

x=∑k=1∞ak3k=a13+a29+a327+⋯ .\begin{aligned} x &= \sum_{k=1}^{\infty} \frac{a_k}{3^k} \\[0.4em] &= \frac{a_1}{3} + \frac{a_2}{9} + \frac{a_3}{27} + \cdots. \end{aligned}

Every xx in [0,1][0, 1] has at least one ternary expansion. A number has exactly two when it is a fraction m/3nm/3^n strictly between 00 and 11, one ending in endless 00s and one ending in endless 22s, as in 13=(0.1000…)3=(0.0222…)3\tfrac13 = (0.1000\ldots)_3 = (0.0222\ldots)_3, and every other number has exactly one. The first digit tells which third of [0,1][0, 1] contains xx. An expansion beginning with 00 puts xx in [0,13]\bigl[0, \tfrac13\bigr], one beginning with 22 puts it in [23,1]\bigl[\tfrac23, 1\bigr], and xx lies in the removed open middle third exactly when every expansion of xx begins with 11. Each later digit does the same inside the third chosen before. So xx belongs to the Cantor set exactly when it has at least one ternary expansion that uses only the digits 00 and 22. Such an expansion is unique, so the points of the Cantor set match the endless strings of 00s and 22s one to one, and the reasoning of Cantor’s diagonal argument, applied to these strings, shows that they cannot all be listed.

In plain words A ternary expansion is a set of directions for finding a point. Each digit says which third to go into, 00 for the left, 11 for the middle and 22 for the right. The middle thirds are the parts that get removed, so the points that survive are exactly the ones that can be reached without ever going into a middle third.

Example The expansion (0.020202…)3(0.020202\ldots)_3 says left, right, left, right and so on. Its value is a geometric series with first term 29\tfrac29 and ratio 19\tfrac19,

29+281+2729+⋯=2/91−1/9=14,\begin{aligned} &\frac{2}{9} + \frac{2}{81} + \frac{2}{729} + \cdots \\[0.4em] &\quad = \frac{2/9}{1 - 1/9} = \frac14, \end{aligned}

so 14\tfrac14 is in the Cantor set, as found above. In the same way 34=(0.2020…)3\tfrac34 = (0.2020\ldots)_3 is in it. The number 12=(0.111…)3\tfrac12 = (0.111\ldots)_3 has only this one expansion, so it is not. The endpoint 13\tfrac13 shows why the rule says at least one expansion. Its expansion (0.1000…)3(0.1000\ldots)_3 contains a 11, but its other expansion (0.0222…)3(0.0222\ldots)_3, whose value is 2/91−1/3=13\tfrac{2/9}{1 - 1/3} = \tfrac13, uses only 00 and 22, so 13\tfrac13 is in the Cantor set, as the construction says.

Check yourself

  1. How many intervals make up stage 55, how long is each one, and how much total length has been removed by then?
Show the answer

Each step doubles the number of intervals and divides their length by 33, so stage 55 has 25=322^5 = 32 intervals, each of length 3−5=12433^{-5} = \tfrac{1}{243}. Their total length is 32243≈0.132\tfrac{32}{243} \approx 0.132, so the removed length is

1−32243=211243≈0.868.1 - \frac{32}{243} = \frac{211}{243} \approx 0.868.

Adding the removed pieces step by step gives the same value, since 13+29+427+881+16243=211243\tfrac13 + \tfrac29 + \tfrac{4}{27} + \tfrac{8}{81} + \tfrac{16}{243} = \tfrac{211}{243}.

  1. The numbers 79\tfrac79 and 49\tfrac49 have the ternary expansions (0.21000…)3(0.21000\ldots)_3 and (0.11000…)3(0.11000\ldots)_3, which both contain the digit 11. Decide whether each number belongs to the Cantor set.
Show the answer

The digit 11 in these expansions alone decides nothing, because membership asks whether some expansion avoids the digit 11. Each of these numbers is a fraction with denominator 9=329 = 3^2, so each has a second expansion ending in endless 22s.

For 79\tfrac79 the second expansion is (0.20222…)3(0.20222\ldots)_3, whose value is 23+2/271−1/3=23+19=79\tfrac23 + \tfrac{2/27}{1 - 1/3} = \tfrac23 + \tfrac19 = \tfrac79. It uses only 00 and 22, so 79\tfrac79 is in the Cantor set. It is the right endpoint of the interval [23,79]\bigl[\tfrac23, \tfrac79\bigr] of stage 22.

For 49\tfrac49 the second expansion is (0.10222…)3(0.10222\ldots)_3, which still begins with 11. Both expansions begin with 11, so 49\tfrac49 lies in the open middle third (13,23)\bigl(\tfrac13, \tfrac23\bigr) and is removed at the first step.

  1. Change the rule so that the closed middle third of each piece is removed, endpoints included. Which of the points 00, 13\tfrac13 and 14\tfrac14 survive, and what happens to the total length?
Show the answer

The point 13\tfrac13 is an endpoint of the first closed middle third [13,23]\bigl[\tfrac13, \tfrac23\bigr], so it is removed at the first step, and what is left is [0,13)∪(23,1]\bigl[0, \tfrac13\bigr) \cup \bigl(\tfrac23, 1\bigr], which is no longer a union of closed intervals.

A closed middle third is the open middle third together with its two endpoints, and these endpoints are fractions strictly between 00 and 11 whose denominators are powers of 33. The point 00 is never strictly inside an open middle third, as in the original construction, and it is not strictly between 00 and 11, so it survives. The point 14\tfrac14 is never inside an open middle third either, because it is in the Cantor set, and it is not a fraction with a power of 33 as denominator, so it survives as well.

The total length after nn steps is still (2/3)n(2/3)^n, because the extra points removed have no length, and the set that survives still has measure zero. The change removes the endpoints of all the removed middle thirds and keeps every other point of the Cantor set.

How this lesson connects