Report

Help us improve this tool

Generate Generalized Cantor Set

Generate and visualize generalized Cantor sets (α-Cantor sets) by specifying a custom middle gap ratio.

O M T

What is a Generalized Cantor Set?

A Generalized Cantor Set (often called an $\alpha$-Cantor Set) is a family of fractals parameterized by the middle gap fraction $\alpha \in (0, 1)$. Rather than being forced to remove the exact middle third ($\alpha = 1/3 \approx 33.3\%$), this generator allows you to customize the width of the removed middle interval, leaving two symmetric intervals of length $(1-\alpha)/2$ on either side.

By varying $\alpha$ from very close to $0$ to very close to $1$, you can sweep the entire range of fractal dimensions between $0$ and $1$. This makes the generalized Cantor set an extremely powerful tool for studying the relationship between topological properties, measure theory, and fractal dimensionality. Try the standard Cantor Set for the classic ternary version, or the Asymmetric Cantor Set for unequal left and right ratios.

Mathematical Formulation

Starting with a unit interval $I_0 = [0, 1]$, we construct the set by repeatedly performing the following operation on every remaining interval $[x, y]$ of length $L = y - x$:

  • Remove the open middle interval of length $\alpha \cdot L$.
  • This leaves two symmetric segments of length $L_{new} = \frac{1 - \alpha}{2} \cdot L$.

At iteration step $n$, there are $2^n$ segments, each of length: $$L_n = \left(\frac{1-\alpha}{2}\right)^n$$

Fractal Dimension

Because the set is symmetric and self-similar, its Hausdorff dimension $D$ can be calculated directly using the classic self-similarity formula: $$D = \frac{\ln(2)}{\ln\left(\frac{2}{1-\alpha}\right)}$$

By adjusting $\alpha$, we observe key limiting behaviors:

  • As $\alpha \to 0$ (no gaps), the dimension $D \to 1.0$. The set approaches the continuous line segment $[0, 1]$.
  • As $\alpha \to 1$ (entire middle removed), the dimension $D \to 0.0$. The set approaches a pair of isolated boundary points $\{0, 1\}$.
  • When $\alpha = 1/3$, we get $D = \frac{\ln(2)}{\ln(3)} \approx 0.6309$, which is the dimension of the standard Cantor ternary set.

Frequently Asked Questions

How does the gap ratio $\alpha$ affect the size of the remaining set?

At any finite iteration step $n$, the total length (measure) of the remaining segments is $(1-\alpha)^n$. As $n \to \infty$, the total length approaches exactly $0$ for any $\alpha \in (0, 1)$. Thus, all generalized Cantor sets have a Lebesgue measure of exactly zero.

What happens to the dimension when the gap $\alpha$ is very small?

When the gap ratio $\alpha$ is very small, say $5\%$ ($\alpha = 0.05$), the remaining segments are very wide: $(1-0.05)/2 = 0.475$ ($47.5\%$). The Hausdorff dimension is: $$D = \frac{\ln(2)}{\ln(2 / 0.95)} \approx 0.9329$$ The resulting fractal looks almost like a solid continuous line, yet it still contains infinitely many empty gaps!

Can we construct a generalized Cantor set with a non-zero length?

Yes, but not with a constant middle ratio $\alpha$. To construct a Cantor set with positive length (like the Smith-Volterra-Cantor set), we must reduce the fraction removed at each level $n$, rather than removing a constant percentage $\alpha$ of each remaining segment.

Why are generalized Cantor sets important in mathematics?

They serve as standard counterexamples in real analysis and measure theory. They demonstrate that a subset of $\mathbb{R}$ can be uncountable and have the same cardinality as the real line, while simultaneously having a length (measure) of zero and being topologically nowhere dense.