Red-Green Tree

Do you know how I know I’m a geek? When I saw this morning’s xkcd:


My initial reaction was disappointment upon realizing that the tree wasn’t a red-black tree with all the black nodes colored green. On the other hand, though, I suppose a red-green tree would involve a lot more duct tape.

Also, regarding the alt title text: removing the root of a heap is only O(log n). Quit whining about Billy taking the root present; it’s not as though a heap would’ve allowed him to take anything else. Maybe next year I’ll make you solve a graph coloring problem to figure out who gets what; maybe O(n log n) suddenly won’t seem so bad when your Christmas morning is NP-complete!

In which I criticize xkcd

As much as I like xkcd, I can’t let Monday’s comic stand without comment:


That’s not how homeopathy works.

Wait, let me rephrase that. That’s not how homeopathy claims to work.

According to the principles of homeopathy, the cure for any condition can be created by finding a substance that induces the same symptoms of the condition, and then diluting it to an extreme degree. Hahnemann “discovered” this by observing that if a healthy person ingested cinchona bark (which had been used to treat malaria), they suffered symptoms similar to malaria. He therefore took this one data point and concluded that “like cures like” is a universal principle. Furthermore, since diluting something harmful reduces its harmful effects, it therefore eliminated the harmful effects of the compound without reducing the supposed curative properties.

Why do homeopaths know this, especially given that homeopathic treatments consistently fail scientific tests? Ask them, and they’ll accuse you of just being a shill for big pharma.

Now you see the problem in the aforehotlinked xkcd comic. If homeopathy were true, heavily diluted semen wouldn’t get you pregnant; it would be birth control. Or maybe induce an abortion.

Also: you might think that the 30X dilution means “diluting by a factor of 30″. That’s not how homeopathic notation works. The “X” doesn’t mean “times”, it means “factors of 10″. A 30X homeopathic dilution of something is made by diluting it by a factor of 10-to-1, thirty times in a row. Or, in other words, diluting it by a factor of 1030 = 1,000,000,000,000,000,000,000,000,000,000-to-1.

A 30X dilution of semen certainly won’t get you pregnant. According to Wikipedia, an undiluted dose of human semen contains roughly 4×107 spermatozoa. After a 30X dilution, the sperm count drops to 4×10-23, or 0.00000000000000000000004 spermatozoa. Since you can’t have fractional spermatozoa, your 30X dilution leaves you with nothing but water. It definitely won’t get you pregnant. Or keep you from getting pregnant. It’s freaking water.

Another way of looking at it is this. Also according to Wikipedia, the original volume of that semen is 2 mL. A 30X dilution would add enough water to increase the volume to 2×1030 mL = 2×1027 L. That’s a lot. That’s roughly 4.8×1014 cubic miles. The Pacific Ocean “only” has 1.5×108 cubic miles of water in it.

And 30X is fairly modest as far as homeopathic dilutions go. You can find homeopathic “treatments” on the market that are diluted at 200C. Since the C stands for 100, this is the same as 400X. That’s one-followed-by-400-zeros-to-one!

In summary: homeopathy is completely ridiculous, but not in the way that xkcd claims it is.


I can’t help but note the similarity between today’s xkcd and a ghost story told in Chapter 20 of Homunculus….

4,096 ought to be enough for anybody

Other than pointing out that the fault lies primarily with how Adobe’s programmers don’t know how to do anything efficiently on non-Windows platforms except crash the browser, I can personally verify that today’s xkcd is 100% accurate. Including the mouse-over text, and the fact that the kernel patch mentioned in the comic indeed exists.