Cardinality of the complex numbers

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

alessandro95
Posts: 109
Joined: Wed Apr 24, 2013 1:33 am UTC

Cardinality of the complex numbers

Postby alessandro95 » Wed Sep 25, 2013 12:48 pm UTC

Today I read that |C|=|R|, intuitively I would say that |C|=|R^2|, I have no problem understanding why |N|=|Q|<|R| but I don't get why the cardinality of complex numbers is the same as the cardinality of real numbers, can someone explain it to me in a very simple way (I'm only in high school)?

Thanks in advance!
The primary reason Bourbaki stopped writing books was the realization that Lang was one single person.

User avatar
Robert'); DROP TABLE *;
Posts: 730
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Re: Cardinality of the complex numbers

Postby Robert'); DROP TABLE *; » Wed Sep 25, 2013 1:11 pm UTC

Because you can build one of these that maps the line to a plane in a one-to-one way. (And thus the plane to the line, proving they've got the same cardinality.)
...And that is how we know the Earth to be banana-shaped.

alessandro95
Posts: 109
Joined: Wed Apr 24, 2013 1:33 am UTC

Re: Cardinality of the complex numbers

Postby alessandro95 » Wed Sep 25, 2013 1:32 pm UTC

that makes sense, so the cardinality of C actually is the cardinality of R^2, but that's the same as the cardinality of R.
thanks!

Does that generalize to higher dimensions?
Edit:
yes it does, I read the wiki more carefully.
So |R^n|=|R|, regardless of n, right?
The primary reason Bourbaki stopped writing books was the realization that Lang was one single person.

User avatar
Xenomortis
Not actually a special flower.
Posts: 1448
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Cardinality of the complex numbers

Postby Xenomortis » Wed Sep 25, 2013 1:36 pm UTC

So... is the issue that you don't follow why |C| = |R| or why C and R2 are basically the same set?
Being able to construct a space filling curve immediately proves that |R| = |R2|.

A more boring way is simply to do some cardinal arithmetic using some facts we know about infinite cardinals.
(In this context, "2" refers to any 2-element set)

|R2| = |R||2| (cardinal exponentiation: AB refers to the set of all functions from B to A and has cardinality |AB| = |A||B|)
|R||2| = (|2||N|)|2| (|R| = |2N| - the set of reals is essentially the set of functions from N to a 2 element set (i.e. R is the powerset of N))
|2N||2| = |2||2*N|
|2||2*N| = |2||N| (|N| = |2*N| - this is pretty easy; you can think of Z as 2*N minus a single element)
|2||N| = |R|

Hence R2 is equinumerous with R

C really is just R2; it's just you give a special name to the elements of the ordered pair (coordinate) and have some special rules about how we work with the numbers.
An element of R2 looks like (x,y) where x, y are elements of R.
An element of C looks like x+iy, which we could happily write as (x,y).

And yes, |Rn| = |R| for any finite n
In general: |Xn| = |X| for any infinite X and finite n (hence |N| = |N2| which is basically |Q|).
Image

alessandro95
Posts: 109
Joined: Wed Apr 24, 2013 1:33 am UTC

Re: Cardinality of the complex numbers

Postby alessandro95 » Wed Sep 25, 2013 2:02 pm UTC

I had no problem understanding why |C|=|R2|, or that C and R2 can.be seen as the same set, my problem was understanding why |C|=|R|, but the space-filling curve is really easy to understand and shows how |R2|=|R|.
But I find cardinal exponentation confusing, I'll try to read your calculations later when I have more time!
The primary reason Bourbaki stopped writing books was the realization that Lang was one single person.

Derek
Posts: 2181
Joined: Wed Aug 18, 2010 4:15 am UTC

Re: Cardinality of the complex numbers

Postby Derek » Wed Sep 25, 2013 2:50 pm UTC

Robert'); DROP TABLE *; wrote:Because you can build one of these that maps the line to a plane in a one-to-one way. (And thus the plane to the line, proving they've got the same cardinality.)

Space filling curves are not actually one-to-one, they are surjective (some numbers in R^2 will be mapped by many numbers in R). But injective functions also exist (like (x,y) = (t,t)), and if injective and surjective functions exist between two sets, they are the same size. They don't need to be the same function.

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Wed Sep 25, 2013 4:49 pm UTC

alessandro95 wrote:So |R^n|=|R|, regardless of n, right?

As long as |n| is positive and finite. Obviously |R^0| = 1, while the cardinality of the powerset |R^R| > |R|.

skullturf
Posts: 556
Joined: Thu Dec 07, 2006 8:37 pm UTC
Location: Chicago
Contact:

Re: Cardinality of the complex numbers

Postby skullturf » Wed Sep 25, 2013 9:59 pm UTC

Just some admittedly very handwavy remarks about the "intuition" behind this stuff:

Intuitively, one may think of R^2 as "bigger" than R. But that's only true if you're including all the geometric and algebraic structure of those sets. If we care only about cardinality, then we're just thinking of them as unordered "bags" of points, that don't have any particular order or distance relations among them.

If we're just thinking about cardinality, and we take the product of two copies of an infinite set X, we don't really jump to the next "level" as far as cardinality is concerned. Countable times countable doesn't leave the realm of countable. (Cardinality of R) times (cardinality of R) is still just cardinality of R -- you have to do something "more" with your sets if you want to go "beyond" the cardinality of R.

User avatar
MartianInvader
Posts: 808
Joined: Sat Oct 27, 2007 5:51 pm UTC

Re: Cardinality of the complex numbers

Postby MartianInvader » Wed Sep 25, 2013 11:35 pm UTC

Space-filling curves are cool because they're continuous, but you don't really need something that complicated if you're only worried about cardinality. Just map (0,1)^2 to (0,1) by interleaving the decimal expansions, and then spend two pages explaining what to do about infinite sequences of trailing 9's, and you've got a bijection.
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!

User avatar
jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

Re: Cardinality of the complex numbers

Postby jestingrabbit » Wed Sep 25, 2013 11:37 pm UTC

MartianInvader wrote:two pages


And aren't they the dullest two pages you've ever written...
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Thu Sep 26, 2013 12:52 am UTC

Xenomortis wrote:In general: |Xn| = |X| for any infinite X and finite n (hence |N| = |N2| which is basically |Q|).
I'm a bit rusty, but can't we say something stronger than that?
|AB| = |A| if A is infinite and |A| > |B|
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Cardinality of the complex numbers

Postby Qaanol » Thu Sep 26, 2013 1:10 am UTC

MartianInvader wrote:Space-filling curves are cool because they're continuous, but you don't really need something that complicated if you're only worried about cardinality. Just map (0,1)^2 to (0,1) by interleaving the decimal expansions, and then spend two pages explaining what to do about infinite sequences of trailing 9's, and you've got a bijection.

Or never use infinite trailing 9’s, interleave the decimal expansions to get an injection, observe the trivial injection going the other way, and use a directed graph to produce a bijection.
Last edited by Qaanol on Thu Sep 26, 2013 12:59 pm UTC, edited 1 time in total.
wee free kings

Deedlit
Posts: 91
Joined: Sun Mar 08, 2009 2:55 am UTC

Re: Cardinality of the complex numbers

Postby Deedlit » Thu Sep 26, 2013 6:00 am UTC

gmalivuk wrote:
Xenomortis wrote:In general: |Xn| = |X| for any infinite X and finite n (hence |N| = |N2| which is basically |Q|).
I'm a bit rusty, but can't we say something stronger than that?
|AB| = |A| if A is infinite and |A| > |B|


No. For example, for any cardinal [;\alpha;], it is consistent with ZFC that [;\alpha^{\aleph_0};] is larger than [;\alpha;]. In addition, [;\alpha^{cof (\alpha)} > \alpha;] for any cardinal [;\alpha;], so we have [;\aleph_\omega ^ {\aleph_0} > \aleph_\omega;].

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Cardinality of the complex numbers

Postby mike-l » Thu Sep 26, 2013 6:09 am UTC

When you say it's consistent with ZFC, is that meant to imply that gmal's statement is also consistent with ZFC? (ie, usually when I hear 'is consistent with' there's an implied 'it's negation is also consistent', of course gmal's statement is stronger than that.) I do know that gmal's statement implies GCH, and thus choice, so at the very least it's not consistent with ZF\C (how do you make a logical negate?)
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

Deedlit
Posts: 91
Joined: Sun Mar 08, 2009 2:55 am UTC

Re: Cardinality of the complex numbers

Postby Deedlit » Thu Sep 26, 2013 6:39 am UTC

No, because the second sentence of my last post is provable in ZFC. So

[; \aleph_\omega^{\aleph_0} > \aleph_\omega ;]

Here's a quick proof: Suppose we have a function f from aleph_omega to aleph_omega^aleph_0. Then we can choose a g in aleph_omega^aleph_0 so that:

g(0) does not equal f(alpha)(0) for any alpha < aleph_0 (since there will be at most aleph_0 many f(alpha)(0), and aleph_omega many possible values for g(0))
g(1) does not equal f(alpha)(1) for any alpha < aleph_1
...

The resulting g is not in the image of f, since for any alpha in aleph_omega, alpha is in aleph_n for some n, and then g will not be f(alpha) since g(n) != f(alpha)(n). So f cannot be surjective, and aleph_omega^aleph_0 > aleph_omega.

User avatar
Xenomortis
Not actually a special flower.
Posts: 1448
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Cardinality of the complex numbers

Postby Xenomortis » Thu Sep 26, 2013 8:21 am UTC

Deedlit wrote:No. For example, for any cardinal [imath]\alpha[/imath], it is consistent with ZFC that [imath]\alpha^{\aleph_0}[/imath] is larger than [imath]\alpha[/imath]. In addition, [imath]\alpha^{cof (\alpha)} > \alpha[/imath] for any cardinal [imath]\alpha[/imath], so we have [imath]\aleph_\omega ^ {\aleph_0} > \aleph_\omega[/imath].

Fun fact, this post is nearly unreadable for me.
Stick to unicode and super/sub-script please. Yes, the unicode aleph sucks.
Using both aleph and alpha later on only exacerbates things.
Image

User avatar
PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: Cardinality of the complex numbers

Postby PM 2Ring » Thu Sep 26, 2013 8:28 am UTC

alessandro95 wrote:Today I read that |C|=|R|, intuitively I would say that |C|=|R^2|, I have no problem understanding why |N|=|Q|<|R| but I don't get why the cardinality of complex numbers is the same as the cardinality of real numbers, can someone explain it to me in a very simple way (I'm only in high school)?

Thanks in advance!

Don't worry, you're in good company - Cantor himself originally had the same intuition. They didn't know about space-filling curves back then: it was until several decades later that Hilbert discovered the first one. I can't remember how Cantor first proved that |R| = |Rn| (and it's not easy to find with a quick look at Google search pages), but I think it was essentially equivalent to the digit-interleave method (which was the first method I learned, courtesy of a Martin Gardner article in SciAm). OTOH, it may very well have been a much more complicated proof. :)

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Thu Sep 26, 2013 5:10 pm UTC

Is there a reason you're composing your posts in raw LaTeX markup?

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Cardinality of the complex numbers

Postby mike-l » Thu Sep 26, 2013 5:57 pm UTC

Eebster the Great wrote:Is there a reason you're composing your posts in raw LaTeX markup?

Because it's a math forum, and he's talking about rather complicated math, and most people that can understand that can also read LaTeX?
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Thu Sep 26, 2013 6:36 pm UTC

mike-l wrote:
Eebster the Great wrote:Is there a reason you're composing your posts in raw LaTeX markup?

Because it's a math forum, and he's talking about rather complicated math, and most people that can understand that can also read LaTeX?

LaTeX isn't for reading, it's a markup language. I can also read HTML just fine, but it would be weird seeing raw HTML in a post. I mean, "\aleph_\omega^{\aleph_0} > \aleph_\omega" is not more readable than "a_w^a_0 > a_w", or better yet "ℵωℵ₀ > ℵω."

I wish the math tags would come back.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Thu Sep 26, 2013 6:42 pm UTC

For people too lazy to get the right Unicode, you can use the TeX the World plugin and convert everything between [; and ;] to TeX.

I'd still suggest just using unicode for things that can be readably expressed on a single line, though.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Cardinality of the complex numbers

Postby mike-l » Thu Sep 26, 2013 6:53 pm UTC

There are addons that can convert LaTeX automagically for you.

I do actually find the first more readable than the second, especially since I know \aleph_\omega refers to a particular object at a glance, but I don't know that a_w isn't just a generic variable. Unicode is admittedly better than either, but also is harder to type and requires the viewer to have Unicode support
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

User avatar
Xenomortis
Not actually a special flower.
Posts: 1448
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Cardinality of the complex numbers

Postby Xenomortis » Thu Sep 26, 2013 7:07 pm UTC

TeX addons don't help me at work.
Image

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Thu Sep 26, 2013 8:32 pm UTC

The unicode solution clearly isn't perfect either. For instance, there's no way to put ℵω in an exponent, because you can't embed BBcode subscripts inside superscripts, and there is no unicode character for subscript ω (I think).

Still, reading TeX is annoying. Personally I would even prefer "Aleph sub omega to the power of aleph null is greater than aleph sub omega."

User avatar
Xenomortis
Not actually a special flower.
Posts: 1448
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Cardinality of the complex numbers

Postby Xenomortis » Thu Sep 26, 2013 8:37 pm UTC

Aω works for me.
Image

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Thu Sep 26, 2013 9:07 pm UTC

Aℵ[sup]ω[/sup] has some issues, though.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Thu Sep 26, 2013 11:42 pm UTC

Xenomortis wrote:Aω works for me.

I stand corrected.

abcd? xy? uv?

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: Cardinality of the complex numbers

Postby skeptical scientist » Tue Oct 01, 2013 6:16 am UTC

Personally I find the latex more readable than any of the alternatives so far discussed, save unicode.

Why did we ditch the support for math tags? Were they really so much worse than the alternative, and is there really no viable replacement?
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Tue Oct 01, 2013 5:03 pm UTC

The tags caused terrible slowdown for everyone who looked at certain pages, whether or not they cared about seeing math properly. I recommend just using a plugin on your end. TeX the World is what I have on my home computers, and as I said only requires enclosing the markup in [; and ;].

At some point, I'll maybe replace the stickied jsmath threads in Math and Science with the recommendation to use that plugin, and then whoever wants to see it properly can install it themselves.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Wed Oct 02, 2013 12:03 am UTC

Any reason the TeX caused slowdown when interpreted by the site but not by these scripts?

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Wed Oct 02, 2013 12:34 am UTC

It may also with the scripts, but only for those who choose to enable them. jsmath did for everyone.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Wed Oct 02, 2013 1:41 am UTC

(I've put links to the plugin in announcements for both the math and science forums, and replaced [imath] tags in this thread with the proper brackets.)
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: Cardinality of the complex numbers

Postby PM 2Ring » Wed Oct 02, 2013 1:42 pm UTC

Eebster the Great wrote:Any reason the TeX caused slowdown when interpreted by the site but not by these scripts?

Well, AFAIK it wasn't actually interpreted by the site, per se. jsMath (like most JavaScript stuff) is handled on the client site, i.e., in your browser. jsMath could be very slow in some browsers, especially if you didn't have the proper jsMath fonts installed so that it had to fall back to rendering stuff as images. It could even make some old browsers lock up, or at least appear to do so. FWIW, a couple of my friends from other forums refused to register on xkcd after having bad experiences here with jsMath.

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Cardinality of the complex numbers

Postby Qaanol » Wed Oct 02, 2013 3:50 pm UTC

Is it potentially feasible to customize the forum software so there is a "Render Maths" button either at the top/bottom of the page, or in the corner of each post?

That way the default could be "Do not render maths", but users could manually cause them to be rendered. There could even be a preference in the user control panel so people who want to, can change their default to "Render maths".
wee free kings

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Wed Oct 02, 2013 5:28 pm UTC

Sure, that's *potentially* feasible. Feel free to suggest it in the Site / Forum Issues subforum.

The problem is that it would require davean to do a bunch of things with no real benefit to himself or most of the forum at large, whereas TeX the World requires you to do one thing with obvious and immediate benefit to yourself.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Wed Oct 02, 2013 6:16 pm UTC

The problem is obviously adoption. You don't just need to have TeX the World yourself, you need your audience all to have it.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Cardinality of the complex numbers

Postby gmalivuk » Wed Oct 02, 2013 7:04 pm UTC

Do you think there are forum users who would see naked TeX and ignore your post, but who would offer useful and considered replies if only the TeX had been interpreted properly?
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Eebster the Great
Posts: 3462
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Cardinality of the complex numbers

Postby Eebster the Great » Wed Oct 02, 2013 7:45 pm UTC

gmalivuk wrote:Do you think there are forum users who would see naked TeX and ignore your post, but who would offer useful and considered replies if only the TeX had been interpreted properly?

There's got to be some. I'm not saying the add-on isn't useful, just less than optimal.

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Cardinality of the complex numbers

Postby mike-l » Thu Oct 03, 2013 4:34 am UTC

I found it to work well on my computer, but terribly on my phone, so I definitely prefer just reading raw tex unless it's something that doesn't read well like matrices (which are still fine if the tex is formatted well, but terrible if done inline. For things like super/subscripts I actually prefer ^ or _ and {} to formatting as such. And like I said, I'll take \pi over p and \aleph over a any day. I don't even know how to type Unicode on my phone, but ill admit this is nicer than \command
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

User avatar
phlip
Restorer of Worlds
Posts: 7572
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Cardinality of the complex numbers

Postby phlip » Thu Oct 03, 2013 5:36 am UTC

Eebster the Great wrote:Any reason the TeX caused slowdown when interpreted by the site but not by these scripts?

The biggest slowdown with JSMath is that it was split up into about 20 separate JS files (about half a dozen for the TeX processor itself, and about then a dozen more for all the font data). Each of those files would be fetched one at a time, in order, synchronously... and this would usually lock up the browser (or at least that tab) until the whole thing was downloaded. Each file would take 2-3 seconds to download, mostly network overhead and server slowness. If you changed your JSMath settings you could get it to download asynchronously... in which case it would still take about a minute to download all the scripts one at a time, but the browser would be usable in the meantime. And if you downloaded and installed the JSMath fonts, then it would use those instead of downloading them every time, which would speed it up too. But neither of those was the default for most users. Once it had all downloaded, though, the actual parsing of all the TeX code (at the client end) was reasonably quick.

This "TeX the World" script, though, is already all downloaded on your machine, so there's no scripts that need to be re-downloaded every time. Also the actual TeX processing is done serverside (just not xkcd's server) - the script calls some server to turn it into an image, which it displays.

It would conceivably be possible to integrate that TeX the World thing into the forums, in place of JSMath. Or, alternatively, maybe the MathJax thing that what-if uses. But, again, all of that is dependent on how much work it would be for davean behind the scenes, which I really have no idea about.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 3 guests