SeriesMinds & Machines📰 ArticleAct I
A4Act I · The Dream

Ada Lovelace & The First Algorithm

On this page18 sections

“The Analytical Engine has no power of originating anything. It can only do what we know how to order it to perform.”

— Lady Lovelace, Note G, 1843

London, July 1843. A woman sits at a writing desk in her home on St. James’s Square, surrounded by papers covered in mathematical notation, cross-references, corrections, and marginal observations written in a hand that has grown increasingly hurried over the preceding weeks. The papers are the working drafts of a translation — a rendering into English of an Italian paper describing a remarkable machine — but the translation itself has long since been buried under an avalanche of additions that have taken on a life of their own.

The woman is Ada Lovelace, Countess of Lovelace, twenty-seven years old, mother of three, daughter of Byron, and the only person in the world who fully understands — perhaps more fully even than its inventor — what the Analytical Engine of Charles Babbage could become.


What We Think We Know — and What We Don’t

Ada Lovelace is one of the most celebrated figures in the history of computing. Her profile in this series has told the broad story of her life — her unusual education, her partnership with Babbage, her rediscovery after a century of neglect. Her image is on the British fifty-pound note. There is a programming language named after her. Ada Lovelace Day is celebrated annually.

Note

And yet the specifics of her actual contribution — what the Notes on the Analytical Engine actually said, what the algorithm in Note G actually did, and what was genuinely original about her thinking — are less widely understood than you might expect given her celebrity. The celebration has, in some ways, substituted for the engagement. She is a symbol before she is a mathematician.

This article is an attempt to remedy that. We are going to go into the mathematics — not at the level of a technical paper, but deeply enough to understand what Ada Lovelace actually did, why it was remarkable, and what it means for our understanding of computation, programming, and the nature of intelligence.

The journey requires us to understand four things: what the Analytical Engine was and how it worked; what the Bernoulli numbers are and why computing them was a worthy challenge; what Ada’s algorithm actually said, step by step; and what the broader philosophical ideas in the Notes meant — and still mean.

Let us begin at the beginning.


The Analytical Engine: A Computer Before Computers

To understand Ada Lovelace’s algorithm, you first need to understand the machine it was written for. And to understand the machine, you need to understand the problem it was designed to solve — and the gap between that problem and the far more extraordinary thing the machine turned out to be.

Charles Babbage
Born:
December 26, 1791, London, England
Died:
October 18, 1871, London, England
Nationality:
British
Role:
Mathematician, inventor, philosopher
Known for:
Conceiving the Analytical Engine — the first design for a general-purpose, programmable, mechanical computer; the Difference Engine; the 1990s Science Museum reconstruction proved his designs were correct all along

Charles Babbage spent his life in a state of productive fury at the errors in mathematical tables. In the early 19th century, mathematical tables — tables of logarithms, trigonometric functions, astronomical data — were the essential infrastructure of navigation, engineering, and science. A ship’s navigator used logarithm tables to calculate positions. An artillery officer used trigonometric tables to calculate trajectories. An insurance actuary used mortality tables to calculate premiums. The accuracy of these tables was, quite literally, a matter of life and death.

The tables were calculated by human computers — teams of men who worked through the calculations by hand, following prescribed methods, checking each other’s work. And they contained errors. Not because the computers were careless or unintelligent, but because calculation by hand, sustained over hours and days and weeks, inevitably produced mistakes.

Info

Babbage’s Difference Engine — his first great project — was designed to solve this problem. It was a mechanical calculator that could compute polynomial functions by the method of finite differences — a mathematical technique that allowed complex calculations to be broken down into sequences of simple additions. The key advantage was that the machine could perform not just individual calculations but entire sequences of them automatically, and could print the results directly — eliminating the transcription errors that were another major source of mistakes in published tables.

The Difference Engine was never completed, for reasons we have already discussed. But as Babbage wrestled with its construction through the 1820s and 1830s, his thinking evolved. He began to see that the Difference Engine’s limitation — it could only compute by finite differences, only perform the specific sequence of operations built into its mechanism — was not a necessary feature of a calculating machine but an arbitrary constraint. What if the operations to be performed were not fixed in the machine’s construction but could be changed — specified separately, as a kind of instruction to the machine?

This thought led Babbage to the Analytical Engine.

Definition

The Analytical Engine — Babbage’s design (c. 1837) for a general-purpose, programmable, mechanical computer. Four components:

  • The Store (memory) — a collection of columns of wheels, each capable of holding a number. Babbage planned for a thousand columns, each holding a fifty-digit number — a memory capacity that would not be exceeded by electronic computers for many decades.
  • The Mill (processor) — the mechanism where arithmetic operations were performed. Numbers were transferred from the Store to the Mill, the operation was executed, and the result was transferred back.
  • Operation Cards — specified which arithmetic operations to perform, in which order.
  • Variable Cards — specified which locations in the Store to use — which numbers to transfer to the Mill, where results go.

Together, the Operation Cards and Variable Cards constituted what we would today call a program. Changing the cards changed the program. The same hardware, different software. This is the fundamental architecture of every computer built since.

The Analytical Engine also incorporated something that the Difference Engine had not: the ability to branch. Based on the result of a comparison — is this number greater than that one? Is this value zero? — the machine could select different sequences of operation cards to execute.

Important

This conditional execution — doing different things depending on the state of a computation — is what distinguishes a true general-purpose computer from a fixed calculator. It is what makes it possible to write programs that respond to data, that make decisions, that repeat operations until a condition is met.

Babbage never built the Analytical Engine. The engineering challenges were immense, the funding inadequate, and Babbage’s own temperament — brilliant but restless, always moving to the next refinement before the current design was complete — made the sustained focus required for a project of this scale almost impossible for him to maintain. Attempts by his son Henry Babbage to build portions of it after his death were partial and unsatisfying.

First working Analytical Engine built
Date:
1991 (Difference Engine No. 2) / 2002 (partial Analytical Engine mill)
Location:
Science Museum, London
Significance:
Built from Babbage’s original plans using 19th-century machining tolerances — proved the designs were correct all along
Outcome:
The technology of the 1830s had not been up to it; the mathematics was sound. Babbage was right, and the world had been wrong to doubt him.

The Italian Paper and the Translation That Became Something Else

The chain of events that produced Ada Lovelace’s Notes began in 1840, when Babbage visited Turin and gave a series of lectures on the Analytical Engine to an audience that included several of Italy’s leading mathematicians and engineers.

Among the audience was Luigi Federico Menabrea, a young military engineer who would later become Prime Minister of Italy. Menabrea was impressed by Babbage’s lectures and wrote them up as a paper — “Notions sur la Machine Analytique de M. Charles Babbage” — published in a Swiss scientific journal in French in 1842.

Luigi Federico Menabrea
Born:
September 4, 1809, Chambéry, Savoy (then part of the Kingdom of Sardinia)
Died:
May 24, 1896, Rome, Italy
Nationality:
Italian
Role:
Military engineer, mathematician, politician
Known for:
Writing the 1842 paper on Babbage’s Analytical Engine that Ada Lovelace would translate and annotate; later Prime Minister of Italy (1867–1869)

The paper was a competent summary of what Babbage had presented, explaining the Analytical Engine’s basic architecture, the role of the operation and variable cards, and some illustrative examples of how it could be programmed to perform specific calculations. It was not, by any means, a complete or technically deep treatment. Menabrea was reporting what he had heard, not developing the ideas further.

In 1843, Charles Wheatstone — the physicist and inventor who had developed the electric telegraph — suggested to Ada Lovelace that she translate Menabrea’s paper into English. Ada was a natural choice: she was fluent in French, she had been corresponding with Babbage about the Analytical Engine for a decade, and she understood it more deeply than almost anyone outside Babbage’s immediate circle.

She undertook the translation. And somewhere in the process of rendering Menabrea’s French into English — a process that forced her to engage with every sentence, to understand what it was saying well enough to say it differently — she began to see the gaps. Things Menabrea had not explained. Implications he had not drawn out. Aspects of the Engine that he had not addressed, either because he did not fully understand them or because his paper was not intended to be comprehensive.

She decided to add notes. She wrote to Babbage explaining her plan, and he enthusiastically supported it — suggesting additional topics, providing technical information, reviewing her drafts.

The notes grew. By the time Ada was finished, they were nearly three times the length of Menabrea’s paper. There were seven of them, labeled A through G. Each addressed a different aspect of the Analytical Engine or its implications. Together, they constituted something quite different from an annotated translation. They were an original work.


Notes A Through F: The Foundations

Before we reach Note G — the algorithm — it is worth surveying the earlier notes, because they establish the conceptual foundation on which the algorithm rests and contain ideas that are important in their own right.

Note

Note A is essentially a defence of the Analytical Engine against the obvious comparison with the Difference Engine. Lovelace wants to make clear that the Analytical Engine is not just a better Difference Engine — not just a more powerful calculating machine of the same general kind. It is a categorically different kind of device. The Difference Engine could compute any function that could be expressed as a polynomial by finite differences — which was a significant class of functions, but a fixed and limited one. The Analytical Engine could, in principle, execute any computation that could be described as a sequence of operations.

This distinction — between a special-purpose device and a general-purpose programmable machine — is the distinction between a calculator and a computer. Ada identified it in 1843, decades before the concept became standard.

Note B discusses the mechanical arrangement of the Engine in more detail, explaining the Store and the Mill and how numbers moved between them. This note is more straightforwardly technical than the others — it is explaining the hardware, in modern terms — but it contains careful work clarifying points that Menabrea had left ambiguous.

Note C introduces one of the most important concepts in the Notes: the distinction between different kinds of operations, and the way the Engine handles operations that involve different numbers of steps. Lovelace discusses what happens when an operation produces a result that is larger than the Store location allocated for it — the equivalent of an overflow condition in modern computing.

Definition

Note D — the first computational loop. Note D discusses one of the most striking capabilities of the Analytical Engine: its ability to compute functions that require a different number of steps depending on the values of the inputs — what we would today call variable-length computation. Lovelace illustrates this with the example of computing the greatest common divisor of two numbers using Euclid’s algorithm, which requires a number of steps that depends on the specific numbers being processed.

The Analytical Engine could handle this through its branching capability: the machine could be programmed to repeat a sequence of operations until a condition — in this case, the condition that the remainder of a division is zero — was satisfied.

This is the concept of a loop — a sequence of operations that repeats, potentially a variable number of times, until a condition is met. Loops are fundamental to almost all non-trivial computation. A program without loops can only perform a fixed, predetermined sequence of operations. A program with loops can perform computations of unbounded complexity, scaling to the size of the problem. Ada’s Note D is the first clear description of a computational loop in history.

Quote

Note E addresses an objection that Lovelace anticipates from skeptical readers: is the Analytical Engine really doing anything new, or is it just carrying out calculations that a human could perform, only faster? Her answer is subtle and important.

The Engine is not doing anything that a human could not do in principle — it is following explicit rules, and a sufficiently patient human following the same rules would produce the same results. But the Engine can follow rules at a speed and with a consistency and freedom from error that no human can match. And — this is the key point — the Engine can be directed to perform computations of such complexity and length that, in practice, no human ever could.

She draws an analogy to the telescope. The telescope does not give humans capabilities they could not have had in principle — they could always have looked at distant objects with their unaided eyes. But the telescope reveals things that, in practice, the unaided eye could never see. The Analytical Engine is a telescope for mathematics: not expanding what is possible in principle, but revealing what is possible in practice.

Important

Note F — computation as general symbolic manipulation. Note F is the most philosophically ambitious of the pre-G notes. It addresses the question of what kinds of objects the Engine could operate on. Menabrea had described the Engine as an arithmetic machine — a machine for performing arithmetic operations on numbers. Lovelace pushes further.

The Engine, she argues, operates on symbols according to rules. The symbols happen to be numbers — but they need not be. Any objects that can be represented as symbols, and whose relationships can be expressed as formal rules, could in principle be the domain of operations for an Engine of this kind.

She explicitly suggests musical notes and chords as an example: if the relationships between musical sounds could be expressed formally — if the rules of harmony and counterpoint could be stated as explicit rules governing the relationships between symbols — then the Engine could be used to compose music.

This is one of the most extraordinary passages in the Notes. Ada is proposing, in 1843, that a computing machine could be a general-purpose symbol manipulator — that its operations were not inherently tied to arithmetic but could be applied to any domain that could be formalised. This is the concept that underlies all of modern computing. Every application that runs on a computer — every image editor, every word processor, every game, every AI system — is an instance of this idea: formal operations on symbolic representations of something other than numbers.

The modern computer does not compute. It manipulates symbols. Ada Lovelace understood this in 1843.


The Bernoulli Numbers: What Note G Was Actually Trying to Compute

Now we arrive at Note G — the algorithm. To understand it, we first need to understand what it was computing: the Bernoulli numbers.

Definition

Bernoulli numbers — A sequence of rational numbers — fractions — first studied by the Swiss mathematician Jakob Bernoulli in the late 17th century (and independently by the Japanese mathematician Seki Takakazu around the same time). They appear throughout mathematics with an almost eerie persistence:

  • In the formulae for the sums of powers of integers (the sum of the first n squares, the sum of the first n cubes, etc.)
  • As coefficients in the Taylor series expansion of many important functions
  • In the Riemann zeta function, one of the most studied objects in mathematics
  • In formulae for the values of the zeta function at even integers
  • In various results in number theory, including results about prime numbers

The sequence begins: 1, −1/2, 1/6, 0, −1/30, 0, 1/42, 0, −1/30, 0, 5/66…

After the first two terms, all the odd-indexed Bernoulli numbers (except the first) are zero — a fact that is itself a deep and non-obvious result. The even-indexed Bernoulli numbers alternate in sign and grow in magnitude, but in a complex way that requires the actual computation to determine.

Computing Bernoulli numbers by hand is tedious and error-prone. The standard method, deriving from Bernoulli’s original work, requires solving a system of equations in which each Bernoulli number is expressed in terms of all the previous ones. To compute the eighth Bernoulli number, you need the first seven. To compute the tenth, you need the first nine. The calculation grows more laborious with each successive term.

Tip

This made the Bernoulli numbers a perfect target for the Analytical Engine. They were mathematically important — a computing machine that could calculate them reliably would be genuinely useful to mathematicians. They required exactly the kind of iterative, rule-governed computation that the Engine was designed for. And they were complex enough that a correct algorithm would be a genuine intellectual achievement, demonstrating the Engine’s capabilities in a demanding and non-trivial domain.

The recurrence relation that defines the Bernoulli numbers — the formula expressing each one in terms of its predecessors — can be written in several equivalent ways. The form that Ada used in her algorithm was based on a formula that expressed each Bernoulli number as a sum involving all the preceding ones, weighted by binomial coefficients. The formula is:

Info

Bₙ = −(1/(n+1)) × Σ (from k=0 to n−1) [ C(n+1, k) × Bₖ ]

where the sum runs over all previously computed Bernoulli numbers and the binomial coefficients C(n+1, k) are the combinatorial numbers familiar from Pascal’s triangle.

This formula has a specific structure that is important for understanding Ada’s algorithm: to compute Bₙ, you need all of B₀, B₁, …, Bₙ₋₁. This means the computation has a natural sequential structure — you compute the Bernoulli numbers in order, using the ones you have already computed to produce the next one. The algorithm needs to manage this accumulation of results, keeping track of which ones have been computed and making them available for subsequent calculations.


Note G: The Algorithm, Step by Step

Ada Lovelace’s Note G presents the algorithm for computing Bernoulli numbers in the form of a table — a “diagram of the development of the operations,” as she calls it. This table is the algorithm. Understanding it requires understanding how she is representing computation.

Info

The table has several columns:

  • The first specifies the operation to be performed at each step — which arithmetic operation, acting on which variables.
  • The second specifies the variables in the Store that are affected — which locations are being read, which are being written.
  • The third tracks the current values of the relevant Store locations after each operation.
  • Additional columns track auxiliary information needed to understand the flow of the computation.

This tabular format is not arbitrary. It is a natural way to represent computation on the Analytical Engine, where the essential information at each step is: what operation is the Mill performing, and on which Store locations? The table makes it possible to follow the computation step by step, verifying that each operation is correct and that the accumulated results in the Store at each point are what they should be.

The algorithm proceeds in several phases.

Phase 1: Initialisation

The algorithm begins by loading the initial values needed for the computation into specific Store locations. These include the value of n — the index of the Bernoulli number to be computed — and the values of the previously computed Bernoulli numbers that will be needed.

Note

Ada’s algorithm, as she presents it, computes B₇ — the seventh Bernoulli number — as a specific illustrative example, while being written in a sufficiently general form that it could in principle be adapted for any Bernoulli number.

Phase 2: Computing the binomial coefficients

For each term in the sum, the algorithm needs the appropriate binomial coefficient — the combinatorial number C(n+1, k). Rather than looking these up from a table, the algorithm computes them on the fly using the recurrence relation that connects consecutive binomial coefficients: C(n+1, k) = C(n+1, k−1) × (n+1−k) / k.

Tip

This is a key decision in the algorithm’s design — computing the coefficients as needed rather than storing a pre-computed table means the algorithm’s memory requirements are small and fixed, regardless of which Bernoulli number is being computed.

Phase 3: The main loop

The heart of the algorithm is a loop that iterates over the terms of the sum, accumulating the result.

Deep Dive

The main loop of Note G — the first iterative algorithm

At each iteration, the loop:

  1. Computes the current binomial coefficient — using the recurrence relation
  2. Multiplies it by the appropriate previously computed Bernoulli number
  3. Adds the product to the running total
  4. Updates the loop index
  5. Checks whether all terms have been processed, and if not, returns to step 1

This loop structure — compute, accumulate, update, check, repeat — is the fundamental pattern of iterative computation. It is the same pattern used in virtually every numerical algorithm ever written. Ada’s Note G is the first time this pattern was written out as an explicit, machine-executable sequence of operations.

Phase 4: Computing the final result

Once the loop has processed all the terms in the sum, the algorithm computes the final result from the accumulated total, applying the factor of −1/(n+1) that appears in the formula.

Info

The complete algorithm requires approximately twenty-five distinct operations — read a value from the Store, perform an arithmetic operation in the Mill, write the result back to the Store — executed in a specific sequence with a loop that repeats a fixed number of times. Modern programmers would recognise it immediately as a straightforward iterative algorithm. In 1843, it was unprecedented.


What Made the Algorithm Remarkable

It is easy, reading Ada’s algorithm from the perspective of modern computing, to underestimate how remarkable it was. We live in a world saturated with algorithms. They are everywhere, running on every device, performing computations of unimaginable complexity billions of times per second. The concept of an algorithm — a precise, step-by-step procedure for solving a problem, written in a form that can be mechanically executed — is so familiar that it barely seems like a concept at all.

Important

In 1843, it was not familiar at all. It was new.

There had been algorithms before Ada Lovelace, of course. Euclid’s algorithm for computing greatest common divisors is more than two thousand years old. The long division algorithm taught in schools has been around for centuries. But these were algorithms in the informal sense — descriptions, in words or symbols, of mathematical procedures intended to guide a human calculator.

Pitfall

Ada’s algorithm was different in a crucial way: it was written for a machine. Not for a human who happened to be following mechanical steps, but for an actual mechanism that had no judgment, no background knowledge, no ability to interpret ambiguous instructions. Every step had to be completely explicit. Every variable had to be precisely specified. Every operation had to be unambiguous. The algorithm left no room for the kind of implicit understanding that human-directed procedures could rely on.

This requirement for complete explicitness was new. Writing an algorithm for a machine forces a precision that writing an algorithm for a human does not require. You cannot say “proceed as before” and expect the machine to know what you mean. You cannot say “compute the appropriate coefficient” without specifying exactly how. Every reference to a value must specify exactly which Store location contains it. Every operation must specify exactly which Mill function is to be applied.

This is the discipline of programming. And Ada Lovelace was the first person to exercise it.

The algorithm also demonstrated, for the first time, the power of the loop structure — the ability to repeat a sequence of operations a variable number of times, depending on the data. This is not a trivial capability. An algorithm without loops can only perform a fixed number of operations, predetermined at the time of writing. An algorithm with loops can perform computations of any length, scaling to the complexity of the input.

Example

The Bernoulli number algorithm’s main loop repeats n−1 times for the nth Bernoulli number — which means the same algorithm, without modification, can compute any Bernoulli number in the sequence, regardless of its index.

This generality — the ability to write a single algorithm that handles an entire class of problems rather than just one specific instance — is a hallmark of good programming. It is also, conceptually, a profound step. The algorithm is not just a recipe for computing B₇. It is a general procedure for computing any Bernoulli number. The specific computation is an instance of the general procedure. The general procedure is what Ada wrote.


The Dispute Over Credit

No account of Ada Lovelace’s algorithm can avoid the question of credit — specifically, the question of how much of the algorithm was Ada’s and how much was Babbage’s.

Warning

The controversy has generated significant heat, partly because it touches on issues of gender and historical attribution that people care about strongly, and partly because the evidence is genuinely ambiguous in places.

The case for Babbage’s substantial contribution rests primarily on a passage in his autobiography, Passages from the Life of a Philosopher (1864), in which he writes that he provided Ada with “the indication of the method” for computing Bernoulli numbers, and that she “worked the details.” Some historians have interpreted this as meaning that Babbage supplied the key idea and Ada merely carried it out.

The case for Ada’s primary authorship rests on the surviving correspondence, which tells a more complex story. The letters show Ada working through the algorithm independently, identifying errors, correcting them, and challenging Babbage’s suggestions. In one crucial letter, Ada points out an error in Babbage’s version of the algorithm — an error in the arrangement of the operations that would have produced an incorrect result — and presents her corrected version. She does not defer to Babbage on the technical details. She argues with him, and she is often right.

Quote

The historian Doron Swade, who oversaw the construction of the working Difference Engine at the Science Museum, has examined the evidence carefully and concluded that the balance of the correspondence supports Ada’s primary authorship of the algorithm as it appears in Note G. Babbage may have suggested the Bernoulli numbers as a suitable example. But the algorithm — the specific sequence of operations, the management of Store locations, the loop structure, the arrangement of steps — is Ada’s work.

What seems most accurate, and most intellectually honest, is to describe the algorithm as Ada’s while acknowledging that it was produced in close collaboration with Babbage and that the boundary between Ada’s contributions and Babbage’s contributions cannot always be precisely drawn from the surviving evidence. This is, in fact, how most collaborative intellectual work operates — through a dialogue in which ideas are proposed, challenged, refined, and eventually owned by the work itself rather than cleanly divisible between the contributors.

What is not in dispute is that the Notes as published — the translation, the seven annotations, the algorithm in Note G — were presented under Ada’s initials and represented her intellectual work. She was not a transcriptionist for Babbage. She was an independent thinker who used her collaboration with Babbage as raw material for her own analysis and synthesis.


Lady Lovelace’s Objection: The Argument Against Herself

Among all the ideas in the Notes, none has been more debated than a passage in Note G in which Ada appears to argue against the very significance of what she is demonstrating.

Quote

“The Analytical Engine has no power of originating anything. It can only do what we know how to order it to perform.” — Ada Lovelace, Note G, 1843

This statement seems, at first reading, to undercut the significance of the algorithm she has just written. If the Engine can only do what it is told to do — if it has no capacity for genuine origination — then isn’t it, at bottom, just a sophisticated tool? A very fast, very accurate calculator, but not anything that could be described as intelligent or creative?

Definition

Lady Lovelace’s Objection (named by Alan Turing in his 1950 paper “Computing Machinery and Intelligence”) — The argument that a machine can only do what it is programmed to do, and therefore can never genuinely create, originate, or surprise. Turing listed it as one of the standard objections to the possibility of machine intelligence. He responded that the objection confuses the program with the behavior: a machine’s behavior can exceed what its programmer explicitly anticipated, and the question of whether this counts as “origination” is itself philosophically loaded. The debate continues today, reframed around whether LLMs originate text or merely recombine training data.

This reading of the passage has been influential. Turing used it in his 1950 paper as a formulation of the principal objection to machine intelligence — the objection that machines are fundamentally limited by their programming, that they cannot transcend their instructions, and that this limitation puts genuine intelligence permanently beyond their reach.

But the passage deserves more careful reading than this standard interpretation allows.

Important

Ada was making a specific, precise point about the Analytical Engine as she understood it in 1843. She was not making a general claim about all possible computing machines, or about the limits of computation in principle. She was saying that this machine — the one Babbage had designed, with its fixed set of arithmetic operations and its instruction-following architecture — could only do what it was explicitly instructed to do.

This was true. The Analytical Engine had no learning mechanism. It had no way to modify its own programs based on experience. Every computation it performed was the direct result of the instructions loaded into it. Ada’s statement was an accurate description of the limitations of the specific machine she was discussing.

What she could not have known — because the technology and the theory had not yet been developed — was whether future machines, built on different principles, might be capable of something that would meaningfully be called origination. Machines that learned. Machines that modified their own behaviour based on experience. Machines that developed internal representations not specified by their designers.

Example

Turing’s 1950 response to Lady Lovelace’s Objection was essentially: we do not know whether the objection applies to all possible machines, and there are specific kinds of machines — learning machines — that might genuinely surprise their creators in ways that challenge the objection. The question was not whether the Analytical Engine could originate anything. The question was whether a different kind of machine, built on different principles, might.

The deep irony is that Ada herself, elsewhere in the Notes, anticipated something like this possibility. Her discussion in Note F of the Engine operating on musical notes — of computing as general symbolic manipulation rather than arithmetic — was gesturing toward a conception of computation that went beyond what the Analytical Engine could do. She was imagining, even as she accurately described the Engine’s limitations, a broader conception of what computation might become.

She was arguing against herself — and both sides of the argument were right, in different ways.


The Algorithm as Art

There is something that the technical account of Note G — the operations, the Store locations, the loop structure — necessarily leaves out: the quality of the work as a piece of thinking.

Important

Ada Lovelace’s algorithm is not just correct. It is elegant. The decisions she made in designing it — to compute binomial coefficients on the fly rather than storing a table, to use a running accumulator for the sum rather than accumulating intermediate results in separate Store locations, to structure the loop so that the termination condition was checked efficiently — are the decisions of someone who understood not just what the algorithm needed to do but how to do it well.

Elegance in algorithms is not a merely aesthetic quality. An elegant algorithm is usually also an efficient one — it uses fewer operations, requires less memory, completes in less time. The elegance reflects a deep understanding of the structure of the problem being solved, an understanding that finds the natural grain of the computation and follows it.

Ada’s algorithm has this quality. It is not the simplest possible algorithm for computing Bernoulli numbers — you could write one that was more straightforward in some ways but would require more Store locations or more operations. Her version finds a path through the computation that is both correct and efficient, that manages the Engine’s resources thoughtfully, that handles the variable repetition of the loop cleanly.

Quote

This quality — correctness plus efficiency plus clarity — is what distinguishes a good program from a merely functional one. It is what every programmer is trying to achieve. And Ada Lovelace achieved it, for the first time in the history of the discipline, for a machine that had not been built and would not be built for a hundred and fifty years.


What Ada Got Wrong — and Why It Doesn’t Matter

In the spirit of intellectual honesty that Ada Lovelace herself exemplified, it is worth acknowledging that the algorithm in Note G contains an error.

Warning

Specifically, there is a mistake in the way Ada handles one of the variables in the computation — a sign error in one of the intermediate steps that would, if the algorithm were executed literally, produce an incorrect result. The error was identified by the computer scientist and historian Allan Bromley in a 1990 paper, and has been confirmed by subsequent analysis.

Various explanations for the error have been proposed. Some historians believe it was a typographical error — a mistake in the transcription of the algorithm from working notes to the published version, rather than an error in Ada’s understanding of the computation. Others believe it was a genuine oversight in the algorithm’s design. The surviving correspondence does not definitively settle the question.

What is clear is that the error was in a specific implementation detail, not in the overall structure or approach of the algorithm. The fundamental ideas — the loop structure, the management of Store locations, the computation of binomial coefficients on the fly, the accumulation of the running sum — are all correct. The algorithm as a whole represents a valid approach to computing Bernoulli numbers on the Analytical Engine. The error is in one step of the execution, not in the conceptual architecture.

Example

For context: errors in algorithms are extraordinarily common, even among the most expert programmers working with modern tools, extensive testing infrastructure, and the benefit of decades of accumulated knowledge about how to write correct code. Ada was writing an algorithm for a machine that did not exist, for a type of programming that had no precedent, without any ability to test the algorithm by running it. That there is one error in twenty-five steps is not a condemnation of her work. It is a testament to how much she got right.


The Hundred-Year Gap: Why the Notes Were Lost

Ada Lovelace’s Notes published
Date:
August 1843
Location:
London, England (published in Taylor’s Scientific Memoirs)
Significance:
The first published computer program — Note G’s algorithm for computing Bernoulli numbers on Babbage’s Analytical Engine
Outcome:
Largely ignored for over a century; rediscovered in 1953 by Bertram Bowden and recognized as foundational documents of computing

Ada Lovelace published her Notes in 1843. For the next hundred years, they had almost no influence on the development of computing.

Important

This is one of the more poignant facts in the history of technology. The most important ideas in the Notes — the distinction between special-purpose and general-purpose computation, the concept of a loop, the vision of computing as general symbolic manipulation, the first computer program — were all rediscovered independently by the engineers and mathematicians who built the first electronic computers in the 1940s. They did not build on Ada’s work because they did not know about it.

The reasons for this obscurity are multiple. The Notes were published in an obscure scientific journal. They were attached to a translation of a paper about a machine that was never built — a machine that became, increasingly, an eccentric historical footnote rather than a live engineering project. Babbage died in 1871, his great project unrealised, and interest in the Analytical Engine faded with him.

Ada herself died in 1852, at thirty-six, before she could write the larger work on the foundations of mathematics and computation that she had mentioned to Babbage as a future ambition. Had she lived another twenty years, she might have produced work that could not be ignored — work that would have kept her ideas alive and in circulation.

As it was, the Notes survived in libraries, available to anyone who looked for them but sought by almost nobody. The handful of historians who knew about them treated them as curiosities — impressive but disconnected from the mainstream of mathematical and scientific progress. The idea that they were foundational documents in the history of computing could not have occurred to anyone before computing existed.

Ada’s Notes rediscovered
Date:
1953
Location:
United Kingdom
Significance:
Bertram Bowden included the Notes in his anthology on computing, bringing Ada Lovelace’s work back into circulation a century after publication
Outcome:
The timing was perfect — the first electronic computers had been built, the field of programming was just beginning to develop its identity and history. The Notes were finally read as what they were: foundational documents of a new discipline.
Quote

The hundred-year gap teaches a lesson that is relevant beyond the specific case of Ada Lovelace. Ideas can be ahead of their time in a literal sense: they can be correct, important, and completely without influence, because the context that would make them recognisable as important does not yet exist. The significance of an idea is not inherent in the idea itself. It depends on the surrounding world — on what problems people are trying to solve, what technologies exist, what questions are being asked.

Ada’s ideas were correct in 1843. They became important in 1953. The ideas did not change. The world did.


The Living Legacy: From the Notes to Modern AI

The direct line from Ada Lovelace’s Notes to modern AI runs through several generations of computing technology, each building on the one before.

Info
Generation What Ada’s Note G anticipated
Stored-program computers (Manchester Baby, EDVAC, UNIVAC, late 1940s) The logical architecture Babbage designed and Ada programmed, implemented in electronic form
Programming languages (assembly → FORTRAN → LISP → C → Python) Progressive elaboration of the discipline of programming Ada pioneered in 1843
The analysis of algorithms (correctness, efficiency, complexity) The concept of an algorithm as a precise, executable procedure — what Note G demonstrated for the first time
Symbolic AI (Logic Theorist, 1955) Ada’s vision of computation as general symbolic manipulation (Note F)
Modern language models Operating on symbolic representations of language — the conceptual foundation Ada identified in 1843

The stored-program computers of the late 1940s — the Manchester Baby, EDVAC, UNIVAC — implemented, in electronic form, the logical architecture that Babbage had designed and Ada had programmed. The concept of a program stored in memory alongside the data it operated on was the enabling innovation. Without stored programs, computers were fixed calculators. With them, they became general-purpose machines that could run any algorithm their programmers could write.

The development of programming languages — from assembly language to FORTRAN to LISP to C to Python — was a progressive elaboration of the ideas that Ada had introduced in the Notes. Each new language made it easier to express complex algorithms clearly, to manage data structures, to organise the flow of execution. The discipline of programming that Ada pioneered became a mature engineering practice, then a creative medium, then the infrastructure of civilisation.

The concept of the algorithm — the precise, executable procedure for solving a problem — that Ada’s Note G demonstrated for the first time became the central concept of computer science.

And the broader vision of Note F — computation as general symbolic manipulation, applicable to any domain that could be formalised — became the foundation of AI. When Newell and Simon wrote the Logic Theorist in 1955, they were implementing Ada’s vision: a machine that operated on symbols representing logical propositions, manipulating them according to formal rules to produce new symbolic results. When modern language models process text, they are operating on symbolic representations of language, transforming them according to learned statistical rules to produce new symbolic outputs. The specific mechanisms are unrecognisably different from anything Ada imagined. The conceptual foundation is the one she identified.

Important

Ada did not build modern AI. She wrote twenty-five steps of a computation for a machine that was never built. But she saw, with extraordinary clarity, what that machine meant — what it implied about the nature of computation, the scope of what computing machines could do, and the conceptual shift required to think about them properly.

She saw that computation was not arithmetic. She saw that it was not limited to numbers. She saw that it could operate on any domain that could be formalised. She saw that programs were general — that the same program could handle an entire class of problems, not just a single instance. She saw that loops were essential — that the power of computation lay in the ability to repeat operations, scaling to the complexity of the problem.

Quote

She saw all of this in 1843, for a machine that would not be built for a century and a half, writing in the margins of a translation of a paper by an Italian engineer who had attended a lecture by a mathematician whose great project would never be completed.

That is what genius looks like. Not the convenient genius of comfortable circumstances and receptive audiences, but the inconvenient genius of a mind so far ahead of its time that the world it is addressing does not yet exist.


Further Reading

Further Reading
  • Ada Lovelace’s Notes themselves — Available in full online, including Note G with the Bernoulli number algorithm. Read the original. It is difficult in places but remarkable throughout.
  • “Ada’s Algorithm” by James Essinger — The most accessible account of the Notes and their mathematical content, written for readers without a technical background.
  • “Ada Lovelace: The Making of a Computer Scientist” by Christopher Hollings, Ursula Martin, and Adrian Rice — A scholarly treatment of Ada’s mathematical education and the development of her ideas, drawing on unpublished archival material.
  • “The Annotated Turing” by Charles Petzold — Petzold’s treatment of Turing’s 1936 paper provides essential context for understanding what made Ada’s insights foundational, by showing what the next great leap in the theory of computation looked like.
  • “Lovelace & Babbage” by Sydney Padua — The graphic novel treatment, which includes extensive meticulously researched footnotes on the actual mathematics of the Analytical Engine. Surprising and delightful.

Part 5: Alan Turing — The Man Who Imagined Everything

A thematic synthesis of Turing’s entire intellectual journey — the Turing Machine, Bletchley Park, the 1950 paper, morphogenesis — and why one mind laid the foundations of an entire civilisation’s technology.


Comments

Reply on Bluesky → (opens in a new tab)