Tutorials › Measure Theory › Ambiguous Ternary Expansions at Cantor Endpoints

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

Ambiguous Ternary Expansions at Cantor Endpoints

Learn why ternary endpoint expansions are ambiguous and verify that both representations produce the same Cantor-function value.

Advanced 10 min read

What You'll Learn

  • Characterize when two base-three expansions represent the same point.
  • Distinguish the two expansion patterns at left and right endpoints of removed intervals.
  • Apply the digit rule for the Cantor function, including when a ternary digit is 1.
  • Prove that the function value is independent of the chosen expansion.
  • Compute and check function values at several Cantor-set endpoints.

Why Endpoint Expansions Need Checking

A real number can have two base-three expansions. The familiar identity \(0.0222\ldots{}_3=0.1000\ldots{}_3\) occurs at the left endpoint \(1/3\) of the first removed middle-third interval. The right endpoint \(2/3\) has a different pattern: \(0.2000\ldots{}_3=0.1222\ldots{}_3\). These differences matter when a function is defined by reading ternary digits. A rule that appears to assign a value to each expansion must give the same answer for both expansions of the same point.

We consider the Cantor function \(C\) on \([0,1]\), using the digit rule from the earlier material on defining the Cantor function by ternary digits. For measure-theoretic context, the ambient space is \(([0,1],\mathcal{B}_{[0,1]},m)\), with finite Lebesgue measure restricted to the Borel sets of \([0,1]\). The endpoint calculations and well-definedness proof below are pointwise statements; they do not rely on an almost-everywhere convention or on any convergence theorem.

Definition: For \(x\in[0,1)\), choose a ternary expansion \(x=\sum_{j=1}^{\infty}a_j3^{-j}\), where each \(a_j\in\{0,1,2\}\). If there is a first index \(r\) with \(a_r=1\), define $$ C(x)=\sum_{j=1}^{r-1}\frac{a_j}{2}\,2^{-j}+2^{-r}. $$ If no digit is 1, define \(C(x)=\sum_{j=1}^{\infty}\frac{a_j}{2}\,2^{-j}\). Set \(C(1)=1\), using \(1=0.2222\ldots{}_3\). The issue to resolve is whether this prescription for \(x<1\) depends on the chosen ternary expansion.

The factor \(a_j/2\) converts a ternary digit 0 or 2 into the binary digit 0 or 1. If the first ternary digit 1 occurs at position \(r\), the rule places a binary 1 at that position and ignores later digits. This is the part of the definition that handles points in removed middle-third intervals. The present tutorial checks consistency at ambiguous expansions; it does not establish continuity or monotonicity of \(C\).

How Two Ternary Expansions Can Differ

Lemma: If two distinct ternary digit sequences represent the same \(x\in[0,1)\), then, after their common initial digits, one sequence has a digit \(d\) followed only by 2s, and the other has digit \(d+1\) followed only by 0s, where \(d\in\{0,1\}\).

Proof. Let \(k\) be the first position at which the two sequences differ. Write the digits there as \(d<e\). Equality of the represented numbers requires that the difference \(e-d\), multiplied by \(3^{-k}\), be exactly offset by the largest possible difference between the two tails. That largest difference is $$ \sum_{j=k+1}^{\infty}2\cdot 3^{-j} =2\cdot\frac{3^{-(k+1)}}{1-\frac13} =3^{-k}. $$ Thus \((e-d)3^{-k}\le 3^{-k}\), so \(e-d\le1\). Since the digits differ, \(e-d=1\). Equality in the tail bound is necessary to cancel the digit difference. It requires that the sequence with digit \(d\) have every subsequent digit equal to 2 and the sequence with digit \(d+1\) have every subsequent digit equal to 0: any smaller tail difference would not cancel \(3^{-k}\). As \(d+1\le2\), we have \(d\in\{0,1\}\). Conversely, such a pair represents the same number, because $$ d\,3^{-k}+\sum_{j=k+1}^{\infty}2\cdot3^{-j} =d\,3^{-k}+3^{-k} =(d+1)3^{-k}. $$ The common preceding digits contribute equally, proving the characterization. \(\square\)

For endpoints of removed intervals, one expansion uses only 0s and 2s. Its partner has a 1 followed by zeros at a left endpoint, or a 1 followed by 2s at a right endpoint. For example, at \(1/3\) the partner expansion is \(0.1000\ldots{}_3\); at \(2/3\) it is \(0.1222\ldots{}_3\). The lemma also covers ambiguous expansions whose initial digits already include a 1.

Worked Example: The Left Endpoint 1/3

Compute \(C(1/3)\) using both ternary expansions and check that the results agree.

The terminating expansion is \(1/3=0.1000\ldots{}_3\). Its first digit 1 is at position \(r=1\), so the sum over \(j<r\) is empty and the rule gives $$ C(1/3)=2^{-1}=\frac12. $$ For the other expansion, \(1/3=0.0222\ldots{}_3\), there is no digit 1. Every digit from position 2 onward is 2, so $$ C(1/3)=\sum_{j=2}^{\infty}\frac{2}{2}\,2^{-j} =\sum_{j=2}^{\infty}2^{-j} =\frac{2^{-2}}{1-\frac12} =\frac12. $$ Check: substituting the two values gives \(\frac12=\frac12\). The equality of the ternary expansions is also verified directly: \(\sum_{j=2}^{\infty}2\cdot3^{-j}=3^{-1}=1/3\).

Worked Example: The Right Endpoint 2/3

Compute \(C(2/3)\) from \(0.2000\ldots{}_3\) and \(0.1222\ldots{}_3\). In particular, note how the first digit 1 changes how the rule is applied.

For \(0.2000\ldots{}_3\), there is no digit 1, and only the first digit contributes: $$ C(2/3)=\frac{2}{2}\,2^{-1}=\frac12. $$ For \(0.1222\ldots{}_3\), the first 1 is at position 1. The formula therefore gives \(2^{-1}=1/2\); it does not convert the later 2s as though no 1 had occurred. The ternary representations agree because $$ 1\cdot3^{-1}+\sum_{j=2}^{\infty}2\cdot3^{-j} =\frac13+\frac13=\frac23. $$ Check: both digit calculations give \(C(2/3)=1/2\). If the later 2s in \(0.1222\ldots{}_3\) were incorrectly converted as well, one would get \(\sum_{j=1}^{\infty}2^{-j}=1\), contradicting the rule’s instruction to stop at the first 1.

Consistency of the Digit Rule

Theorem: For every \(x\in[0,1)\), the digit rule defining \(C(x)\) gives the same value for every ternary expansion of \(x\). Thus \(C\) is well-defined pointwise on \([0,1]\), with the separately specified value \(C(1)=1\).

Proof. If \(x\) has only one ternary expansion, there is nothing to compare. If it has two, apply the lemma and let \(k\) be their first differing position. Write the lower digit as \(d\) and the higher digit as \(d+1\). Both expansions share the same prefix before \(k\).

If that common prefix already contains a 1, the first 1 is at the same position in both expansions. The defining rule uses only the digits before that first 1 and the value \(2^{-r}\) at its position. Those digits agree, so the function values agree.

Now suppose the common prefix contains no 1. There are two cases. If \(d=0\), the lower expansion has digit 0 at position \(k\) and then only 2s. Its contribution from position \(k\) onward is $$ 0\cdot 2^{-k}+\sum_{j=k+1}^{\infty}2^{-j}=2^{-k}. $$ The higher expansion has digit 1 at position \(k\), its first 1, so its contribution from position \(k\) onward is also \(2^{-k}\). If \(d=1\), both expansions have their first 1 at position \(k\): the lower one has digit 1 there and the higher one has digit 2 there. The rule gives \(2^{-k}\) for each, with the common prefix contributing the same amount in both. In either case the values agree. These cases exhaust \(d\in\{0,1\}\), so the digit rule is independent of the expansion. The value at \(1\) was specified separately and is unambiguous under that definition. \(\square\)

The calculation also explains the two endpoint patterns without treating them as interchangeable. At a left endpoint, the all-0-and-2 expansion reaches a tail of 2s after a 0; the other expansion has a 1 followed by zeros. At a right endpoint, the all-0-and-2 expansion reaches a tail of 2s after a 1; the other expansion has a 1 followed by 2s. In both cases the binary value carried by the tail of 2s is exactly the binary contribution of the first 1 in the alternative expansion.

Worked Example: The Endpoints 1/9 and 2/9

These are the left and right endpoints, respectively, of the removed interval \((1/9,2/9)\). Compute the value at each endpoint from both representations.

For the left endpoint, $$ \frac19=0.01000\ldots{}_3=0.00222\ldots{}_3. $$ In the first expansion the first 1 is at position 2, so \(C(1/9)=2^{-2}=1/4\). In the second expansion there is no 1, and $$ C(1/9)=\sum_{j=3}^{\infty}2^{-j} =\frac{2^{-3}}{1-\frac12} =\frac14. $$ The expansions represent \(1/9\) because \(\sum_{j=3}^{\infty}2\cdot3^{-j}=3^{-2}=1/9\).

For the right endpoint, $$ \frac29=0.02000\ldots{}_3=0.01222\ldots{}_3. $$ The expansion \(0.02000\ldots{}_3\) has no 1, so its only nonzero mapped digit contributes \(2^{-2}=1/4\). In \(0.01222\ldots{}_3\), the first 1 is at position 2, and the rule again gives \(2^{-2}=1/4\). Its ternary value is \(3^{-2}+\sum_{j=3}^{\infty}2\cdot3^{-j}=1/9+1/9=2/9\). Check: both expansions at each endpoint give \(1/4\), and the ternary sums give \(1/9\) and \(2/9\), respectively.

Worked Example: The Endpoints 7/9 and 8/9

At the next stage, the interval \((7/9,8/9)\) is removed. Verify the function values at its endpoints, including the different tail pattern at the right endpoint.

For \(7/9\), the expansions are $$ \frac79=0.21000\ldots{}_3=0.20222\ldots{}_3. $$ In \(0.21000\ldots{}_3\), the first 1 is at position 2. The first digit 2 contributes \((2/2)2^{-1}=1/2\), and the first 1 contributes \(2^{-2}=1/4\), giving \(C(7/9)=3/4\). In \(0.20222\ldots{}_3\), there is no 1, so $$ C(7/9)=\frac12+\sum_{j=3}^{\infty}2^{-j} =\frac12+\frac{2^{-3}}{1-\frac12} =\frac34. $$ The ternary tail equals \(\sum_{j=3}^{\infty}2\cdot3^{-j}=1/9\); adding the first-digit contribution \(2/3\) gives \(7/9\).

For \(8/9\), the two expansions are $$ \frac89=0.22000\ldots{}_3=0.21222\ldots{}_3. $$ The first has no 1, and its first two digits each contribute \(2^{-1}\), so \(C(8/9)=1/2+1/4=3/4\). In the second expansion the first 1 is at position 2; the first digit contributes \(1/2\), and that 1 contributes \(1/4\), again giving \(3/4\). Its ternary value is \(2/3+1/9+\sum_{j=3}^{\infty}2\cdot3^{-j}=2/3+1/9+1/9=8/9\). Check: both representations give \(3/4\) at each endpoint, while their ternary sums are \(7/9\) and \(8/9\).

A Common Endpoint Error

A tempting but incorrect statement is that every endpoint of a removed interval has an expansion with a 1 followed by 2s. The calculation at \(1/3\) disproves it: the partner of \(0.0222\ldots{}_3\) is \(0.1000\ldots{}_3\), with zeros after the 1. The corrected description is directional: at a left endpoint the alternate expansion has a 1 followed by zeros; at a right endpoint it has a 1 followed by 2s. The all-0-and-2 expansion is the other representation in each case.

A second common error is to convert every digit independently and keep going after encountering a 1. For \(0.1222\ldots{}_3\), that mistaken procedure would turn every digit 1 or 2 into a binary 1, yielding \(1\). The defining rule instead stops at the first 1 and assigns \(2^{-1}=1/2\), consistent with \(0.2000\ldots{}_3\). The first 1 is not an ordinary digit to be followed by further converted digits; it marks the point at which the rule fixes the value.

These endpoint checks are essential whenever a digit-defined function is introduced: an expansion is a representation, not an intrinsic feature of the point. The theorem establishes only that the Cantor-function digit rule is well-defined despite that ambiguity. Further properties, including continuity and monotonicity, require separate arguments.

Check Your Understanding

Use the digit rule and the ambiguity lemma to justify each answer.

  1. Write both ternary expansions of \(1/3\). Which one has a 1 followed by zeros?
  2. For \(2/3=0.2000\ldots{}_3=0.1222\ldots{}_3\), explain why the digit rule stops at the first digit in the second representation.
  3. Use the lemma to show why two distinct ternary expansions must have tails of all 2s and all 0s after their first differing digits.
  4. Compute \(C(1/9)\) using \(0.00222\ldots{}_3\), showing the geometric-series sum.
  5. Explain why the statement “every removed-interval endpoint has an alternate expansion with a 1 followed by 2s” is false, and give its corrected form.