Archive for December, 2011

The acceleration of history

Tuesday, December 20th, 2011

Four hundred years ago, the idea that the Earth goes around the Sun rather than vice versa was not just a scientific breakthrough but also a cultural bombshell. People were asked to reimagine the world they were living in. Not everyone welcomed the opportunity. Books were burned. In the case of Giordano Bruno, an author was burned.

In the modern world, cosmological revolutions seem to cause hardly a ripple in public consciousness. Inflation, dark matter, dark energy—these ideas also call for a reimagining of the world we live in, but they have provoked very little fuss outside the community of science. It’s certainly a relief that no one will be burned at the stake over matters of cosmological doctrine. But are we really more liberal and open-minded, or just not paying attention?

Those are the final paragraphs of my new column in American Scientist. Here I want to say a few words more about the reception of these new ideas in cosmology, but first I should explain that the column is really about something else, namely the Bolshoi computer simulation of the large-scale structure of the universe, led by Joel Primack of UC Santa Cruz and Anatoly Klypin of New Mexico State University.

While preparing to write the column, I picked up Marcia Bartusiak’s recent book The Day We Found the Universe, which tells the story of the discovery that the “nebulae” we see in the sky are actually distant galaxies much like our own—what Kant called “island universes.” It’s a grand story, and Bartusiak gives a splendid account of it, with engaging portraits of the dozen or so principal players. Highly recommended.

I’m not going to retell the whole story here, but I want to point out that it took 175 years for the idea of island universes to be accepted by astronomers. The earliest known proposal was by Thomas Wright in 1750; Bartusiak’s story culminates on January 1, 1925, when Edwin Hubble’s paper “Cepheids in Spiral Nubulae” was read to a joint session of the American Astronomical Society and the American Association for the Advancement of Science. In between, there was a great deal of backing and forthing. For example, William Herschel, the preeminent observational astronomer of the 18th century, initially supported the island-universe theory, but later he changed his mind. As late as 1900 many astronomers believed the nebulae were relatively small, nearby objects—perhaps protostars about to condense. It took new instruments and a barrelfull of observational evidence to overturn this view. (Specifically: telescopes that could resolve individual stars in distant galaxies, better spectroscopes, better photographic film, the understanding of redshifts, the discovery of a relation between period and luminosity in the stars called Cepheid variables.)

I find it wholly unsurprising that people might need a century or two to digest such a major shift in how we view the universe around us. What’s remarkable is that lately the pace of change has accelerated, and nobody seems to be having much trouble keeping up.

Consider what’s happened in cosmology in the 80-some years since Hubble’s revelation. There was the battle between the steady-state and the big-bang models, which can be traced back to the 1920s and 30s and that was finally resolved in the 1960s with the discovery of the cosmic background radiation. Then there’s “dark matter.” Fritz Zwicky pointed out in the 1930s that the dynamics of galaxies imply there’s a lot more mass out there than we’re seeing, and this discrepancy became more troubling with later observations. By the 1980s or 90s most astronomers had accepted the remarkable conclusion that we don’t know what the universe is made of; all of the familiar “baryonic” matter of stars and planets is a minority constituent; the bulk of the mass is some unidentified stuff that Primack dubbed cold dark matter.

Even weirder (if that’s possible) is the notion of cosmic inflation: In a period of 10–36 second, the universe expanded by a factor of 1078. The inflationary hypothesis was first put forward in 1980, was tweaked a bit later in that decade, and was soon swallowed whole by the cosmological community (with the exception of a very few skeptics).

Finally comes “dark energy,” the force that’s causing the cosmic expansion to accelerate. It’s well known that this concept goes back to the early years of general relativity, with Einstein’s cosmological constant Λ. But Einstein soon disavowed the idea, and it remained moribund until about 15 years ago, when two groups of astronomers found direct observational evidence that the expansion is indeed accelerating. The resurrection of Λ was so quick and total that this year’s Nobel prize in physics was awarded for this work.

I find it astonishing and disquieting to live in a universe that’s so very different from the one I was born into. We already had external galaxies in my childhood, and Fred Hoyle and George Gamow were sparring over the big-bang/steady-state issue. But I grew up with no inkling of dark matter, dark energy or cosmic inflation. Now it turns out that most of the universe disappeared over the event horizon in the inflationary era, a fraction of a second after it all began, and long before any of us had a chance to see what we were missing. Of what’s left, less than 1 percent is the kind of matter we know and love—and nobody has a very good idea what the rest of all that stuff might be.

Given the contentious history of earlier innovations in cosmology—starting, of course, with the post-Copernican civil war—I would have expected more controversy over these ideas. But the whole rapid-fire series of head-spinning revolutions seems to have been accepted rather placidly, both within astronomy and by the wider scientific community. Why so little resistance? Is the evidence so compelling as to overwhelm all opposition? Or, on the contrary, have we become so complacently accepting of what experts tell us to believe that we’ve lost all independent judgment.

In a telephone conversation I asked Primack how he would explain the lack of controversy. He broadened the scope of the question, pointing out that when you consider the public at large, rather than the scientific community, the issue is not uncritical acceptance but rather ignorance and indifference. A population that doubts Darwinian evolution and anthropogenic climate change is not too easily convinced by evidence or cowed by authority. If no one has risen up to denounce the teaching of dark matter and dark energy in the public schools, it’s simply because they are unaware of those ideas. I think Primack is right about this, but I don’t understand why questions about the basic nature of the universe—which once excited such passion—could now lie beneath the notice even of the most benighted citizens.

(By the way, the headline on this post is borrowed from my former boss, Gerard Piel, who published a book under that title. Now that Gerry is gone, I can confess that I never read the book, but I always liked the title.)

Chebfun

Tuesday, December 13th, 2011

I went to a magic show the other day. Nick Trefethen was giving a demo of Chebfun, a Matlab extension package he is building in collaboration with his Oxford students and colleagues. In the course of the talk, several mathematical rabbits were pulled out of numerical hats.

The key idea in Chebfun is to represent any function of a real variable by a polynomial approximation.

  >> f = chebfun('sin(x) + sin(x.^2)', [0 10]);
  >> plot(f)

graph of chebfun f

That wiggly line looks like a graph of y = sin(x) + sin(x2), but that’s an illusion. What is being plotted here is a certain polynomial of degree 118 that happens to approximate sin(x) + sin(x2) with high precision.

As I understand it, the chebfun construction algorithm works something like this. First you select N+1 points in the interval where the function is defined, and construct the unique polynomial of degree N that passes through all the points. If the error of this approximation is below a threshold, you’ve found your chebfun. Otherwise, choose a larger sample of points and try again.

The sample points are not evenly spaced across the interval. They are Chebyshev points, whose distribution varies as a cosine function, denser at the extremes and sparser in the middle. In this case, the process converged with 119 Chebyshev points:

the function f along with the 120 sample points that determine the polynomial

In one respect the example above is an easy one: The function is quite smooth. Here’s something more challenging:

  >> hat = 1-abs(x-5)/5;
  >> h = max(f, hat);
  >> plot(h)

the rabbit-in-the-hat function

This is where we pull the rabbit out of the hat—or at least several pairs of rabbit ears. To deal with the discontinuities sharp corners in this curve, the Chebfun system assembles 25 polynomial segments, each defined on a different interval. Some are linear, some of higher degree. But the entire structure is still treated as a single function, which can be operated on by other functions. For example, sum(h) calculates the integral over [0, 10], returning the result 8.598303617326401. And here’s the square root of those rabbit ears:

Square root of rabbit ears

These are neat tricks, but why would one want to work with polynomial approximations to a function, rather than with the function itself? I’m too new to all this to answer that question with confidence, so I’ll quote the Chebfun Guide:

The aim of Chebfun is to “feel symbolic but run at the speed of numerics”. More precisely our vision is to achieve for functions what floating-point arithmetic achieves for numbers: rapid computation in which each successive operation is carried out exactly apart from a rounding error that is very small in relative terms.

For those who want to know more, I offer a few pointers:

The first published paper on Chebfun:

Battles, Zachary, and Lloyd N. Trefethen. 2004. An extension of MATLAB to continuous functions and operators. SIAM Journal on Scientific Computing 25:1743–1770. (PDF)

Trefethen’s argument favoring floating-point arithmetic over symbolic computation or exact rational arithmetic:

Trefethen, Lloyd N. 2007. Computing numerically with functions instead of numbers. Mathematics in Computer Science 1:9–19. (PDF)

A provocative account of why polynomial approximation is not as wonky as you may think:

Trefethen, Lloyd N. 2011. Six myths of polynomial interpolation and quadrature. Mathematics Today. (PDF)

Finally, Trefethen has a forthcoming book on Chebfun and related matters (which I have only just begun to read):

Trefethen, Lloyd N. To appear. Approximation Theory and Approximation Practice. (PDF)

Chebfun runs inside Matlab, the numerical computing environment from Mathworks. Chebfun itself has recently become open-source software (under a BSD license), but Matlab is proprietary. As far as I can tell, Chebfun does not not (yet?) run under Octave, the open-source alternative to Matlab.

How Did the Stars Get Their Points?

Thursday, December 8th, 2011

a field of bright stars and dust clouds in the Large Magellanic Cloud, photographed by the Hubble Space Telescope, courtesy Wikipedia

Those are hot young stars in the Large Magellanic Cloud—one of the puppy-dog galaxies that follow the Milky Way around—photographed by the Hubble Space Telescope. (Detail cropped from a Wikipedia image.) Note that four rays seem to emanate from each of the brightest stars. The rays are not, of course, true beams of light radiating in the four cardinal directions. They are an artifact of the telescope’s structure: a diffraction pattern created by the four vanes of the “spider” that supports the secondary mirror within the barrel of the telescope. Many other telescopes have three-vane spiders that yield a six-pointed diffraction pattern.

Stars, engraving by M. C. Escher, from WikipediaRecently, in my lovable know-it-all manner, I was holding forth on the idea that this diffraction effect—a mere accident of instrumental design—might actually be the source of the familiar iconographic star, with its five or six angular points. In other words, we think of a star as something spiky, poking out in various directions, because we’re used to seeing telescopic images with this diffractive defect. At right is M. C. Escher’s interpretation of what stellar means. For other examples see the Hollywood Walk of Fame or the flags of the U.S. and the E.U. and those of more than 50 other countries, not to mention Texas.

Well, it turns out my cute idea about the cultural influence of telescopic photos is utterly bogus. If you need any evidence, the engraving reproduced below should suffice. It shows the muse Astronomia (a.k.a. Urania) pointing out the moon and stars to Ptolemy. The stars are five- or six-pointed scribbles that beg to be called asterisks. The engraving appears in the Margarita Philosophica of Gregor Reisch, published in 1504, which is a full century before Galileo turned his telescope to the heavens. Whatever those engraved stars are, they are not artifacts of telescope spider vanes.

Ptolemy and Astronomia with stars and moon from Margarita Philosophica 1504

The dictionary offers further evidence. For example, the starfish (genus Asterias, class Asteroidea) has had that name at least since 1538. And the asterisk—the typographical mark—has a citation in the OED going all the way back to 1382. These terms make sense only if the concept of a star was already associated in most people’s minds with a spiky polygon, rather than a dimensionless point of light in the night sky.

And that’s what puzzles me, because the stars really do appear to be dimensionless points of light. When I stare at the sky, I see some twinkling going on, but nowhere do I see pentagrams and hexagrams pinned to black velvet, or even the slightest hint of angularity. So where did this tradition get started? Did the Greek word ?????? already convey a sense of symmetrical spikiness, so that ancient Athenians would have understood why we call certain flowers asters? Is the same iconography prevalent in other cultures, say in China? Those 50+ star-studded flags (including China’s) suggest that the conventional stellar icon is at least recognized globally, but they don’t tell us where and when it all began. After my telescopic theory fell apart, I had a second hypothesis, namely that the star icon might come from the symbol-happy world of astrology, but I’ve found no support for this idea either. So I throw the question out to the starry void: How did the star get its points?

Addendum 2011-12-16: The illuminating comments below on ancient Egyptian paintings of stars would appear to settle part of my question: Well over 2,000 years ago, at least some people were already drawing stars in much the same way a modern kindergartner does. What I’d still like to know is why. Yes, there are many plausible just-so stories, but you’d think that someone at the time might have offered a word of explanation.

The other day I spent a pleasant afternoon leafing through The History and Practice of Ancient Astronomy, by James Evans (New York: Oxford University Press, 1998). It’s quite a thorough introduction to Greek and Egyptian ideas about the sky, but I did not find an answer to my question about the points of stars. The astronomers of that period were engrossed in charting the positions and motions of the stars, but one gets the impression they had no interest whatever in the nature of those bright objects—what they look like up close, what they’re made of, why they shine. Of course I don’t really believe the ancients were so lacking curiosity. Surely Aristotle holds forth somewhere on the substance of the stars? But I haven’t found it yet.

TNT Is Not TeX

Monday, December 5th, 2011

Knuth TeX specimen 1980 450px

The curious document above was produced sometime in the spring of 1980 by Don Knuth to show off the typographical prowess of his new programs, TeX and Metafont. The software was then being introduced to the mathematical community through the publication of TeX and Metafont: New Directions in Typesetting, and I was writing a news item about it for Scientific American. At the time it seemed like a quaint, quirky and quixotic project, worth a column of type in the magazine even if nothing came of it in the long run. I would not have guessed that 30 years later TeX would be the foundation of a huge software superstructure—and would still be a part of my own professional life.

TeX is not the oldest software still in widespread use, but it may be the most stable. In the core of the system—the typesetting engine—very little has changed since 1990. And there will be even fewer revisions going forward. The current version of TeX is 3.1415926. Knuth has decreed that on his death the version number should be set equal to π and no further changes should ever be made. “From that moment on, all ‘bugs’ will be permanent ‘features.’”

I think—though this is subject to interpretation—that what Knuth wants to protect from all future meddling is not the text of the program itself, or even the underlying algorithms and data structures, but rather its operational specification. His intent in freezing TeX is to ensure that the same input should always yield the same output. Specifically, any software that calls itself TeX is supposed to pass his TRIP test suite.

I am of two minds about this policy. Mind One agrees with Knuth’s declaration: “Let us regard these systems as fixed points, which should give the same results 100 years from now that they produce today.” It’s comforting to think that all the TeX documents I’ve written over the years will still be readable a century hence. But Mind Two reminds me that in practice I have trouble maintaining TeX documents even for a few months, much less decades or centuries. What about those presentations done with the foils class that stopped working after an upgrade and that I’ve never bothered to fix? Or the articles using the pstricks package that won’t compile under pdflatex? TeX itself may be a fixed point in the software universe, but everything else spins dizzily around it.

The skeptical Mind Two has another argument as well: Under Knuth’s edict it’s not just the TeX markup language that can’t change; it’s also the architecture of the system. Knuth created his flawless soufflés and dæmon diarrhœa at an ASCII terminal wired to a PDP-10, and the only way he could see the product of his labors was to walk down the hall and retrieve hard copy from the AlphaType machine. We are no longer accustomed to such barbarities. TeX has been hauled halfway into the world of modern computing. Front-end software such as TeXShop provides a pleasanter interface. But the core programs still run in batch mode, as they did in the Dark Ages. To make even the smallest change in a document, you still need to throw away all the existing output and run a whole file (or set of files) through the compiler tool chain. Sometimes you have to do it twice. Or four times. Isn’t this ridiculous in a world of event-driven, interactive, multithreaded software? Will we still have to press the Typeset button in 2111?

Mind One replies: Of course not. By then we’ll just throw Moore’s Law at it: Automatically rerun TeX n times for every keystroke in the editor.

At this point Mind Three pipes up. (Did I mention that I’m of three minds?) The problem here, she says, is not that we can’t or shouldn’t alter TeX. It’s the utterly depressing notion that we’re incapable of building anything better, and that TeX will still be the typesetter to beat after another century. Surely, if we just stand tippytoe on the shoulders of Don Knuth, we can see a little farther. Who was the architect who said that every great building should have a bomb in the basement, set to blow itself up after 50 years and thereby clear the land for something greater still? Let’s make a new improved TeX. We’ll call it TNT.

Minds One and Two pounce in unison: You think we haven’t thought of that? What about ε-TeX? NTS? ExTeX? What about LuaTeX…?

•     •     •

This trinitarian meditation was inspired by a blog post I stumbled upon last week, in which an entity named Valletta Ventures, publisher of TeXPad for the Macintosh, attempts to port TeX (and also LaTeX) to the iPad; in this venture, Valletta Ventures eventually concedes defeat. The failure could be blamed on the scrutineers at the Apple App Store, who insist that every iPad program must be bundled up in a single executable. (My current TeX /bin directory has 342 entries.) But even if we were to let Apple off the hook here, the project still seems truly quaint, quirky and quixotic. Mind One says you shouldn’t expect to run a system as large and complex as TeX on a puffed-up cellphone. But Mind Two says: Why not? The iPad probably has more computational oomph than Knuth’s 1980 PDP-10.

In the end my sympathies lie with Mind Three, who sees the barrier to putting TeX on the iPad not as a lost opportunity but as a thin, bright glimmer of hope on the horizon. Maybe this protected market—the walled garden of Cupertino—will induce some young genius to create the next great mathematical writing system, an iPad app so good it will induce envy in all of us poor TeX users.

Looking at the issue more broadly, I think we often value stability and reliability a little too highly, and innovation too lowly. The world of computer science is overpopulated by walking fossils—not just TeX but also Unix, the Intel 86 architecture, TCP/IP. Quoting myself:

What has everybody been doing for the past 35 years? Can it be true that technologies conceived in the era of time-sharing, teletypes and nine-track tape are the very best that computer science has to offer in the 21st century?

As a remedy for this situation, the bomb in the basement may be a bit extreme. But I wonder if we shouldn’t try something like a reverse patent, where the whole world gets free use of an invention for the first 17 years, but then there’s an escalating schedule of royalties or taxes for those who fail to come up with a brighter idea.

•     •     •

One final question. When Knuth counts LAZY FOXES in his typographic specimen, where does he get the peculiar number 854.9176302? I would have thought 85491.76320.