The First Algorithm Writer: Ada Lovelace

You won't believe what the first algorithm in history was used for
Ada Lovelace wrote the first algorithm for calculating Bernoulli numbers, which are related to the probability of winning a lottery. Too bad she didn’t use her skills to make some money.


How Fast Can the Fastest Ship Go
Why is This Necklace Worth $200M
Meet Z1 The World's First Computer!

For those in a hurry

  • Ada Lovelace was an English mathematician and writer who lived in the 19th century.
  • She is famous for her work on the Analytical Engine, a mechanical computer designed by Charles Babbage.
  • She wrote the first algorithm for calculating Bernoulli numbers, which are related to the probability of winning a lottery.
  • She also recognized that the Analytical Engine could do more than just arithmetic, and envisioned its potential for music, art, and science.
  • She is considered the first computer programmer and a pioneer of computing.

Who was Ada Lovelace?

Ada Lovelace was born on December 10, 1815, in London, England. Her full name was Augusta Ada Byron, and she was the only legitimate child of the famous poet Lord Byron and his wife Lady Byron. Her parents separated soon after her birth, and her father left the country. Ada never met him, but she inherited his love of poetry and imagination.

Ada was raised by her mother, who was a mathematician and a strict disciplinarian. She wanted to prevent Ada from becoming like her father, who was considered mad and immoral. She encouraged Ada to study mathematics and logic, and hired tutors to teach her. Ada showed a great talent and interest in these subjects, as well as in music and languages.

How did she meet Charles Babbage?

When Ada was 17 years old, she met Charles Babbage, a professor of mathematics at Cambridge University. Babbage was working on a machine called the Difference Engine, which could perform calculations using gears and levers. He invited Ada to see his prototype, and she was fascinated by it. She became his friend and correspondent, and learned more about his ideas.

Babbage later designed another machine, called the Analytical Engine, which was more advanced than the Difference Engine. It could store numbers in memory, use loops and branches, and perform different types of operations. It was essentially a mechanical computer, but it was never fully built due to lack of funding and technical difficulties.

What did she write about the Analytical Engine?

In 1842, Ada translated an article by an Italian engineer named Luigi Menabrea about the Analytical Engine. She added her own notes to the translation, which were longer than the original article. In these notes, she explained how the machine worked, how it could be programmed using punched cards, and what kinds of problems it could solve.

One of her notes contained the first algorithm for calculating Bernoulli numbers using the Analytical Engine. Bernoulli numbers are a sequence of fractions that appear in many areas of mathematics, such as number theory, calculus, and probability. They are also related to the odds of winning a lottery with certain combinations of tickets.

Ada’s algorithm was a step-by-step procedure that specified how to input the data, how to manipulate it using arithmetic operations, loops, and conditional statements, and how to output the result. It was the first example of a computer program written for a general-purpose machine.

Why is she important for computing?

Ada Lovelace is important for computing because she was the first person to realize that the Analytical Engine could do more than just arithmetic. She saw that it could manipulate symbols according to rules, and that it could be used for various purposes beyond mathematics. She wrote:

“The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform… But it is likely to exert an indirect and reciprocal influence on science itself in another manner. For, in so distributing and combining the truths and the formulæ of analysis, that they may become most easily and rapidly amenable to the mechanical combinations of the engine…the relations and the nature of many subjects in that science are necessarily thrown into new lights…”

She also imagined that the machine could produce music, art, and poetry based on rules or algorithms. She wrote:

“Supposing…the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression…the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.”

She also speculated that the machine could perform scientific experiments or simulations based on data and formulas. She wrote:

“Many persons who are not conversant with mathematical studies imagine that because it is a machine…the engine can only act upon quantities… This is an error. The engine can arrange…any other symbols or facts which are capable of being noted down in figures or notations.”

Ada Lovelace was ahead of her time in envisioning the potential of computing for various fields of human endeavor. She is considered a pioneer of computing and an inspiration for women in science and technology.