Ada Lovelace
Transcription
Ada Lovelace
A Brief introduction to Bernoulli Numbers n 1 n 1 n(n 1) 1 2 1 1 r 2 2 n 2 n n n(n 1)(2n 1) 1 3 1 2 1 2 n n n 1 r 6 3 2 6 n n 3 r 1 What about n4 and n5? Can you generalise? Ada Lovelace The enchantress of numbers Warm up 01101000 01000101 01001100 01001100 0110111/ 01001101 01111001 / 01001110 01000001 01101101 01000101 / 01001001 01110011/ 01000001 01000100 01000001 Write your name in binary Ascii Ada Lovelace Augusta Ada King-Noel, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage's Analytical Engine. Her notes on the engine include what is recognised as the first algorithm intended to be carried out by a machine. As a result, she is often regarded as the first computer programmer Source :Wikipedia Childhood • Ada Lovelace, born Augusta Ada Byron, was the only legitimate child of the famous poet Lord George Gordon Noel Byron. • Lord Byron's marriage to Ada's mother, Lady Anne Isabella Milbanke Byron, wasn’t a happy one. Claire Claremont Lady Oxford Lady Caroline Lamb Augusta Byron Teresa Guiccioli Childhood • Lady Byron left her husband when their daughter was eight weeks old. • A few months later, Lord Byron left England, and Ada never saw her father again. He died in Greece when Ada was 8 years old. Childe Harold's Pilgrimage Is thy face like thy mother's, my fair child! ADA! sole daughter of my house and heart? When last I saw thy young blue eyes they smiled, And then we parted, -- not as now we part, But with a hope. -- Awaking with a start, The waters heave around me; and on high The winds lift up their voices: I depart, Whither I know not; but the hour's gone by, When Albion's lessening shores could grieve or glad mine eye. Childhood • Isabella was determined to prevent her daughter from developing poetic tendencies and focussed her education on mathematics • Ada turned out to have an aptitude for maths Ada aged 5 years Childhood • Ada had an unusual upbringing for an aristocratic girl in the mid-1800s. • Ada’s daily timetable when she was 8 years old 10am Music 11.15 French 11.30 Arithmetic 1.30 Work 3.15 Music 4.30 French exercise Ada aged 5 years Flyology From a young age Ada was often ill Even during periods of convalescence Ada never stopped learning and developing her mathematical skills. In June 1829 she contracted measles and was paralysed, only regaining the ability to walk with crutches in 1831. It may have been due to this long period of reduced mobility that a 12-yearold Ada thus decided that she wanted to fly. “Since last night I have been thinking more about flying. I can find no difficulty in the motion or the dimensions of the wings…” “as soon as I have got flying to perfection I have a scheme about a steamengine which, if I ever effect it, will be more wonderful then either steampacket or steamcarriages” Ada writing to her mother in 1828 Growing up • Ada had several tutors and when she was 17 she tried unsuccessfully to elope with one of them. • Her most notable mentor was the scientist, mathematician and social reformer Mary Somerville whose book On the Connexion of the Physical Sciences was published in 1834. • At age eighteen Ada was presented in court and made a positive impression, being able to dance well and having a ‘dainty’ appearance. • In July 1835 aged 21 she married William King (8th Baron King) gaining the title baroness King. • They had three children Byron, Annabella and Ralph and spent their time between their three homes, one in Ockham, Surrey, one in London and one in Loch Torridon. • In 1838 her husband was created Earl of Lovelace and she became The Right Honourable Countess of Lovelace. Charles Babbage • Ada first met Charles Babbage shortly after her coming out party in 1833 when she went with her mother to see what she called his “thinking machine” a portion of his difference engine on display in his drawing room. • An onlooker reported of the event “While other visitors gazed on the workings of this beautiful instrument with the sort of expression, I dare say the sort feeling, that some savages are said to have shown on first seeing a looking glass or hearing a gun, Miss Byron, young as she was, understood its working, and saw the great beauty of the invention.” Charles Babbage (the Brian Cox of his day) • Born December 26, 1791 in London, the son of a banker • Went to Cambridge University in 1810 • After graduation was hired by the Royal Institution to lecture on calculus. • Within two years he had been elected a member of the Royal Society • Was Lucasian Professor of Mathematics at Cambridge. From 1828 to 1839, Charles Babbage • In 1819 Babbage visited France, and learned about the large-scale government project to make logarithm and trigonometry tables. • Mathematical tables were of considerable military and commercial significance in those days, being used across science, engineering and finance, as well as in areas like navigation. “I wish to God these tables had been made by steam!” The Difference Engine • In the 1820s he developed his 'Difference Engine', a machine which could perform mathematical calculations. • A six-wheeled model was built and demonstrated to audiences in his London home • He then developed plans for a bigger, better, machine - Difference Engine 2. The Difference Engine • In 1822 (when Ada was 7) the government began funding Babbage to produce the difference engine. • They funded him for almost nineteen years but he never produced a finished machine • The government, who were interested in receiving accurate tables and not an ever improving device eventually pulled the plug in 1840. • Babbage had moved onto the complex Analytical Engine, a revolutionary device intended to be able to perform any arithmetical calculation using punched cards • It would follow the instructions on the punch card, as well as having a memory unit to store numbers • Neither the Analytical Engine nor Difference Engine 2 were built in B his lifetime but in 1991, a functioning Difference Engine was constructed from Babbage's original plans Interlude: Joseph-Marie Jacquard • Invented a mechanical loom in 1801that simplifies the process of manufacturing textiles with such complex patterns. • The loom was controlled by a chain of cards of punched cards, laced together into a continuous sequence. • Multiple rows of holes were punched on each card, with one complete card corresponding to one row of the design. Portrait of Jacquard woven in silk on a Jacquard loom It required 24,000 punched cards to create and was only produced to order. Charles Babbage owned one of these portraits; it inspired him in using perforated cards in his analytical engine. In her youth Ada was fascinated by Jacquard looms Back to Ada • Within a few months of the birth of her third child in 1839, Ada decided to get more serious about mathematics again. • She had stayed in touch with Babbage, they communicated often by letter and with visits • She turned to Babbage when she wanted to find a “mathematical Instructor” • He suggested his friend Augustus de Morgan, first professor of mathematics at University College London and noted logician. What de Morgan said about Ada “Had any young beginner, about to go to Cambridge, shown the same power, I would have prophesied first that his aptitude at grasping the string points and real difficulties of first principles would have very much lowered his chance of being senior wrangler, secondly that they would have certainly made him and original mathematical investigator, perhaps of first rate eminence” The first computer programme • In 1840 Babbage spoke about his Analytical Engine at a conference in Turin in 1840 • Luigi Menabrea, professor of mechanics and construction at the military academy at the university of Turin (and later Prime Minister of Italy) attended his talk • In 1842 he published a paper “Sketch of the Analytical Engine Invented by Charles Babbage, Esq.” The first computer programme • To illustrate the machines capabilities, Menabrea presented tables of the steps the machine would go though in performing calculations and finding numerical solutions to algebraic equations. • These steps were designed as instructions that the engine’s operator would punch in coded form on cards to be fed into the machine. The first computer programme • Menabrea realised that the Analytical Engine was a major step up from the Difference Engine; it was designed from the start to be programmable. • the device had two main parts; – the store, (equivalent to memory) which could hold 1000 numbers each with 40 decimal places, making a total memory of just over 16k – The mill was the mechanical central processing unit. The first computer programme • In 1842 Ada was asked to translate the paper into English by Charles Wheatstone • Babbage asked her to add something of her own, her notes ended up being three times longer than the original article. • The notes contain instructions on how to calculate the Bernoulli Bernoulli numbers. Interlude Bernoulli numbers • Jacob Bernoulli (1655 -1705) was one of the famous Bernoulli family whose members featured many notable mathematicians and scientists. • in 1683 Bernoulli was studying a question about compound interest which required him to find the value of lim 1 1 n e n n So he is now credited with having discovered e 2 2 n ( n 1) 3 r 1 4 n 2 n ( n 1)(2 n 1)(3 n 3n 1) 4 1 r 30 n 2 2 2 n (2 n 2 n 1)( n 1) 5 r 1 12 n n 1 n 1 n 1 2 1 1 r 2 n 2 n n 1 3 1 2 2 2 1 r 3 n 2 n 12 n n 1 4 1 3 3 2 3 1 r 3 n 2 n 12 n n 1 5 1 4 4 3 1 4 2 1 r 5 n 2 n 12 n 0n 30 n n 1 6 1 5 5 4 1 2 5 3 1 r 6 n 2 n 12 n 0n 12 n B0 1 1 B1 2 1 B2 6 B3 0 1 B4 30 B5 0 1 B6 42 B7 0 1 B8 30 Generalise n r 1 n r 1 p p 1 1 p p p 1 p 1 n n n 0n p 2 ... p 1 2 12 Bp B0 n p 1 B3 B1 p B2 p 1 p 2 n pn p ( p 1)n ... n 0! p 1 1! 2! 3! 1! p n Bk p! p 1 k r n 1 0 k ! ( p 1 k )! p Where Bk are the Bernoulli numbers Bernoulli numbers • Bk is the coefficient of expansion of x xk k! in the Taylor series e 1 x 2 4 2n x x x x x 1 B1 B2 .... B2 n x e 1 2 2 4! (2n)! x x xk 1 x e 1 2 k 2 k ! Bernoulli numbers • The exponential function is 2 3 x x e x 1 x .... 2! 3! x ex 1 substituting this into the denominator of gives a strategy for calculating the numbers n recursively: n 1 Bi 0, n 1 i 1 i So the machine could compute the sequence as long as it could store all the previous numbers. Bernoulli numbers • The generating function is the exponential function • They can also be defined by a contour integral • Ramanujan wrote about them in his first paper for the Indian Mathematical Society • The Bernoulli numbers also appear in the Taylor series expansions of tan and tanh, in the Euler–Maclaurin formula, and in expressions for certain values of the Riemann zeta function. For a better explanation • Have a look at https://www.youtube.com/watch?v=yGpkB2Oo Qjk Back to Ada • In her notes on Ada points out that both the Jacquard loom, and the Analytical Engine had the ability to automatically back up the card sequence and thereby repeat a series of instructions in what would now be called a "loop“ The first programme • The Notes included the first ever published description of a step by step sequence of operations for solving mathematical problems • Since programming languages had not been invented, Lovelace had to express this in terms of the way the Jacquard loom worked. “The Analytical engine weaves algebraic patterns just as the Jacquard loom weaves flowers and leaves” The first programme • In note G she explains the repetition: cards 112 are processed once (we would call this initialisation), cards 13-23 are repeated a number of times depending on which Bernoulli number is desired (this is the loop) and cards 24-25 are processed once at the end. (though the calculation of B1 is a special case and does not involve cards 8-12.) Back to Ada • As Ada said in a letter to Babbage while she was working on debugging her computation of Bernoulli numbers: • “My Dear Babbage, I have worked incessantly, & most successfully, all day. You will admire the Table & Diagram extremely. They have been made out with extreme care, & all the indices most minutely & scrupulously attended to.” • Then she added that “Lord L (her husband) is at this moment kindly inking it all over for me. I had to do it in pencil…” The first programme • In her notes on Menbrea’s paper, Ada also described how codes could be created for the device to handle letters and symbols along with numbers. • She speculated that the Engine 'might act upon other things besides number... the Engine might compose elaborate and scientific pieces of music of any degree of complexity or extent'. The first programme • She was also well aware of the limitations of the machine “The Analytical engine has no pretentions whatever to originate anything. 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 first programme • Her work was published in 1843, in an English science journal. Ada used only the initials "A.A.L.," for Augusta Ada Lovelace, in the publication. • Ada's article attracted little attention when she was alive. What Ada did next • She continued to communicate with Babbage about mathematics • She wrote the notes for a paper on using scientific method to improve agricultural production published by husband • In her later years, she tried to develop mathematical schemes for winning at gambling. Unfortunately, her schemes failed and she became heavily in debt. What Ada did next • In the 1840 she was very unwell with, what they later discovered was uterine cancer. • She was prescribed Laudnum and morphine which made it hard for her to concentrate. • Due to the effects that the drugs had on her system, she also became interested in mesmerism and impact of chemicals on the mind Death • Ada died from uterine cancer in London on November 27, 1852. • She was buried next to her father in at the Church of St. Mary Magdalene in Hucknall This Daguerreotype is a photograph of a small portrait of Ada Lovelace, frail and thin, painted by Henry Wyndham Phillips in the last months of her life, when she was in great pain from uterine cancer. Legacy • She resurfaces and comes to prominence in the 20th Century when Alan Turing referred to her in several contexts including a radio broadcast “Let us reconsider Lady Lovelace’s dictat ‘It can do whatever we know how to order it to perform’ …” Legacy • The collaboration with Babbage was close and biographers debate the extent and originality of Ada's contribution. • Whatever you think, Ada had the brain to see the potential of computers over a century before one was even built. • Her foresight was so extraordinary that it would take another hundred years and Alan Turing to recognise the significance of her work. Legacy • ADA, named in Ada Lovelace's honour, is a computer programming language originally designed for the U.S. Department of Defense for real-time embedded systems. • The aim was to find one high-level language to be used for all DoD software, replacing the hundreds of languages then in use. • ADA is the most commonly used language in U.S. weapons systems Why the Ascii? • Ascii is short for American Standard Code for Information Interchange • It is a character encoding standard • Ascii codes are used to represent text in computers, telecommunications equipment, and other devices. Just as Ada predicted Ada Lovelace 1815 - 1852 references • Ada’s Algorithm: James Essinger • The Thrilling Adventures of Lovelace and Babbage: Sydney Padua • Childe Harold's Pilgrimage: Lord Byron • Calculating Ada: Channel 4 • Oxford University: http://people.maths.ox.ac.uk/kar/AdaLovelace.html https://blogs.bodleian.ox.ac.uk/adalovelace/2015/10/14/onlyknown-photographs-of-ada-lovelace-in-bodleian-display/ • Finding Ada: http://findingada.com/ • The Scientific Life of Ada Lovelace - Professor Ursula Martin • And Wikipedia (of course) About MEI • Registered charity committed to improving mathematics education • Independent UK curriculum development body • We offer continuing professional development courses, provide specialist tuition for students and work with industry to enhance mathematical skills in the workplace • We also pioneer the development of innovative teaching and learning resources