The Cantor Set is pretty cool. 🙂 I noticed that in the video Michael proves that every Cantor number can be expressed in ternary expansion using only the digits 0 or 2 (e.g. 0.0220002222020...) However, he didn't actually prove the converse, namely that every ternary expression which only has the digits 0 or 2 in it is a member of the Cantor set. The converse is true, but to prove it you need to adjust the proof to sort of reverse the steps in video (i.e. inductively show that all such ternary numbers with only 0's and 2's are members of every subset Cₙ that build the Cantor Set.) Also probably the next interesting lemma that would come up would be that this means there is a one-to-one mapping between the binary expansions of numbers in [0,1] and the Cantor Set. Just take any binary expansion (e.g. 0.0110001101...) and replace every 1 with a 2. Which means that the Cantor Set is uncountable since it has the same cardinality as the interval [0,1].
@TheoEvian Жыл бұрын
the combination of being uncountable, non-continuous and of zero size (both "big" and "small" at the same time) is the most fascinating property of it. Thanks for pointing out how you can prove it :)
@headlibrarian1996 Жыл бұрын
Wouldn’t the Cantor set being a union of uncountable sets be sufficient to imply it’s uncountable?
@Bodyknock Жыл бұрын
@@headlibrarian1996 No, because it’s a countable union of sets. If the combined intersections of those sets were singletons for instance than the net intersection would be countable even though the sets at each step are uncountable. As a quick example, consider Sn to be the union of all intervals of the form [n, n+ (1/2)^n] for all Natural numbers n. Even though every Sn is an uncountable set, the intersection of all Sn is exactly the Natural Numbers which is countable.
@drenz1523 Жыл бұрын
@@headlibrarian1996yep
@goodplacetostop2973 Жыл бұрын
0:01 Oh, the Cantor set 😍 20:19 🔇
@DrMikero Жыл бұрын
17:25 : 3x is in C_k but you need 3x to be in the Cantor set in order to apply the inductive hypothesis as written.
@spiderwings1421 Жыл бұрын
Exactly my question!
@yt2979a Жыл бұрын
The inductive hypothesis says that if x is in Ck then it’s k’th term in the ternary extension is either 0 or 2. This is what was used.
@MarcoMate87 Жыл бұрын
@@yt2979a This is what was used, but not what's stated.
@黄钟韬-x2z6 ай бұрын
i think we should change the inductive hypothesis :claim is truw with respect to C_k instead of C
@simonreiff3889 Жыл бұрын
Nice video! The Cantor set is fascinating, though I admit it took me a while to realize why. Some of the striking properties: C is a countable union of closed intervals (though the cardinality of C itself is the continuum), hence C is itself closed. Since C is a subset of the real numbers, it forms a complete metric space. Thus, by the Heine-Borel theorem, C is compact. It follows that any continuous function defined on C is uniformly continuous. At the same time, C is nowhere dense, just like the integers are nowhere dense over R. Indeed, it is a totally disconnected Hausdorff space. On the other hand, C has no isolated points either, making it a perfect set since it is closed. Indeed, as we expect since it is closed, every point in C is a limit (or accumulation) point, yet C has no interior. Basically just throw your intuition out the window with the Cantor set because it will not help, at least not at first.
@MarcoMate87 Жыл бұрын
A countable union of closed intervals is not necessarily closed. Take for example the union of [1/n, 1] for n = 1 up to infinity; this union is equal to (0, 1]. The fact is that the Cantor set C is also a countable intersection of closed intervals, and so is closed.
@MikeRosoftJH Жыл бұрын
@@MarcoMate87 That's probably a typo; it can be seen that Cantor's discontinuum can't be a union of any collection of (non-degenerate) intervals, because the set contains no intervals (otherwise, its measure would be positive). By the way, there exists a set constructed in a similar way (a "fat Cantor set"), which is nowhere dense, but it has a positive measure. I have been thinking of the set of all real numbers from an interval whose base-3 representation contains finitely many digits 1; it can be seen that this is a union of countably many scaled down copies of the Cantor set, yielding an uncountable dense set of measure 0. (I don't know if the set has a name, or if it has some other interesting topological properties.)
@MarcoMate87 Жыл бұрын
@@MikeRosoftJH you are right, but you should refer to the author of the first post, who indeed talked about the Cantor set being a "countable union of closed intervals" which is of course false. Instead, I talked about the Cantor set being a countable intersection of closed intervals, which is indeed false itself. I should say that the Cantor set is a countable intersection of finite disjoint unions of closed intervals, as shown by Michael Penn.
@bobh6728 Жыл бұрын
Anyone else fixated on the C(4) line labeled 1 to 1!!
@JM-us3fr Жыл бұрын
By the way, this ternary representation makes it pretty clear why the Cantor Set is uncountably infinite. Just map C (in ternary) to [0,1] (in binary) by making every 2 into a 1. So amazingly, the interval that C came from is just as big (in cardinality) as C.
@Bodyknock Жыл бұрын
11:00 Michael actually made a little more work for himself on the base case by insisting on starting at C₁ instead of C₀. If he had instead used C₀ as the base case it would have gone like this: Suppose x∈C. Then x∈C₀ = [0,1]. There are two cases: x ≠ 1 : Then in ternary expansion x = 0.a₁a₂a₃... . So its first digit is 0. x = 1: Then we can rewrite in ternary x as x = 1 = 0.2222... . So, again, x's first digit is 0. Therefore for any x∈C₀ it can be expressed in ternary as 0.a₁a₂a₃... , and thus its first digit is never forced to be 1. -- (Notice this is basically the same as each individual half of the base case he did in the video for C₁, except you're only doing the steps once instead of twice.)
@MyOneFiftiethOfADollar Жыл бұрын
Since you are on a first name basis with Dr Penn, I would love to see your videos on interesting topics such as this. Your expertise is manifest owing to your claim of finding a better way.
@Bodyknock Жыл бұрын
@@MyOneFiftiethOfADollar How exactly do you think what I said is wrong? You seem to be implying I’m claiming something incorrect. Also why exactly are you so offended I called him Michael? Your comment makes you sound like a jackass honestly. P.S. In fact I can already tell I’m probably dealing with a troll, I’ll just mute you now and save myself some time.
@williamwilliam4944 Жыл бұрын
@@MyOneFiftiethOfADollar what are you, 12? Is everything about ego to you? Mathematicians make mistakes and inefficiencies all the time, and OP literally wrote out the simpler method. Your unwillingness or inability to read that is on you.
@oddlyspecificmath Жыл бұрын
Thank you! The additional relationships / perspectives you weave into these while you're proving the main thread help 😊
@darkmask4767 Жыл бұрын
The Fat Cantor sets are examples of nowhere dense closed subsets of R with positive Lebesgue measure. Let k be in (0,⅓). At the nth iteration, 2^(n-1) intervals of length k^n are removed. The total length removed is Σ(2^(n-1)*k^n) as n goes from 1 to ♾️=Σ(2^n*k^(n+1)) as n goes from 0 to ♾️ = k*Σ(2*n*k^n) as n goes from 0 to ♾️=k/(1-2k). The limiting set has Lebesgue measure 1-k/(1-2k)=(1-3k)/(1-2k).
@blakaligula3745 Жыл бұрын
If you generalise the construction to splitting an interval into b equal length segments and choosing to keep only some of them, the order of the ones you kept determines the base b expansion of the elements in the final set. Specifically, if you keept the k_1-th, k_2-th,..., k_m-th segments where k_i goes from 0 to b-1, indexing the segments from 0, the final set will have all numbers in the unit interval whose base b expansion contains only numerals from k_1,...,k_m. The proof isn't too difficult either
@АндрейДенькевич Жыл бұрын
To my mind Set is something amorphouse ( has curvature(quantity) but has no dimension(quality)), i.e. discreat , when removing 1 element it remains Set (now unqualified Set). To receive this Cantor Set we need infinitely remove elements, what is impossible for us( we can't finish process of creation). Automatic process of breaking ,self-closure of pieces , all independent of us ,can not be started on amorphouse Set but only on some closed shape by opening it, removing some face (even on sphere wich has only 1 face uncurving(breaking) can be started). We can start breaking but can't stop it. No matter infinitely or finitely. But for us infinitely or finitely is a matter.
@brucea98714 ай бұрын
If you want to do a sequel to this video I have some suggestions. You could show the Cantor set is uncountable yet has measure 0. You could also discuss the issue of compactness as raised by another commenter. Also prove it does not contain any open interval (a,b) with a < b. Another point is that it might seem to a casual observer that the Cantor set consists of nothing but the endpoints of the closed intervals used in its construction. This cannot be true since the Cantor set is uncountable but there are only countably many endpoints. For instance 0.25 = (0.02020202...) in base 3 is in the Cantor set but is not an endpoint (they are all of the form a / 3^n where a and n are nonnegative integers). Finally an old textbook I have ("An Introduction to Classical Real Analysis" by Karl R. Stromberg) suggested a generalization of the Cantor set (page 81). If you have access to that textbook perhaps you could do a video on this generalization. In particular although the original Cantor set you described has measure 0, Stromberg showed a generalized Cantor set can be constructed with any measure from 0 to 1 (including 0 but not including 1). I should note that I obtained the facts I stated above from Stromberg's book.
@aradarbel4579 Жыл бұрын
haha I'm studying for a final and did almost an identical exercise just an hour ago, what are the odds :D thanks for the wonderful content, it's unimaginably helpful and entertaining!
@leif_p Жыл бұрын
This is half of one of my favorite results in math!
@ZenithWest169 Жыл бұрын
I just can't stop staring at the last interval mistakenly going from 1 to 1, instead of 0 to 1 and waiting on the edge of my seat for him to correct it
@黄钟韬-x2z6 ай бұрын
so clear and elegant proof! Thank you
@MyOneFiftiethOfADollar Жыл бұрын
Let's hear it for base 3. It is responsible for a trivially simple proof that sqrt(2) is irrational. to wit, a^2 = 2b^2 is impossible since non-zero squares in base 3 terminate with the digit 1
@The1RandomFool Жыл бұрын
What's interesting is that the total length of the Cantor set is 0 even though the set is infinite. The endpoints of each segment in C_n are included in the set regardless of what n is because subdivisions only occur within the previous segments, and there are 2^(n+1) endpoints in each C_n. As n goes to infinity, so does the number of elements of the set C. The total length of C_n is (2/3)^n.
@kilianklaiber6367 Жыл бұрын
I assume that the number of elements of the cantor set is countable infinite, correct?
@XT-N Жыл бұрын
@@kilianklaiber6367incorrect. The cantor set can be easily proved to be the same cardinality as the set of sequences whose terms are 0 or 2, which itself is the same cardinality as the real numbers, so uncountably infinite
@The1RandomFool Жыл бұрын
@@kilianklaiber6367 According to my real analysis book, it is uncountable, and the cardinality of the Cantor set is equal to the cardinality of R.
@kilianklaiber6367 Жыл бұрын
@@The1RandomFool Well, this makes the set interesting. It appears to me that the endpoints of the segments are countable... Which was your proof of infinite elements.
@The1RandomFool Жыл бұрын
@@kilianklaiber6367 xtean7340 gives the reason shown in my book, in a previous comment.
@GergoErdi Жыл бұрын
Georg Cantor being German, the correct pronunciation of his name actually makes the pun "Cantor-example" work.
@АндрейДенькевич Жыл бұрын
"Contra Set" .
@barutjeh Жыл бұрын
I remember learning about this near the start of my mathematical career and one particular revelation. Naively, you'd think the only remaining points are the endpoints of some interval, but that's not the case. 1/4 is 0,0202020202... in ternary, which contains no 1's, and is therefore in the Cantor set, while obviously not being an endpoint, since all end points have a numerator that is a power of 3.
@MarcoMate87 Жыл бұрын
There is a mistake in the proof. At 17:25 x is in C_k, but it's not sufficient, x should be in the Cantor set C for us to apply the inductive hypothesis as it's stated; same at 19:18, where 3x - 2 belongs to C_k, but not necessarily to C. The correct inductive hypothesis that we really need is: "Let's suppose that every element in C_k has a 0 or a 2 in its kth position of ternary expansion"; the rest of the proof goes the same as in the video. Indeed we actually proved a stronger version of the theorem: we proved that, for every natural n, every element in C_n has a 0 or a 2 in its nth position of ternary expansion. Thus, the Cantor set C being the intersection of all C_n, we can conclude that every Cantor number can be expressed in ternary expansion using only the digits 0 or 2. To get this conclusion, we strongly need the uniqueness of the representation of every real number in every base b, apart from those numbers whose representations are two, one of them ending with all b's. For the purpose of our theorem, those numbers with two representations don't create any problem: for example 0.022222222... it's ok (it uses only digits 0 and 2), 0.12222222... (it's equal to 0.2, which again uses only digits 0 and 2), 0.112222222... it's not in C because it's not in C_1 and so on and so forth.
@KeithKessler Жыл бұрын
Questions: Q1: In the construction given at the beginning of this video, why are the Cn defined using closed intervals rather than open intervals? Is this important, or are the limits as n approaches infinity identical? Q2: Concerning the infinite intersection product definition: Can't the argument to start the index at 1 rather than zero be extended to start the intersection product at any finite n?
@XT-N Жыл бұрын
R1: the reason you want to keep the points at the boundary at each step is because the reciprocal of the property described in the video is also true: a number from [0,1] whose ternary expansion only consists of 0's and 2's is part of the Cantor set. This would no longer hold if you took unions of open intervals instead, as you would remove all rational numbers of the form p/q where q is a power of 3, except 0 and 1 (note that most of those numbers are not part of the cantor set in the first place). Other properties would still hold, it would still be uncountably infinite while having length 0. R2: yes you can start at any n.
@KeithKessler Жыл бұрын
@@XT-N Ah, yes, re: ternary expansion. Thank you.
@xizar0rg Жыл бұрын
The Cantor set is pretty weird. It's clopen, has length zero while being uncountable, has no isolated points while having an element not in C between any two elements of C.
@darkmask4767 Жыл бұрын
The Cantor set as a subset of R is not open since every element of the Cantor set is a boundary point. Thus, the Cantor set is closed, but open in R.
@archimidis Жыл бұрын
The last property you mentioned is not that weird. Rational numbers have no isolated points while having an irrational number between any two rational numbers.
@fakezpred Жыл бұрын
Cantor set can't be clopen because R is connected
@ra-hu3lu Жыл бұрын
Maths major channel has been inactive for a long time now
@alexbush9250 Жыл бұрын
It’s summer, he may not be teaching
@ra-hu3lu Жыл бұрын
@@alexbush9250 when does the next semester start in USA ?
@wafelsen Жыл бұрын
@@ra-hu3lutypically early September
@atreidesson Жыл бұрын
It even is Math Major, not maths, that's how long it has been inactive
@pan196824 ай бұрын
Superb explanation 😊
@Alan-zf2tt Жыл бұрын
2nd comment: a beginners faux pas on my part? As an excuse: I would ask in a lecture.. so here goes. if x is in C as defined then x is either Rational or Irrational (EDIT out Real less Rationals) OR x is equivalent to some sub-interval C(*) for some number * ? x seems to have some ambiguity about being a singleton element of a rational element, a closed interval binding an irrational with an epsilon margin OR a closed sub-interval? After some more thought ... I must be on wrong track as C1 intersect C2 is actually C2 so by my reckoning a finitely countable infinite intersection looks not to be C but a rational singleton OR a closed interval containing an irrational element ... @ 05:58 should that be a countably infinite union rather that countably infinite intersection? In which case the union is not C but only C1 itself?
@zh84 Жыл бұрын
You didn't do the best bit: switch every 2 to a 1 in the decimal expansion, interpret the result in binary, and every point in the Cantor set (which has measure zero) maps to a point in the interval [0, 1] (which has measure one). It's the mathematical equivalent of pulling a rabbit out of a hat.
@adrienanderson7439 Жыл бұрын
woah, very interesting
@Anonymous-zp4hb Жыл бұрын
sweet result. You show the Cantor set contains only numbers expressible with 0s or 2s in base-3... But, not explicitly stated in the video is that it contains ALL such numbers in [0,1] that have this property. Is this true? From the argument, it does seem to follow : Because each step, you're just removing any numbers with lead digit (trigit?) equal to 1 Then after the shift, you're just playing the same game with the second digit in the two subsets, the ones with lead 0 and with lead 2
@tokajileo5928 Жыл бұрын
I'd like to see a video about Perron's formula and Mellin transform
@DrR0BERT Жыл бұрын
I remember asking my analysis professor, why not remove the middle 4/5 instead of the middle 1/3 to determine C1? That leaves the only possibilities for the tenths digit being 0 or 9. Going for C2 by removing the middle 4/5 will yield decimals where the first two digits after the decimal would be 0 or 9. Continue this process and by construction what's left are all numbers in [0,1] with decimal representation consisting of 0's or 9's. Basically the proof is the construction. It was easier for me, at the time, to understand the overall set.
@XT-N Жыл бұрын
The Smith-Volterra-Cantor sets are a generalisation of the Cantor set where you remove a fixed percentage, not necessarily 1/3, from the set at each step
@DrR0BERT Жыл бұрын
@@XT-N I always fount this fascinating. I kinda wish I would have explored it further in my degree in Algebra.
@PhoenixInfeno Жыл бұрын
But where is a good place to stop?
@Alan-zf2tt Жыл бұрын
Well - it cut out just as it was getting interesting! Kinda wondering why Cantor was given such a hard time by his peers. Maybe discovering exotic animals in the world of math, math reasoning, math deduction, ... was frowned upon at the time? I guess that modern math has learned and appreciates strange animals in math closet now.
@robshaw2639 Жыл бұрын
In non-standard analysis, I think it is possible that .9999999... (base 10) is infinitesmially close to 1 -- namely, it's distance from 1 is closer than any positive real number, but not zero... it is a non-standard infinitesmial distance from 1... I know that non-standard analysis "doesn't add anything new" to standard analysis over the reals, but I've never seen an argument why this type of limit might be different from 1 (by an infinitesmal) in non-standard analysis...
@richardbloemenkamp8532 Жыл бұрын
Compactness? According to the Heine-Borel theorem it seems compact because it seems closed and bounded. However does any open cover of the set contain a finite sub cover?
@bullpup1337 Жыл бұрын
of course, but I think the proof is a bit too long for a youtube comment (if you dont simply want to resort to say that it is trivially so). I guess you first show sequential compactness and then use proof by contradiction and construct an appropriate sequence.
@richardbloemenkamp8532 Жыл бұрын
@@bullpup1337 The main issue, I see, is that the Cantor set is not a fixed set but a sort of limit of a sequence of sets at each level with ever more closed intervals with reducing sizes. You can create a finite open cover at each level with sets that are disjoint and where each open interval covers only one closed interval. As the Cantor 'level' sets go to infinity, so do the number of disjoint open intervals containing the closed intervals at at each level. Since these open intervals are disjoint, in the limit their will not be a finite subset also covering the Cantor set. Therefore I'm not convinced by the "of course".
@bullpup1337 Жыл бұрын
@@richardbloemenkamp8532 I think you have a series misunderstanding on the nature of sets. Just because a set can be constructed as the union of countable subsets does not mean the set is not “fixed”. Is indeed fixed in the sense that for every point you can clearly determine whether it belongs to C or not.
@richardbloemenkamp8532 Жыл бұрын
@@bullpup1337 I do not understand what you are writing. I do understand that for example 1/9 is an end-point of an interval of the Cantor set while 1/4 is part of the Cantor set but it is not and end-point because in base3 it is 0.02020202020202... However 1/4 is also not an interior point because the Cantor set doesn't have interior points: there is no epsilon such that the interval (-eps/2, eps/2) lies entirely in the Cantor set. So if a point is part of a set but it is not and end-point and also not an interior point then what is it? Now let's cover the Cn (level n of the Cantor set) with disjoint open intervals: let epsn = 0.1*length(one interval of Cn). Then we can cover each interval Cn_k of Cn by an open interval In_k = (-epsn+leftEndpoint(Cn_k), +epsn+rightEndpoint(Cn_k)). The full cover of Cn can thus be constructed and let's name it In. Then for every n, In is a finite collection of disjoint open intervals covering Cn. However as n goes to infinity, In is no longer finite and does not contain a finite subcover covering Cn since every In_k is needed for the cover.
@BrianGriffin83 Жыл бұрын
Hey, wait. How do we know what's the good place to stop? 😕
@pierreabbat6157 Жыл бұрын
Can you talk about the leaky teepee and the Volterra function?
@kilianklaiber6367 Жыл бұрын
Preliminary remark: The limit doesn't make any sense unless we define a measure for these sets and subsets, correct?
@kilianklaiber6367 Жыл бұрын
Why do you use the intersection at all? The intersection of Cn and Cn+1 is just Cn+1, correct?
@kilianklaiber6367 Жыл бұрын
The proof of the lemma is really nice. I am looking forward to what you can do with this strange set.
@XT-N Жыл бұрын
The intersection of Cn and Cn+1 is indeed Cn+1 but you need some for of limit to take this to infinity and define C. The limit used in the video coincides with the discrete distance d (where d(x,y) is 0 if x=y and 1 otherwise) because we're taking all of the terms which are in all Cn after some n (which is the same as being in all Cn because Cn is a subset of Cn+1)
@thechannelwithoutanyconten6364 Жыл бұрын
Is that information relevant in any further researches?
@SimonClarkstone Жыл бұрын
It's a good counter example to hypotheses because it's so bizarre. There is a higher-rated comment on this video that states some of its strange properties with their proper names.
@BenfanichAbderrahmane Жыл бұрын
Why 3x is in C?
@otraguardia Жыл бұрын
Why do you need the limit to define the set? Doesn't C_inf already (recursively) define it? No need for the intersections.
@oliverherskovits7927 Жыл бұрын
How are you defining C_inf? The only reasonable way to define it is by some sort of limit of the C_k and the limit of a sequence of decreasing sets is their intersection
@otraguardia Жыл бұрын
@@oliverherskovits7927, C_inf is defined recursively as given. Why the intersection and the limit? The set is the same whether you start the limit at 1, 2, 3, or whatever n. The intersection of a set with a superset is always the set itself. So what's the point of all this? Just define C as C_inf and be done.
@ConManAU Жыл бұрын
A recursive definition lets you define Cn for any integer, but it doesn’t tell you what Cinf will be. It’s just like with infinite sums where we define them to be the limit of the finite partial sums.
@xyz.ijk. Жыл бұрын
You needed to make clear that we were in base 3 at all times once the proof started, and you never explained what ternary is. Or was this an ipse dixit?
@SajjadYami-s9s Жыл бұрын
please make playlist for holography. it would be awesome
@noahgilbertson7530 Жыл бұрын
12:58 nope 😅
@GreenMeansGOF Жыл бұрын
Where is the good place to stop?😭
@CM63_France Жыл бұрын
if we complain too much, I have a feeling he's going to make us a pre-cooked version, which would be a shame! For an original version of the "good place to stop" each time, vote!
@aaronmorris1513 Жыл бұрын
Anybody else hearing Jonathan Coulton in their heads?
@XT-N Жыл бұрын
Maybe the real good place to stop is the results we proved along the way
@PawelS_77 Жыл бұрын
That wasn't a good place to stop the sound.
@bentationfunkiloglio Жыл бұрын
Why taunt those of us who are red-green colorblind with your magenta chalk?
@christophniessl9279 Жыл бұрын
wouldn't it be much easier to prove x ∈ C_n a_1,a_2,...,a_n ∈ {0,2}? we just have to set the conditon that for the numbers that have two ternary expansions we chose the one that does not end in zeroes, i.e it ends in 2s, e.g. ⅓ = (0.10000...)₃ = (0.02222...)₃ Induction: n=0 is clear Induction step =>: let x ∈ C_[n+1} then either x ∈ ⅓ C_n or x ∈ ⅔ + ⅓ C_n. in both cases we have a y ∈ C_n with y = 0.b₁b₂b₃...and the b_i are 0 or 2 for 0 ≦ i ≦ n, and x = ⅓ y or x = ⅓ y + ⅔. Multiplication with ⅓ is a shilft right of the "trigits", abd we we fill up the trigit after the "tricimal" point with either 0 or 2. IOW x = (0.0b₁b₂b₃....)₃ or x = (0.2b₁b₂b₃....)₃ In both cases the first n+1 trigits are either 0 or 2. Indiction Step
@XT-N Жыл бұрын
You only proved half of the result, the half that was not proved in the video. You'd still have to prove the reverse is also true
@Chris-iw3vi Жыл бұрын
Lorsque j'enseignais encore à l'université, dans mon cours de Perl je demandais régulièrement à mes étudiants de programmer cet algorithme. En voici mon interprétation personnelle : #!/usr/bin/perl $a=sub{print $x}; $b=sub{length($&)}; &$a if $x = ('='x 3**$ARGV[0])." "; $x =~ s-=+-join('',map{$_ x (&$b/3)}('=',' ','='))-ge and &$a while (&$b!=3); $x =~ s-=+ +=+-{"=" x &$b}-ge and &$a until (&$b==(3**$ARGV[0])); Son exécution : pi:~/Desktop/Perl $ perl Cantor.pl 3 =========================== ========= ========= === === === === = = = = = = = = === === === === ========= ========= =========================== The argument in the program call determines the length of the starting line.
@ZenithWest169 Жыл бұрын
I just can't stop staring at the last interval mistakenly going from 1 to 1, instead of 0 to 1 and waiting on the edge of my seat for him to correct it