Ada's Algorithm

Home > Other > Ada's Algorithm > Page 16
Ada's Algorithm Page 16

by James Essinger


  There are in all extensions of human power, or additions to human knowledge, various collateral influences, besides the main and primary object attained.

  To return to the executive faculties of this engine: the question must arise in every mind, are they really even able to follow analysis in its whole extent? No reply, entirely satisfactory to all minds, can be given to this query, excepting the actual existence of the engine, and actual experience of its practical results.

  It is important to emphasise that the technical side of Ada’s Notes is often very complex indeed; the fact that I quote in this chapter from the non-technical discursive passages ought not to obscure the fact of this complexity.

  In her work, Ada also addresses succinctly the question that had exercised Prime Minister Robert Peel, who may have wondered what all the fuss was about as both engines generated numbers (or what Ada calls ‘numerical notation’).

  Babbage’s new engine could do three things: process mathematical formula written in symbols, crunch numbers and calculate algebraical results in literal notation. Ada writes:

  It might develop three sets of results simultaneously, viz. symbolic results (as already alluded to in Notes A and B), numerical results (its chief and primary object); and algebraical results in literal notation.

  This latter however has not been deemed a necessary or desirable addition to its powers, partly because the necessary arrangements for effecting it would increase the complexity and extent of the mechanism to a degree that would not be commensurate with the advantages, where the main object of the invention is to translate into numerical language general formulæ of analysis already known to us, or whose laws of formation are known to us.

  Nonetheless, the production algebraical results in literal notation were only excluded from the new Engine for practical reasons. The machine was able to process all three types.

  But it would be a mistake to suppose that because its results are given in the notation of a more restricted science, its processes are therefore restricted to those of that science. The object of the engine is in fact to give the utmost practical efficiency to the resources of numerical interpretations of the higher science of analysis, while it uses the processes and combinations of this latter.

  While she states what machines like the engine may be capable of doing in the future subject to the advance of technology, she is quite clear on what the limitations of the current design are. It cannot assist directly with solving theoretical problems in mathematics. The new engine will only be able to manipulate formulas that are known to be true.

  Ada speculates that using the machine in practice will generate numerical data with regularities – such as the Bernoulli numbers or the number pi perhaps – that will create new theoretical questions.

  Ada’s Notes provide, overall, what is in my view absolutely conclusive evidence that she and Babbage saw the Analytical Engine very differently. Babbage had (curiously) little interest in the practical impact of his second engine. His restless energy circled mathematics and the practical technical questions that had escaped the great mathematicians Leibniz and Pascal. Ada, on the other hand, was profoundly interested in the practical applications of the Analytical Engine, just as she was profoundly interested in the practical applications of the Jacquard loom. Ada’s excitement that she might be able to help Babbage make the practical applications of the Analytical Engine come about was exactly what drove her enthusiasm to support Babbage in the first place.

  Yet this did not mean that she was easily seduced by grand speculative notions of what science could achieve for people. The Notes and the translation relate almost entirely to the functioning of the machine, not its potential. It was precisely the fact that, in her own assessment, the machine could indeed do exactly what Babbage said it could that made her so interested in it and willing to devote herself to Babbage.

  Ada was clear-sighted about the fact that good science is not about making claims but about formulating assertions that can be disproven. Building the machine would test the truth of what she had written.

  It took Ada to see what the Analytical Engine truly represented in the forward evolution of human technology. She realised that the Jacquard loom provided the first example in the history of human technology of the process of digitisation of daily life and not just mathematics, a process that the Analytical Engine was furthering. Ada understood that the Analytical Engine could be applied to any process involving the manipulation of information. She saw and wrote that it heralded the birth of a new science, the science of digitising information, one that went well beyond Babbage’s vision or the imagination of those around her.

  It was a science that tantalisingly might easily have been born in the middle of the nineteenth-century Britain rather than a hundred years later.

  In the final stanza of the third canto of Childe Harold’s Pilgrimage, Byron describes Ada as

  The child of love, though born in bitterness,

  And nurtured in convulsion.

  Ada’s character may have suffered from those convulsions in the same way that Babbage’s was affected by a life bathed in praise, but her mind had not. Where science was concerned it was as sharp as Ockham’s razor.

  This next passage, from near the end of Ada’s Notes, is brilliantly prescient and also surprisingly modern in tone:

  Thus the engine [the Analytical Engine] may be considered as a real manufactory of figures, which will lend its aid to those many useful sciences and arts that depend on numbers. Again, who can foresee the consequences of such an invention! In truth, how many precious observations remain practically barren for the progress of the sciences, because there are not powers sufficient for computing the results! And what discouragement does the perspective of a long and arid computation cast into the mind of a man of genius, who demands time exclusively for meditation, and who beholds it snatched from him by the material routine of operations!

  When we read this, the time between Ada’s time and our own seems to vanish. She was one of us. She was also, beyond doubt, a genius.

  And what about Ada’s algorithm?

  The word ‘algorithm’ is defined by the Oxford English Dictionary as ‘a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.’ The use of the word dates from the first decades of the nineteenth century, so we can assume it was a word that Ada and Babbage knew, though it does not appear in either her translation of Menabrea’s article or in her own notes.

  In effect, an algorithm is a computer program, and one of the most interesting questions of all that can be asked about Ada is whether she can reasonably and logically be described as the world’s first computer programmer.

  Babbage says in his autobiography that he offered to do part of the work on the Notes ‘to save Lady Lovelace the trouble.’

  This part of Ada’s Notes is ‘Note G’ dealing with the Bernoulli numbers (in his autobiography, Babbage misspells the name as ‘Bernouilli’). Bernoulli numbers themselves are a sequence of rational numbers that are extremely important in various areas of number theory.

  Note G is especially relevant to us today. It describes step by step, in detail, the ‘operations’ through which the punched cards would proceed to weave an even longer sequence of Bernoulli numbers on the Analytical Engine. Note G is highly complex, juggling mathematics and technology. Most important of all, it is in effect a program containing instructions for a computer, although it is important to emphasise two points here:

  1) Neither Ada nor Babbage ever used the word ‘computer’ in any of their writings (or, we can reasonably assume, in their conversations with each other or with other people), in the modern sense, i.e. according to the Oxford English Dictionary: ‘An electronic device which is capable of receiving information (data) in a particular form and of performing a sequence of operations in accordance with a predetermined but variable set of procedural instructions (program) to produce a result in the form or informat
ion or signals.

  2) Ada and Babbage did use the word ‘computer,’ but they used it to mean a clerk who carried out arithmetical and mathematical calculations. This meaning of the word ‘computer’ is of course obsolete today.

  Even though the Analytical Engine has not so far been built, and the effectiveness of the program cannot be tested until one is, Note G is considered by some to be the first computer program ever written. Whether we can call it a computer program depends, naturally, on what we mean by ‘computer program.’ Whether the Analytical Engine was strictly speaking a programmable computer in the modern sense is still by no means certain.

  The computer historian Martin Campbell-Kelly, one of the most knowledgeable people in the world about Babbage’s and Ada’s work, says this about the ‘computer program’ in Note G:

  What superficially look like programs in Lovelace’s Sketch are more like program ‘traces’: that is, they are not computer programs in the modern sense but instead they show how a program would have been executed.

  You can readily judge the matter for yourself.† If you go to Note G, then there is the material, which begins about a quarter of the way through with the paragraph that starts: ‘We will terminate these Notes by following up in detail the steps through which the Engine could compute the numbers of Bernouilli …’

  From that point until the end of Note G (which is the last note), there is a mathematically complex explanation of how the Analytical Engine would do this. The truth of the matter is that whether you think this explanation of Ada’s notes amounts to a computer program depends on how broad you are willing for your definition of a computer program to be. Many computer scientists, while praising Ada’s work, do not regard it as a computer program. My own view is that as it is a highly specialised kind of computer program designed solely for the Analytical Engine; it can’t be described as a computer program in the modern sense. All the same, it remains truly brilliant work, and I don’t doubt that if Ada did have access to a modern computer, she would quickly have learned how to write a computer program. If the explanation in Note G of how the AE would calculate the numbers of Bernoulli is a computer program, or something very close to a computer program, who wrote it?

  The question therefore arises: who can claim the credit of being the first computer programmer? In his memoir, Babbage writes that he had ‘offered to do [G] to save Lady Lovelace the trouble.’ But as we’ve seen, he concedes that she corrected the ‘grave mistake’ that he had made in the process, which suggests that Ada originated Note G after all.

  I think that while Babbage gave Ada some help with this vitally important section of Note G, the work was mostly her own. I simply don’t believe that Ada would have in effect let Babbage paste his work into hers.

  This fascinating section of Note G is, in effect, Ada’s algorithm.

  * For additional insights into this analysis of the nature of the mistake Babbage made, I am indebted to John Fuegi and Jo Francis and their excellent article in the IEEE Annals of the History of Computing 25:4 (November–December 2003).

  † Ada’s Notes are available online at www.​fourmilab.​ch/​babbage/​sketch.​html.

  15

  Ada’s Offer to Babbage

  Ada and Babbage met on several occasions during the spring and summer of 1843, a period during which they seem to have thought of each other as kindred spirits. Most of their surviving correspondence does indeed date from this period, and as I suggest above, perhaps Lady Byron felt morally obliged to keep the letters relating to her daughter’s great intellectual effort of that year.

  Certainly, Ada’s correspondence relating to Note G was saved from destruction. There are two letters on successive days that are particularly interesting. Ada wrote to Babbage on Tuesday, July 4, and Wednesday, July 5, 1843. She had been ill, and it is obvious that her hard work on Babbage’s behalf was making her feel better. She writes respectfully to her friend:

  Tuesday Morning, Ockham

  My Dear Babbage

  I now write to you expressly on three points; which I have very fully & leisurely considered during the last 18 hours; & think of sufficient importance to induce me to send a servant up so that you may have this letter by half after six this evening. The servant will leave Town tomorrow morning early, but will call for anything you may have for me, at eight o’clock in the morning before he goes.

  Firstly: the few lines I enclosed you last night about the connexion of (8) with the famous Integral, I by no means intend you to insert, unless you fully approve the doing so.

  It is perhaps very dubious whether there is any sufficient pertinence in noticing at all that (8) is an Integral …

  Secondly: Lord L – suggests my signing the translation & the Notes; by which he means, simply putting at the end of the former: ‘translated by A.A.L;’ & adding to each note the initials A.A.L.

  As if working on a medieval cathedral, Ada appears not to have even thought of putting her name to her Notes and the translation and it was only upon the prompting of Lord Lovelace – for the time being a mathematics widower – that she thought of putting this forward. However, it is also true that she wanted to disguise the fact that she, a woman, had written the translation and Notes, as she feared that if this became known it might have devalued the reception to her work.

  On the actual topic of the article she had no reserve and was nothing but forthright, describing Note G as a ‘mess,’ not the attribute of a successful computer program running by necessity from logical step. In the description ‘mess’ one recognises the fertile, gnomic, quixotic and dilettante mind of Babbage himself when attempting to convey his views to third parties such as Robert Peel, Mary Somerville or even his friend Lyell. As Ada writes:

  My third topic, tho’ my last, is our most anxious & important: –

  I have yesterday evening & this morning very amply analysed the question of the number of Variable-Cards, as mentioned in the final Note H (or G?). And I find that you & I between us have made a mess of it; (for which I can perfectly account, in a very natural manner). I enclose what I wish to insert instead of that which is now there. I think the present wrong passage is only about eight or ten lines, & is I believe on the second of the three great sheets which are to follow the Diagram …

  I can scarcely describe to you how very ill & harassed I felt yesterday. Pray excuse any abruptness or other unpleasantness of manner, if there were any.

  I am breathing well again today, & am much better in all respects; owing to Dr L’s remedies. He certainly does seem to understand the case, I mean the treatment of it, which is the main thing.

  As for the theory of it, he says truly that time & Providence alone can develop that. It is so anomalous an affair altogether. A Singular Function, in very deed!

  Think of my having to walk (or rather run) to the Station, in half an hour last evening; while I suppose you were feasting & flirting in luxury & ease at your dinner. It must be a very pleasant merry sort of thing to have a Fairy in one’s service, mind & limbs! – I envy you! – I, poor little Fairy, can only get dull heavy mortals, to wait on me! –

  Ever Yours

  A.L.

  The next day she corrects the order of cards further in no uncertain terms.

  Wednesday, 5 July, Ockham Park

  My Dear Babbage

  I am much obliged by the contents of your letter, in all respects. Should you find it expedient to substitute the amended passage about the Variable-Cards, there is also one other short sentence which must be altered similarly. This sentence precedes the passage I sent yesterday by perhaps half a page or more. It is where I explain that for every B after B5, operations (13 .… 23) have to be repeated; & I believe it runs as follows:

  ‘Not only are the Operation Cards precisely the same for the repetition, but the Variable Cards as well with the exception of one new one to introduce B5 instead of Bs for operation 21 to act upon.’

  I should wish to substitute what I enclose.

  Babbag
e’s response to her is not known and probably lost forever.

  But in the same letter she mentions an allusion by him to the ‘imaginary roots’ of their friendship in his response. Oblique as to what exactly the joke is, his words make her puzzle for their meaning and she settles on the word ‘Fairy’ to whom she had compared herself as his helper. It was a word with which she liked to describe herself to others around this time of her marriage. Flirtatiously she only half jokes to him that what she will do in the next ten years will be eternal rather than die with her, writing:

  Why does my friend prefer imaginary roots for our friendship? – Just because she happens to have some of that very imagination which you would deny her to possess; & therefore she enjoys a little play & scope for it now & then. Besides this, I deny the Fairyism to be entirely imaginary; (& it is to the fairy similes that I suppose you allude).

  That brain of mine is something more than merely mortal; as time will show; (if only my breathing & some other et-ceteras do not make too rapid a progress towards instead of from mortality). –

  Before ten years are over, the Devil’s in it if I have not sucked out some of the life-blood from the mysteries of this universe, in a way that no purely mortal lips or brains could do.

  No one knows what almost awful energy & power lie yet undevelopped [sic] in that wiry little system of mine. I say awful, because you may imagine that it might be under certain circumstances.

  Then it is business as usual and she instructs Babbage when she would like him to be available if she has any questions about the Bernoulli numbers she is ‘doggedly attacking and sifting to the very bottom.’ As Ada writes:

 

‹ Prev