icon

Analysing Ada, continued

Marianne Freiberger Share this page

Click here for the first part of this article.

Programs and visions

The famous first computer program wasn't a program as we'd recognise it today. Its purpose was to compute the Bernoulli numbers: a sequence of infinitely many numbers that are important in maths. You can calculate each Bernoulli number from the ones that came before it. It was Lovelace's own idea to use those numbers to demonstrate the engine's power. And dealing with them wasn't easy. "I am in much dismay at having got into so amazing a quagmire and botheration with these Numbers, that I cannot possibly get the thing done today [...]. I am now going out on horseback. Tant mieux," she wrote to Babbage.

Diagram

A diagram explaining the Bernoulli program. Click here to see a larger version.

The note she eventually completed (you can see it here) describes how then engine would compute the Bernoulli number B7, from the previous Bernoulli numbers B1, B3 and B5. The idea was that the reader of Lovelace's note would be able to gauge from this, and her more general mathematical remarks, how the engine would go about computing any of the other Bernoulli numbers using the same principle. Essentially, the note showed how the task can be broken into instructions a machine would be able obey and perform: it was the outline, the "trace", of a program. Not quite a full algorithm but, as the curator and historian Doron Swade put it at the Oxford symposium, something that has "algorithmic intention".

Close scrutiny shows that this scheme for computing the Bernoulli numbers would have worked (at least on a modern computer). It contained a couple of bugs, but then Lovelace and Babbage weren't able to test it on a functioning engine, and as any computer programmer knows, the chances of producing a bug-free program at the first attempt are minuscule.

A question people have been debating is to what extent this Bernoulli program was Lovelace's own work. It seems that Babbage did help Lovelace with the maths. "I suggested several [possible examples], but the selection was entirely her own," he wrote. "So also was the algebraic working out of the different problems, except, indeed, that relating to the numbers of Bernoulli, which I had offered to do to save Lady Lovelace the trouble. This she sent back to me for an amendment, having detected a grave mistake which I had made in the process." But doing the underlying maths is only part of the problem of producing a program and it doesn't seem entirely clear to what extent Lovelace did the program part herself. At any rate, according to Swade, Lovelace's note doesn't contain any ideas that don't find precedence in Babbage's work. But this doesn't mean Lovelace's input was negligible. Her contribution lies with her overarching vision of the machine's power.

Lovelace noticed that "the analytical engine is an embodying of the science of operations, constructed with peculiar reference to abstract number as the subject of those operations". But why, she asked, should numbers be the be all and end all? "[The analytical engine] might act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations [...]," she wrote. "Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent."

Analytical engine

Model of part of the analytical engine at the Science Museum in London. Image: Wikimedia Commons.

With this, she recognised the universality of the machine and foresaw the power of modern computers to be more than mere calculators and also bring us music, movies, pictures and more. It's a universality that Babbage himself didn't recognise, thinking of his engine as a purely mathematical tool to the end of his life.

Lovelace also noticed something we all take for granted today, but which at the time must have appeared new: that the mechanical aspect of the machine, the wheels and cogs and cams, have nothing to do with the programming of it. We all experience this every day: many of us are adept at getting our computer to do all manner of things, for example, calculating sums using spreadsheets, but few of us know much about the actual physical workings of the machine. "[The two] are indissolubly connected, though so different in their intrinsic nature, that perhaps the same mind might not be likely to prove equally profound or successful in both." Lovelace realised that a good engineer doesn't necessarily make a good programmer, and vice versa, and that the two are essentially different jobs.

Lovelace also thought about the true nature of the engine, guarding against the temptation of elevating it to a thinking machine. "The analytical engine has no pretensions whatever to originate anything," she wrote. "It can do whatever we know how to order it to perform. It can follow analysis; but it has no power of anticipating any analytical relations or truths." The famous computing pioneer Alan Turing picked up this idea around a century later, calling it "Lady Lovelace's objection". It's the possibility of artificial intelligence Lovelace objected against (with reference to the analytical engine) — and seeing how difficult artificial intelligence is proving to master, her objection still holds some truth even for modern computers.

Maths and kaleidoscopes

Lovelace

Another famous portrait of Ada Lovelace, aged around 19.

It seems that in these notes Lovelace's vision overshadows her mathematical prowess. The latter has recently been assessed further, by historian of mathematics Christopher Hollings, who had a good look at Lovelace's correspondence with one of her tutors, Augustus De Morgan. In it Hollings observed an able, though at times impatient Lovelace, who struggled with algebra and gaps in her knowledge, but displayed determination, attention to detail, and some grasp of how research mathematics progresses. The correspondence shows, so Hollings, that Lovelace was neither stupid, nor a mathematical genius, but somewhere in between.

The analytical engine wasn't Lovelace's only interest, far from it. She loved animals, especially horses, and developed an interest in animal intelligence. She was fascinated by the construction of railways and bridges, the electrical telegraph, daguerreotype, steam boats, electrical induction and Faraday's early field experiments. Notably, she planned to produce a mathematical model, a calculus, of the nervous system. It's a brilliant idea, modern neuroscientists are indeed busy trying to describe the brain using maths, but completely infeasible. The human brain is far too complex do be described by a simple model, but that's a fact she couldn't have been aware of.

Sadly, Lovelace died early, at the age of 36, from cancer. It's hard to know what she would have gone on to do, or what she would make of today's computerised world. It's even harder to know what her legacy (if any) would have been had she been a man. Judging by the Oxford symposium, Lovelace may not have been a mathematical genius excelling at algebraic manipulation, but she certainly wasn't "stupid". It's Lovelace's remarkable vision and imagination her modern-day fame deservedly rests on. Besides rigorous academic talks the symposium also saw Sydney Padua presenting her graphic novel and composer Emily Howard talking about Ada Sketches, part of a Lovelace trilogy. With such a broad legacy, and eclectic personal interests, it's fitting that the last object Lovelace bought before her death was, apparently, a kaleidoscope.


About the author

Marianne Freiberger is Editor of Plus.