# Observation on the ''explicit formula'' for the Cantor Set

Let us consider the closed interval $$[a, b]$$. Removing the open middle third interval in $$C_0$$, we let $$C_1$$ be the union of the remaining intervals, and have

$$$$C_1 = \left[a, a + \frac{b-a}{3}\right] \cup \left[a + \frac{2(b-a)}{3}, b\right].$$$$ Repeating this process two more times, we have \begin{align*} C_3 &= \left[a, a + \frac{b-a}{3^3}\right] \cup \left[a + \frac{2(b-a)}{3^3}, a+\frac{3(b-a)}{3^3}\right] \\&\cup \left[a + \frac{6(b-a)}{3^2}, a + \frac{7(b-a)}{3^3}\right] \cup \left[a + \frac{8(b-a)}{3^3}, a + \frac{9(b-a)}{3^3}\right] \\&\cup \left[a + \frac{18(b-a)}{3^3}, a + \frac{19(b-a)}{3^3}\right] \cup \left[a + \frac{20(b-a)}{3^3}, a + \frac{21(b-a)}{3^3}\right] \\&\cup \left[a + \frac{24(b-a)}{3^3}, a + \frac{25(b-a)}{3^3}\right] \cup \left[a + \frac{26(b-a)}{3^3}, a + \frac{27(b-a)}{3^3}\right]. \end{align*}

From Wikipedia, we have that

\begin{align*} C_n = &\bigcup_{k=0}^{3^{n-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right). \end{align*}

I tried partitioning $$[a, b]$$ to $$3^3$$ intervals and I had \begin{align*} [a,b] &= \color{blue}{\left[a, a + \frac{b-a}{3^3}\right]} \cup \left(a + \frac{b-a}{3^3}, a + \frac{2(b-a)}{3^3}\right) \\&\quad\cup \color{blue}{\left[a + \frac{2(b-a)}{3^3}, a + \frac{3(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{3(b-a)}{3^3}, a + \frac{4(b-a)}{3^3}\right]} \\&\quad \cup \left(a + \frac{4(b-a)}{3^3}, a + \frac{5(b-a)}{3^3}\right) \cup \color{red}{\left[a + \frac{5(b-a)}{3^3}, a + \frac{6(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{6(b-a)}{3^3}, a + \frac{7(b-a)}{3^3}\right]} \cup \left(a + \frac{7(b-a)}{3^3}, a + \frac{8(b-a)}{3^3}\right) \\&\quad \cup \color{blue}{\left[a + \frac{8(b-a)}{3^3}, a + \frac{9(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{9(b-a)}{3^3}, a + \frac{10(b-a)}{3^3}\right]} \\&\quad \cup \left(a + \frac{10(b-a)}{3^3}, a + \frac{11(b-a)}{3^3}\right) \cup \color{red}{\left[a + \frac{11(b-a)}{3^3}, a + \frac{12(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{12(b-a)}{3^3}, a + \frac{13(b-a)}{3^3}\right]} \cup \left(a + \frac{13(b-a)}{3^3}, a + \frac{14(b-a)}{3^3}\right) \\&\quad \cup \color{red}{\left[a + \frac{14(b-a)}{3^3}, a + \frac{15(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{15(b-a)}{3^3}, a + \frac{16(b-a)}{3^3}\right]} \\&\quad \cup \left(a + \frac{16(b-a)}{3^3}, a + \frac{17(b-a)}{3^3}\right) \cup \color{red}{\left[a + \frac{17(b-a)}{3^3}, a + \frac{18(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{18(b-a)}{3^3}, a + \frac{19(b-a)}{3^3}\right]} \cup \left(a + \frac{19(b-a)}{3^3}, a + \frac{20(b-a)}{3^3}\right) \\&\quad \cup \color{blue}{\left[a + \frac{20(b-a)}{3^3}, a + \frac{21(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{21(b-a)}{3^3}, a + \frac{22(b-a)}{3^3}\right]} \\&\quad \cup \left(a + \frac{22(b-a)}{3^3}, a + \frac{23(b-a)}{3^3}\right) \cup \color{red}{\left[a + \frac{23(b-a)}{3^3}, a + \frac{24(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{24(b-a)}{3^3}, a + \frac{25(b-a)}{3^3}\right]} \cup \left(a + \frac{25(b-a)}{3^3}, a + \frac{26(b-a)}{3^3}\right) \\&\quad \cup \color{blue}{\left[a + \frac{26(b-a)}{3^3}, a + \frac{27(b-a)}{3^3}\right]}. \end{align*}

I noticed that after removing all the open middle third intervals in each three closed intervals, we have \begin{align*} &\bigcup_{k=0}^{3^{3-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right). \\&= \color{blue}{\left[a, a + \frac{b-a}{3^3}\right]} \cup \color{blue}{\left[a + \frac{2(b-a)}{3^3}, a + \frac{3(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{3(b-a)}{3^3}, a + \frac{4(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{5(b-a)}{3^3}, a + \frac{6(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{6(b-a)}{3^3}, a + \frac{7(b-a)}{3^3}\right]} \cup \color{blue}{\left[a + \frac{8(b-a)}{3^3}, a + \frac{9(b-a)}{3^3}\right]} \\&\quad\cup \color{red}{\left[a + \frac{9(b-a)}{3^3}, a + \frac{10(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{11(b-a)}{3^3}, a + \frac{12(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{12(b-a)}{3^3}, a + \frac{13(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{14(b-a)}{3^3}, a + \frac{15(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{15(b-a)}{3^3}, a + \frac{16(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{17(b-a)}{3^3}, a + \frac{18(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{18(b-a)}{3^3}, a + \frac{19(b-a)}{3^3}\right]} \cup \color{blue}{\left[a + \frac{20(b-a)}{3^3}, a + \frac{21(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{21(b-a)}{3^3}, a + \frac{22(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{23(b-a)}{3^3}, a + \frac{24(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{24(b-a)}{3^3}, a + \frac{25(b-a)}{3^3}\right]} \cup \color{blue}{\left[a + \frac{26(b-a)}{3^3}, a + \frac{27(b-a)}{3^3}\right]}. \end{align*}

I observed that all the closed intervals colored red do not belong $$C_3$$ and only those colored in blue belongs to $$C_3$$.

How then should we have that \begin{align*} C_n = &\bigcup_{k=0}^{3^{n-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right), \end{align*} and not \begin{align*} C_n \subset &\bigcup_{k=0}^{3^{n-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right)? \end{align*}

In conclusion, I am thinking that the correct symbol to be used in the ''explicit formula'' for the Cantor set is $$\subset$$ and not $$=$$.

• The intersection of countably many uncountable sets (here, the $C_n$s) can be uncountable. Commented Dec 31, 2022 at 23:14
• There is no reason why $C=\cap_n C_n$ has to be countable. Commented Dec 31, 2022 at 23:14
• Okay. Thank you very much. That is understandable. But from the first question, do you think the ''explicit formula'' is consistent? I have shown that $C_3$ from the formula for $C_n$ does not correspond with the actual $C_3$, or am I getting something wrong? Commented Dec 31, 2022 at 23:16

## 2 Answers

I am afraid you read Wikipedia's page on Cantor set incorrectly.

Your version of $$C_3$$ is correct.

On the other hand, Wikipedia is not wrong either. While it says "the explicit closed formulas for the Cantor set are" $${\mathcal {C}}=[0,1]\,\setminus \,\bigcup _{n=0}^{\infty }\bigcup _{k=0}^{3^{n}-1}\left({\frac {3k+1}{3^{n+1}}},{\frac {3k+2}{3^{n+1}}}\right)$$ and $${\mathcal {C}}=\bigcap _{n=1}^{\infty }\bigcup _{k=0}^{3^{n-1}-1}\left(\left[{\frac {3k+0}{3^{n}}},{\frac {3k+1}{3^{n}}}\right]\cup \left[{\frac {3k+2}{3^{n}}},{\frac {3k+3}{3^{n}}}\right]\right),$$ Wikipedia does not claim the following formula you said it claimed, \begin{align*} \mathcal C_n = &\bigcup_{k=0}^{3^{n-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right). \end{align*} when we set $$a=0$$ and $$b=1$$ (and $$n=3$$).

What are indicated by the two formula above in the Wikipedia is $${\mathcal {C_j}}=\bigcap _{n=1}^{j}\left(\bigcup _{k=0}^{3^{n-1}-1}\left(\left[{\frac {3k+0}{3^{n}}},{\frac {3k+1}{3^{n}}}\right]\cup \left[{\frac {3k+2}{3^{n}}},{\frac {3k+3}{3^{n}}}\right]\right)\right)$$ for $$j\ge1$$.

• Thank you very much. I really appreciate. I used the corrected formula for $C_j$, as you have given, to generate $C_3$, and it works perfectly. You can check my comment. Commented Jan 1, 2023 at 1:34

We observe that \begin{align*} [a, b] = &\bigcup_{k=0}^{3^{n-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad\cup \left(a + \frac{(3k+1)(b-a)}{3^n}, a + \frac{(3k+2)(b-a)}{3^n}\right) \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right), \end{align*} If we remove the open middle third interval in the above, we deduce that \begin{align*} C_j = &\bigcap_{n=1}^j \bigcup_{k=0}^{3^{n-1}-1} \left(\left[a + \frac{3k(b-a)}{3^n}, a + \frac{(3k+1)(b-a)}{3^n}\right] \right. \\&\quad \left.\cup \left[a + \frac{(3k+2)(b-a)}{3^n}, a + \frac{(3k+3)(b-a)}{3^n}\right]\right), \quad \forall j \geq 1. \end{align*} To check this formula for $$F_3$$, \begin{align*} C_3 = &\left(\left[a, a + \frac{b-a}{3}\right] \cup \left[a+\frac{2(b-a)}{3}, b\right]\right) \bigcap \\&\quad \left(\left[a, a + \frac{b-a}{9}\right] \cup \left[a+\frac{2(b-a)}{9}, a+\frac{b-a}{3}\right]\right. \\&\quad \left[a+\frac{b-a}{3}, a+\frac{4(b-a)}{9}\right] \cup \left[a+\frac{5(b-a)}{9}, a+\frac{2(b-a)}{3}\right] \\&\quad \left.\left[a+\frac{2(b-a)}{3}, a+\frac{7(b-a)}{9}\right] \cup \left[a+\frac{8(b-a)}{9}, b\right]\right) \bigcap \\&\quad \left(\color{blue}{\left[a, a + \frac{b-a}{3^3}\right]} \cup \color{blue}{\left[a + \frac{2(b-a)}{3^3}, a + \frac{3(b-a)}{3^3}\right]}\right. \\&\quad \cup \color{red}{\left[a + \frac{3(b-a)}{3^3}, a + \frac{4(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{5(b-a)}{3^3}, a + \frac{6(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{6(b-a)}{3^3}, a + \frac{7(b-a)}{3^3}\right]} \cup \color{blue}{\left[a + \frac{8(b-a)}{3^3}, a + \frac{9(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{9(b-a)}{3^3}, a + \frac{10(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{11(b-a)}{3^3}, a + \frac{12(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{12(b-a)}{3^3}, a + \frac{13(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{14(b-a)}{3^3}, a + \frac{15(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{15(b-a)}{3^3}, a + \frac{16(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{17(b-a)}{3^3}, a + \frac{18(b-a)}{3^3}\right]} \\&\quad \cup \color{blue}{\left[a + \frac{18(b-a)}{3^3}, a + \frac{19(b-a)}{3^3}\right]} \cup \color{blue}{\left[a + \frac{20(b-a)}{3^3}, a + \frac{21(b-a)}{3^3}\right]} \\&\quad \cup \color{red}{\left[a + \frac{21(b-a)}{3^3}, a + \frac{22(b-a)}{3^3}\right]} \cup \color{red}{\left[a + \frac{23(b-a)}{3^3}, a + \frac{24(b-a)}{3^3}\right]} \\&\quad \cup \left.\color{blue}{\left[a + \frac{24(b-a)}{3^3}, a + \frac{25(b-a)}{3^3}\right]} \cup \color{blue}{\left[a + \frac{26(b-a)}{3^3}, a + \frac{27(b-a)}{3^3}\right]}\right). \end{align*}

Any of the closed intervals coloured red has at most one element in its intersection with an interval from the preceeding sets. If it does have an intersection, then such element occurs in a closed interval coloured with blue. As such, the intervals coloured red are not in the intersection of the three sets.

Since $$\left[0, \frac1{27}\right] \subset \left[0, \frac{1}{9}\right] \subset \left[0, \frac{1}{3}\right], \quad \left[\frac{2}{27}, \frac3{27}\right] \subset \left[0, \frac{1}{9}\right] \subset \left[0, \frac13\right]$$ $$\left[\frac{6}{27}, \frac7{27}\right] \subset \left[0, \frac{1}{9}\right] \subset \left[0, \frac13\right], \quad \left[\frac{8}{27}, \frac9{27}\right] \subset \left[\frac29, \frac{1}{3}\right] \subset \left[0, \frac13\right],$$ $$\left[\frac{18}{27}, \frac{19}{27}\right] \subset \left[\frac23, \frac{7}{9}\right] \subset \left[\frac{2}{3}, 1\right], \quad \left[\frac{20}{27}, \frac{21}{27}\right] \subset \left[\frac23, \frac{7}{9}\right] \subset \left[\frac{2}{3}, 1\right],$$ $$\left[\frac{24}{27}, \frac{25}{27}\right] \subset \left[\frac89, 1\right] \subset \left[\frac{2}{3}, 1\right], \quad \left[\frac{26}{27}, 1\right] \subset \left[\frac89, 1\right] \subset \left[\frac{2}{3}, 1\right],$$ it follows that \begin{align*} C_3 &= \left[a, a + \frac{b-a}{3^3}\right] \cup \left[a + \frac{2(b-a)}{3^3}, a+\frac{3(b-a)}{3^3}\right] \\&\cup \left[a + \frac{6(b-a)}{3^2}, a + \frac{7(b-a)}{3^3}\right] \cup \left[a + \frac{8(b-a)}{3^3}, a + \frac{9(b-a)}{3^3}\right] \\&\cup \left[a + \frac{18(b-a)}{3^3}, a + \frac{19(b-a)}{3^3}\right] \cup \left[a + \frac{20(b-a)}{3^3}, a + \frac{21(b-a)}{3^3}\right] \\&\cup \left[a + \frac{24(b-a)}{3^3}, a + \frac{25(b-a)}{3^3}\right] \cup \left[a + \frac{26(b-a)}{3^3}, a + \frac{27(b-a)}{3^3}\right], \end{align*} which is true.