26 February 2009

LaTeX equation labels

When writing a paper in LaTeX, you often want to put a numerical label on a displayed equation, say the number (1). So you write some code like
\begin{equation}\label{eq:basel-problem} \sum_{n=1}^\infty {1 \over n^2} = {\pi^2 \over 6} \end{equation}
which compiles to give something that looks like
\sum_{n=1}^\infty {1 \over n^2} = {\pi^2 \over 6} \quad \quad (1)

Then later I can insert code like (\ref{eq:basel-problem}) and (1) appears in my docuemnt.

Now, as you may have noticed, I picked an equation that had a nice name, and I labeled it with that name. (The "eq:" in the label, of course, stands for "equation", a convention that I use to tell what sort of entity I'm referencing -- other things I use in that position are def:, thm:, prop:, cor:, lem:, and the like.)

But what do you do when the displayed equation doesn't have a nice "name" -- it's just an equation that occurs somewhere in the course of a calculation? For a while I tried to come up with a name, but I ended up with way too many generic names like "integral" and "sum" and "thing-with-binomial-coefficients". (Okay, so I'm exaggerating on the last one.) These names took time to think of but didn't make things easier on me later. So now I find myself using labels like \label{eq:feb-24-kappa} for the 10th labelled equation that I inserted on February 24. (Why do I use Greek letters? I tried using numbers, but it's too easy to get those confused with the actual numbers that are used to label equations.) But I'm wondering what sort of conventions people use for this; since it's the sort of thing that you can only see when you're looking at other people's LaTeX source, it's hard to know.

Somewhere, somebody is saying that I'm using LaTeX incorrectly. It might be you!

(Yes, I'm taking a break from rewriting a paper. How did you guess?)

24 February 2009

Richard Stanley tells a joke

In the graduate course Richard Stanley is currently teaching, on symmetric functions (also known as "the chapter of Stanley that I haven't really read that carefully", which is indeed the text he's using), students have two options for an end-of-term paper. They can either hand in "a treatise of at least 200 pages on some area of symmetric functions, consisting primarily of original work" which "must contain (correct) proofs of at least two important, longstanding open problems" or an eight-page expository paper.

Somehow I think nobody will choose the first option. (Although if they do, that would be an instant PhD thesis.)

Possibly also of interest: Stanley is working on a second edition of Enumerative Combinatorics, Volume 1, and a draft version of Chapter 1 is available (198-page PDF) This appears to be a substantial extension of Chapter 1 of the original.

23 February 2009

Math and pancakes

In honor of Shrove Tuesday (tomorrow for me, although it's past midnight in the UK), have a meaningless formula that will tell you how to make the perfect pancake.

(It seems to me that these silly formulas usually come from the UK. Why?)

21 February 2009

The large sieve and its applications

You should vote at thebookseller.com for Emmanuel Kowalski's The Large Sieve and its Applications, which has been shortlisted for the "Diagram Prize for Oddest Book Title of the Year". (Apparently "large sieve" sounds like it has something to do with cooking, if you're not a mathematician.)

20 February 2009

Motion of zeroes of complex polynomials

Consider the polynomial f(z) = (z-1)(z-2)...(z-20). Clearly it has 20 roots; these are 1, 2, ..., 20.

Now consider the polynomial g(z) = -z20. It also has 20 roots, namely the origin with multiplicity 20.

And consider h(z) = t f(z) + (1-t) g(z), as t varies from 0 to 1. (Most of the "action" happens when t is very near 0 or 1, so this probably isn't the best parametrization.) Now, as t varies, you can find the roots numerically. Imagine the roots as twenty particles moving around in the plane. What happens, basically, is that as t increases roots start by sliding along the real axis, towards each other in pairs -- this is what you expect if you just plot f(z) as a real polynomial. (Interestingly, the collision appears to be perfectly elastic.) They then bang into each other and head off in the positive and negative imaginary directions. And eventually they curve around and approach the origin, on paths spaced 18 degrees apart. (I can try to produce graphics.)

There's nothing special about these polynomials -- that is, I suspect that something like this happens more generally. This is actually just an extension of an example in Peter Henrici's Applied and computational complex analysis (volume 1, p. 282) -- Henrici says that J. H. Wilkinson looked at the polynomial f(z) - 2-23z19 and saw that it had five pairs of complex conjugate zeroes.

But it seems like there should be some sort of general theory of the way that roots of families of polynomials "move around" in the plane. (And if there isn't, why not?) Does the situation I've described ring a bell for anybody?

Why do the Catalan numbers grow like they do?

So "everybody knows" that the nth Catalan number is given by $C_n = {1 \over n+1} {2n \choose n}$, and furthermore that they have the asymptotic form
C_n = {4^n \over \sqrt{\pi n^3}} \left( 1 - {9 \over 8n} + {145 \over 128n^2} + \cdots \right)

(Okay, I'll confess: I knew the first term, and I got Maple to calculate the others just now.)

So I found myself wondering -- why this n-3/2? Let Dn = 4-n Cn. Then
{D_n \over D_{n-1}} = {2n-1 \over 2n+2} \approx 1 - {3 \over 2n}
and so we get
D_n = \prod_{k=1}^n {D_k \over D_{k-1}} \approx \exp \left( \sum_{k=1}^n -{3 \over 2k} \right)
; furthermore that sum is about -(3/2) log n, for large n, and so Dn is about n-3/2. The replacement of 1-x with exp(-x) obviously would need to be justified (and such justification would explain the presence of the mysterious π) but I'm still amused that this simple computation got the exponent.

19 February 2009

The mathematician and the lumberjack

You remember the whole "mathematicians have the best job in America" survey from jobsrated.com (which was based on some fairly questionable criteria)? Well, apparently Sean Hurley at NPR did a story a couple weeks ago, where he talked to a mathematician (Peter Winkler, of Dartmouth) and a lumberjack. Peter Winkler likes his job. So does the lumberjack, although the pay sucks and trees occasionally fall on you, which sucks too.