0
$\begingroup$

Suppose we were to list all points in the $3/7$th Middle Cantor set where we first remove $3/7$th of $[0,1]$:

$$[0,1/7]\cup[2/7,3/7]\cup[4/7,5/7]\cup[6/7,1]$$

then $3/7$th of remaining intervals, $3/7$th that still remain, $3/7$th of those, etc.

If I'm correct, we can list all points in the set as:

$$\left\{\left(\sum_{q=1}^{w}\frac{j}{7^q}\right)+\frac{h}{7^{w+1}}:j\in\left\{0,2,4,6\right\},h\in\left\{0,1,2,3,4,5,6,7\right\},w\in\mathbb{N}\right\}$$

I tried recreating this in Mathematica:

  Table[Sum[Subscript[j, 3][[q, w]]/7^q, {q, 1, w}] + 
  Subscript[h, 3]/7^(w + 1), {w, 1, 2}, {Subscript[j, 
  3], {0, 2, 4, 6}}]

But I realized they treated $j$ (or in this case j3) as a fixed number with q. As q changes j3 remains the same which is not what I intended. This gives an unusual graph.

  Subscript[B, 3] = 
 Select[Sort[
   DeleteDuplicates[
    Flatten[Table[
      Sum[Subscript[j, 3]/7^q, {q, 1, w}] + 
       Subscript[h, 3]/7^(w + 1), {w, 1, 2}, {Subscript[j, 
       3], {0, 2, 4, 6}}, {Subscript[h, 
       3], {0, 1, 2, 3, 4, 5, 6, 7}}]]]], Between[#, {0, 1}] &]
Length[Subscript[B, 3]]
ListPlot[Table[{Subscript[B, 3][[x]], 0}, {x, 1, 
   Length[Subscript[B, 3]]}]]

enter image description here

Which I doubt is correct. How do we correct my method?

$\endgroup$
4

1 Answer 1

1
$\begingroup$

By the links provided by @Flinty, it seems the answer to my question should be

cantor = {a_, 
    b_} :> {{a, a + (b - a)*1/7}, {a + (b - a)*2/7, 
     a + (b - a)*3/7}, {a + (b - a)*4/7, 
     a + (b - a)*5/7}, {a + (b - a)*6/7, b}};
CantorRegion[n_Integer?NonNegative] := 
 Module[{ints}, 
  ints = Flatten[
    Nest[Flatten[Map[Function[s, s /. cantor], #], 1] &, {{0, 1}}, n]]]
ListPlot[Table[{CantorRegion[3][[n]], 0}, {n, 1, 
   Length[CantorRegion[3]]}]]

Giving the desired result

enter image description here

I'm not completely sure why this is the case. The code seems very advanced. If anyone can explain this mathematically I will be grateful. Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.