An Algorithmic Lucidity

a blog

It's Not Whether You Win or Lose

It's how close you come to doing the Right Thing at each and every one of the uncounted millions of decision points that make up your life, with how you play in any particular game only constituting a tiny fraction of these, and it being not at all clear that choosing to play a game just then is closer to the Right Thing than any number of non-game-playing actions you might have chosen instead, but didn't.

Forgetting to Take an Average

It seems as if my outlook on life varies drastically with mood. In the moments when I feel brave and ambitious, I rarely seem to remember that it won't last: that in a week or a day, the moment will be gone and I'll feel weak and scared again—and of course it goes conversely, too.

We don't have the technology or the wisdom to redesign our own emotions. If the moments of weakness-and-fear aren't going away, and if neither mood is exactly a belief that could be destroyed by the truth, then it seems like it would at least be useful to remember, if for no other reason than to avoid wasting cognition devising plans and expectations that aren't sufficiently robust to ordinary emotional variation.

The True Secret About Conjugate Roots and Field Automorphisms

In the study of the elementary algebra, one occasionally hears of the conjugate roots theorem, which says that if \(z_0\) is a root of a polynomial with real coefficients, then its complex conjugate is also a root. Or if you prefer, nonreal roots come in conjugate pairs. It also works in the other direction: if nonreal roots of a polynomial come in conjugate pairs, then the polynomial has real coefficients, because the purely imaginary parts cancel when you do the algebra: \((x - (a + bi))(x - (a - bi)) = x^2 - x(a + bi) - x(a - bi) + (a^2 - (bi)^2) = x^2 - 2ax + a^2 + b^2\).

There's also this idea that conjugation is the unique nontrivial "well-behaved" automorphism on ℂ, a map from ℂ to itself that respects addition and multiplication: the sum (respectively product) of the conjugates is the conjugate of the sum (respectively product). The complex numbers are symmetrical around the real axis in a way that they're not around the imaginary axis: while i and –i are different from each other, you can't "tell which is which" because they behave the same way. Contrast to 1 and –1, which do behave differently: if someone put either 1 or –1 in a box, but they wouldn't tell you which, but they were willing to tell you that "The number in the box squares to itself," then you could figure out that the number in the box was 1, because –1 doesn't do that.

The existence of these two ideas (the conjugate roots theorem and conjugation-as-automorphism) can't possibly be a coincidence; there must be some sense in which nonreal roots of real-coefficient polynomials come in conjugate pairs because the polynomial "can't tell" "which is which". But it would be unsatisfying to just say this much and nothing more ("Theorem: That can't possibly be a coincidence. Proof ...??"); we want to say something much more general and precise. And in fact, we can—

Say that \(L\) is a field, and that \(K\) is a field that lives inside \(L\), and that σ is a member of the group of field automorphisms of \(L\) that leave \(K\) alone (that is, map all members of \(K\) to themselves). Then we can show that

Theorem (generalized conjugate roots theorem). If \(z_0\) is a root of a polynomial with coefficients in \(K\), then σ(\(z_0\)) is too.

Proof. Let

$$P(z) := \sum_j a_jz^{j}$$

and suppose \(P(z_0) = 0\). Then consider the value of \(P(\sigma(z_0))\). Precisely because σ respects multiplication, we have

$$\sum_j a_j\sigma(z_{0})^{j} = \sum_j a_j\sigma(z_{0}^{j})$$

and because σ doesn't disturb anything in \(K\), that's the same as

$$\sum_j \sigma(a_j z_{0}^{j})$$

(because \(a\sigma(z) = \sigma(a)\sigma(z) = \sigma(az)\)), and because σ respects addition, that's also the same as

$$\sigma(\sum_j a_j z_{0}^{j})$$

But

$$\sigma(\sum_j a_j z_{0}^{j}) = \sigma(0)$$

and σ(0) has to be zero for the automorphism to work. So \(P(\sigma(z_0))\) is zero, but that's what I've been trying to tell you this entire time.

Recursion Is Boring

What the utter novice finds brilliant and fascinating, the slightly-more-experienced novice finds obvious and boring.

When you're trying to think of cool things to do with a system, one of the obvious things to try is to abuse self-reference for all the world as if you were Douglas fucking Hofstadter—but it's not cool, precisely because it is so obvious, and you're not Douglas Hofstadter.

Once I made a Git repository and a Mercurial repository living in the same directory, tracking each other endlessly, one going out of date the moment you committed to the other ...

But that's not interesting.

You can run Emacs inside a terminal, and you can run a terminal inside Emacs—in fact, you can run two (M-x term, M-x ansi-term). Therefore you can run two instances of Emacs within Emacs. Each of those Emacsen could run some natural number of other nested Emacsen, and therefore (to a certain perverse sort of mind) could be said to represent that natural number, which I presume could be determined programmatically (via recursion). Two-counter machines are Turing-complete. So, in principle, if you didn't run out of memory, you could build a computer out of instances of Emacs running on your computer ...

But that's boring.

Periphery Demographic

Judging by the comment moderation queue, this blog is wildly popular among a certain niche audience.

Namely, spambots. Although I can't help but wonder why spammers are so incompetent. Of course spammers have no reason to put any effort into the marginal comment or email. The reason spam exists is precisely because in a magical land of near-zero marginal cost (like the internet), the unscrupulous can afford to send sales pitches to a million people even if only fifteen bite. But that doesn't mean spammers couldn't put a little fixed-cost effort into improving their algorithm for generating those millions of spams. At least conventional advertising is occasionally entertaining; in contrast, most of the spam I see is just noise, to the extent that it once gave me an idea (which I would not implement; it's not my style) for a Reddit novelty account: "CompetentSpammer" would write eloquent, insightful comments that ever-so-subtly worked in references to charm bracelets and sketchy pharmaceuticals.

I know, it sounds as if I'm complaining, but I'm not: we are all grateful that spam is so easily distinguished from actual content; I was only wondering.

If you don't know what I'm talking about, some commentary on spam comments submitted to this blog is below the break—

Would-be commenter "charms" writes on "Summing the Multinomial Coefficients":

I adore thomas family funeral home! I got my initial couple as soon as i was initially 10 yrs old, the sunlight yellow quite short old classic.Now i'm 15 yrs old nowadays and also, since after that, I have got as well received your ebony quite short old classic, your bleak quite short old classic, [...]

And it goes on like that for another ninety words. One wonders: is anyone really going to buy shoes or whatever based on a blog comment like that? Maybe, maybe fifteen out of a million ... which I guess was the point. But again, one imagines that there would be a payoff to spammers for being more discriminating—I guess some them are. I got a few attempted comments referring to Zack Snyder, so someone's at least paying attention to the URL.

I even got one attempted comment that sort-of looks on topic, maybe, if you don't look too closely? "Alexey" writes on "Interpolating Between Vectorized Green's Theorems":

Great! I see how to finish it off now, and I see why given the dftierenfial equation and being told to look at F and f you would see that relation, but just introducing F in the first place well, I guess I just have to accept this proof is awesome. =DYou asked for topic areas: Have you ever seen Euler's proof that the number of partitions of a number into odd numbers equals that of a number into distinct numbers? That is a good one. Other than that, some Galois theory would be nice?

The comment throws around a lot of math terminology, but if it has any non-coincidental relationship to my post, I don't see it. And the URL supplied just goes to a near-empty Facebook profile. What's even the motive here? Maybe I'm wrong to think of this as "spam", when it could be a genuine math enthusiast who's confused, or bad at commmunicating in English? Who can say but that, in the end, what we really hate are low-quality comments, and we don't care whether or not they're trying to sell us something? (See also xkcd #810.)

Cached Reply Upon Being Told That I'm an Idiot

Not specific enough.

"What?"

You claim that I'm an idiot. Well, sure; I already knew that. If you could point to some specific way in which my thinking is confused and explain how I might do better, then I would be quite grateful. But to just say that I'm stupid, without elaborating, doesn't seem helpful.

(Words are useful insofar as they summarize information about the world. If everyone involved already has a detailed predictive model of someone's various cognitive abilities, then it doesn't matter whether you describe them as an "idiot" or a "genius". As compared to what?)

Supermarket Notes I

I think I like the store-brand "sparkling water beverages"; they fill a similar niche as soda (which I never buy at the store, but have been known to occasionally consume at parties or restaurants), but seem like they ought to be less deadly.

I think the "More grains. Less you!" slogan on this box of cereal sounds sinister. I mean, they're probably just talking about weight loss, but still ...

I'm suspicious of processed food products shaped like cartoon characters, as if there are highly-placed cannibals at General Mills plotting to train children that it's okay to eat creatures that can talk. On the other hoof, these fruit-flavored snacks are delicious.

Inclusion, Exclusion

In this modern day and age, it simply cannot be doubted that it is of the very utmost importance that we find the size of the union of some sets. One might try just adding the sizes of all the sets, but that's not correct, because then one would be double-counting the elements that appear in more than one set. But it's a good start. One might then think that one could begin by adding the sizes of the sets, but then subtract the sizes of the intersections of each pair of sets, in order to correct for the double-counting. But this is also incorrect, because then what about the elements that appear in three sets and had thus initially been triple-counted?—after subtracting the pairwise intersections, these elements haven't been included in the count at all! So one realizes that one must then add the sizes of the triplewise intersections ...

And in one of the dark recesses of the human mind, untouched by outside light or sound, silent and unyielding to the invidious scrutiny of introspection and cognitive science—a conjecture is formed—

The size of the union of \(n\) sets is given by the alternating (starting from positive) sum of the sums of the sizes of all \(j\)-way intersections amongst the sets from \(j := 1\) to \(n\)! (N.b., the exclamation mark indicates an excited tone, not "factorial".)

This conjecture turns out to be entirely correct, as demonstrated in the following

Theorem (Inclusion–Exclusion Principle).

$$\left|\bigcup_{i=1}^{n}A_{i}\right|=\sum_{j=1}^{n}(-1)^{j+1}\left(\sum_{S\subset\mathcal{P}(\{A_{i}\});|S|=j}\left|\bigcap_{A_{s}\in S}A_{s}\right|\right)$$

Proof. By induction.

(Basis.) \(|A_1 \cup A_2| = |A_1| + |A_2| - |A_1 \cap A_2|\)

(Induction.) We want to show that given that we can express a union of n sets using the proposed method, then we can do the same for a union of n+1 sets. From the basis, we can write:

$$\left|\left(\bigcup_{i=1}^{n}A_{i}\right)\cup A_{n+1}\right|=\left|\bigcup_{i=1}^{n}A_{i}\right| + |A_{n+1}|-\left| \left(\bigcup_{i=1}^{n}A_{i}\right) \cap A_{n+1} \right|.$$

Our inductive hypothesis says that the first term on the right side can be written as our proposed sum of appropriately signed sizes of intersections. Also, we can distribute the intersection-with-\(A_{n+1}\) over the union in the last term on the right side and then use the inductive hypothesis again to likewise rewrite that term as a sum of appropriately signed sizes of intersections. But then notice that we have all the terms we need, and that the signs are correct as well. So this is what I've been trying to tell you this whole time.

Summing the Multinomial Coefficients

The sum of binomial coefficients

$$\sum_{j=0}^n {n \choose j}$$

equals \(2^n\), because

$${n \choose j}$$

is the number of ways to pick j elements from a set of size n, and \(2^n\) is the size of the powerset, the set of all subsets, of a set of size n: the sum, over all subset sizes, of the number of ways to choose subsets of a given size, is equal to the number of subsets. You can also see this using the binomial theorem itself:

$$2^{n} = (1 + 1)^{n} = \sum_{j=0}^{n} {n \choose j} 1^{j}1^{n-j} = \sum_{j=0}^{n} {n \choose j}$$

But of course there's nothing special about two; it works for multinomial coefficients just the same. The sum, over all m-tuples of subset sizes, of the number of ways to split a set of size n into subsets of sizes given by the m-tuple, is equal to the number of ways to split a set of size n into m subsets (viz., mn).

Moral Mechanism

It feels immoral to even think of using techniques to motivate oneself; one should instead just use one's free will to choose the correct action. How utterly degrading it would be, how insulting to the very notion of human dignity, to stoop to the level of contemplating one's own psychology using mere cause-and-effect reasoning, as if one were some sort of animal, or a machine!

But this moralizing is itself immoral, because it doesn't work. If I'm not smart enough to do the right thing for the right reasons, then I might at least aspire to do the right thing for the wrong reasons for the right reasons.

Straight Talk About Precompactness

So we have this metric space, which is this set of points along with a way of defining "distances" between them that behaves in a basically noncrazy way (points that are zero distance away from "each other" are really just the same point, the distance from one to the other is the same as the distance from the other to the one, and something about triangles).

Let's say (please, if you don't mind) that a sequence of points \((x_n)\) in our space is fundamental (or maybe Cauchy) iff (sic) for all positive ε, there's a point far enough along in the sequence so that beyond that point, the distance from one point to the next is less than ε. Let's also agree (if that's okay with you) to say that our metric space is sequentially precompact iff every sequence has a fundamental subsequence. If, furthermore, the precompact space is complete (all fundamental sequences actually converge to a point in the space, rather than leading up to an ætherial gap or missing edge), then we say it's compact. It turns out that compactness is an important property to pay attention to because it implies lots of cool stuff: like, compactness is preserved by homeomorphisms (continuously invertible continuous maps), and continuous functions with compact domains are bounded, and probably all sorts of other things that I don't know (yet). I'm saying sequentially precompact because I'm given to understand that while the convergent subsequences criterion for compactness is equivalent to this other definition (viz., "every open cover has a finite subcover") for metric spaces, the two ideas aren't the same for more general topological spaces. Just don't ask me what in the world we're going to do with a nonmetrizable space, 'cause I don't know (yet).

But anyway, as long as we're naming ideas, why not say that our metric space is totally bounded iff for every ε, there exists a finite number of open (that is, not including the boundary) balls that cover the whole space? We can call the centers of such a group of balls an ε-net. Our friend Shilov quotes his friend Liusternik as saying, "Suppose a lamp illuminating a ball of radius ε is placed at every point of a set B which is an ε-net for a set M. Then the whole set M will be illuminated." At the risk of having names for things that possibly don't actually deserve names, I'm going call each point in an ε-net a lamp. Actually Shilov, and thus likely Liusternik, is talking about closed balls of light around the lamps, not the open ones that I'm talking about. In a lot of circumstances, this could probably make all the difference in the world, but for the duration of this post, I don't think you should worry about it.

But this fear of having too many names for things is really a very serious one, because it turns out that sequential precompactness and total boundedness are the same thing: not only can you not have one without the other, but you can't even have the other without the one! Seriously, like, who even does that?!

But the reasoning is inescapable. You can't have one without the other because if every sequence has a fundamental subsequence, then finite ε-nets are a thing, which is to say (by the contraposition doctrine and De Morgan's Iron Law of Negation) that if every ε-net is infinite, then sequences that don't have fundamental subsequences are a thing. To see this, think about an infinite ε-net where no lamp lies within the lighted area of any other lamp. A sequence consisting of such lamps can't have a fundamental subsequence because the distance between successive points in that sequence is bounded below by ε.

And you can't have the other without the one because if finite ε-nets are a thing, then every sequence has a fundamental subsequence. To see this, consider a sequence. For \(k \in \mathbb{N}^+\) and for \(\varepsilon := 1/k\), we can cover any subset of our space with a finite number of ε-balls. But then by the Infinitary Corollary of the Iron Law Pertaining to the Storage of Pigeons, there must then be an ε-ball that contains infinitely many points of our sequence. Let's pick one of those points and call it \(a_k\). Then if we set \(\varepsilon := 1/(k+1)\), our ball can itself be covered by a finite number of ε-balls, one of which again contains infinitely many points of our sequence, of which we can pick one and call it \(a_{k+1}\). That triggers an induction, giving us a subsequence \((a_n)\). But then for every \(N \in \mathbb{N}^+\), if \(n\) and \(m\) are not smaller than \(N\), then \(a_n\) and \(a_m\) live in a \(1/N\)-ball, so that the distance between them is bounded above by \(2/N\), which can be made arbitrarily small by choosing a large enough \(N\), which means that the subsequence \((a_n)\) is fundamental. But this is "quod erat demonstrandum" (a Latin phrase that roughly translates as "what I've been trying to tell you this entire time").

Bibliography

Theodore W. Gamelin and Robert Everist Greene, Introduction to Topology, 2nd ed'n., §I.5.

Georgi E. Shilov, Elementary Real and Complex Analysis, revised English ed'n., §3.93.

On Arc Length

Zeno knew, but did not know enough; a minute is divided
Into fragments, and each fragment sees, for points it o'er presided:
A small change, of which I take the distance
Along each fragment's lost existence:
The root of the sum of the squares
Of the length and the width and the height
Of the change in the range as the fragment is spanned
As the fragment is stricken from sight!

Mathematics Is the Subfield of Philosophy That Humans Are Good At

By philosophy I understand the discipline of discovering truths about reality by means of thinking very carefully. Contrast to science, where we try to come up with theories that predict our observations. Philosophers of number have observed that the first ten trillion nontrivial zeros of the Riemann zeta function are on the critical line, but people don't speak of the Riemann hypothesis as being almost certainly true, not necessarily because they anticipate a counterexample lurking somewhere above ½ + 1026i (although "large" counterexamples are not unheard-of in the philosophy of numbers), but rather because while empirical examination is certainly helpful, it's not really what we do. Mere empiricism is usually sufficient for knowing (with high probability) what is true, but as philosophers, we want to explain why, and moreover, why it could not have been otherwise.

When we try this on topics like numbers or shapes, it works really, really well: our philosophers quickly reach ironclad consensuses about matters far removed from human intuition. When we try it on topics like justice or existence ... it doesn't work so well. I think it's sad.

Contemporary

I've been taking a summer course at a university which I won't name, because whenever I do, I'm always tempted to replace one of the words with an obscenity that starts with the same letter, which is probably a bad habit. The topic is contemporary sexuality, which seemed like a fine choice for knocking out one of my remaining so-called "general education" requirements, and maybe even learning something relevant to my interests.

The class ends on Thursday the ninth, and I had intended to make a lot of progress today (the sixth) filling out the workbook (worth half a letter grade) due then. I didn't get very far. The task shouldn't be difficult; my goal is only to reduce the probability of my receiving a C in the class by means of circling the appropriate letters for the multiple-choice prompts (for which the answers are conveniently provided) and scribbling responses to the short-answer questions, glancing at the reading as necessary. There was once a time when I would have regarded this behavior as sinful: of course what you're supposed to do is carefully do the corresponding reading by the assigned date before thoughtfully filling out each workbook section, only using the multiple-choice answers to check your work. But if I've abandoned my moral scruples sometime in the past five years, then I also throw far fewer crying fits, and I don't think these changes are unrelated.

But when you don't respect the work, even doing a lazy job takes a certain amount of self-command. One of the workbook questions asks, "How do you define 'virginity' and what behaviors do you believe cause one to 'lose' his or her virginity?" I wrote, "It's pointless to argue about the definitions of words; once you know what behavior someone has engaged in, then calling it 'virginity' or 'non-virginity' doesn't give you more information". Snarky passive-aggression? Maybe, but when you ask a retarded question, what do you expect?

My patience broke when I got to the article arguing that we shouldn't use baseball metaphors to talk about sex (because those are sexist and oppositional) but should instead use pizza metaphors. Except it doesn't say metaphors, it says conceptual models.

In the evening, I received an email from the University. "Be prepared for Graduate School" says the subject line, although I don't understand the motivation for capitalizing Graduate School but not prepared. Morally, I expect such an email to say something like, "Make sure you've chosen a valuable or exciting topic on which to advance the frontiers of human knowledge, as is the function and sacred duty of scholars!" But of course it's just telling me that "[t]test preparation workshops for the GRE, GMAT, LSAT, CBEST, and RICA are starting soon."

Lies and Delusion

One day, two philosophers were dining in a restaurant. "There's no such thing as lying," said the first philosopher to his companion. "Anytime someone speaks falsehood, it must be the case that they are merely deluded, or that part of them is, for the love of truth is so essential to the nature of agency that the very notion of deception is repugnant to it."

"On the contrary, there's no such thing as delusion," said the second philosopher. "Anytime someone thinks falsehood, it must be the case that they are merely lying, or that part of them is, for the perception of truth is so essential to the nature of agency that the very notion of misapprehension is repugnant to it."

A waitress, overhearing this exchange, found that she did not want to restrain herself. "You're both lying!" she shouted at the philosophers. "Stop lying!"

An Idea for a Psychology Experiment

Let me know if someone's actually done this.

Experiment: Use undergraduate schoolstudents as test subjects. Give each subject a shuffled deck of playing cards and ask them to sort it by suit and rank as quickly as possible. Time how long each subject takes to complete the task.

Prediction: A minority of computer science students will markedly outperform everyone else.