The 20th century had no shortage of brilliant minds, but perhaps none had as significant an impact on our day-to-day lives as Alan Turing, considered by many as the founding father of modern computer science.

Turing was a brilliant mathematician, before he'd even earned a Master's Degree he wrote probably the second-most-important academic paper of the 20th century – second only to Albert Einstein's paper on General Relativity.

During the Second World War, Turing was an essential figure in the British effort to break the Nazis' encrypted communications, thus, shortening the war and saving millions of lives.

In the years after the war, Turing pioneered the field of artificial intelligence, defining many of its founding principles and conceptual architecture.

But just as he was beginning his most important work, the British government began a persecution of him for homosexuality, convicting him under Victorian laws and forcing him to undergo chemical castration, an act of oppression that may have led him to take his own life at the age of 41.

Few figures accomplished as much as Turing did in his short life, and fewer still have had as lasting an impact, making his life and the cruelty he suffered at the hands of the very nation he helped save from the Nazi war machine all the more tragic.

## Early life and academic career

Alan Mathison Turing was born on June 23, 1912, in Maida Vale, London. His father was a civil servant working in India, so Turing's parents bounced back and forth between England and India for the first few years of his life while he and his brother remained in England with a family acquaintance.

Even at an early age, Turing displayed a brilliant spark that set him apart from his peers. At 13, Turing was enrolled in a boarding school at Sherborne and was so determined to begin his education there that when a general strike in 1926 kept him from his first day of school, he reportedly rode a bike the 63 miles from Southampton to Sherborne on his own.

Sherborne, like many other private schools (which are called 'public' in the UK) at the time, put a great deal of emphasis on Classics and athletics. As such, Turing had some trouble, as he was naturally drawn to math. The school's headmaster wrote to Turing's parents: "If he is to be solely a scientific specialist, he is wasting his time at a public school."

While at Sherborne, Turing met a boy named Christopher Morcom, and a significant bond formed between the two. Often described as Turing's "first love," Morcom encouraged Turing's work in math and science and joined him in those pursuits until his life was tragically cut short by a case of bovine tuberculosis in 1930.

Turing was devastated by Morcom's death, and remained in touch with Morcom's mother for many years after.

Turing continued his studies, however, and eventually went on to King's College, Cambridge, from 1931 to 1934, where he earned a degree with honors in mathematics. The next year, he became a Fellow at the university, and beginning in 1936, Turing would go on to help remake the entire world.

## The academic paper that shook the world

It's not often that a 23-year-old graduate student publishes an academic paper so brilliant and revolutionary that it's recognized as such at the moment. But that is the story of the opening salvo in Turing's remarkable career: "On Computable Numbers, with an Application to the Entscheidungsproblem." One of the most remarkable aspects of this paper is that Turing's genius wasn't in the solution to the problem being solved, but the manner in which he solved it.

The Entscheidungsproblem ('decision problem') first put forward in 1928 by David Hilbert and Wilhelm Ackermann, asked the seemingly simple question of whether or not a statement of first-order logic can be verified in a given system of axioms by a mechanical process. Another way of describing this problem is whether or not there is a mechanical process or algorithm that will always determine whether any given mathematical expression is true or valid.

This turned out to be a surprisingly difficult question to answer and caused considerable debate in math circles. Turing's solution to this problem was to use the concept of computable numbers, which are any numbers that can be produced by some defined rule. He then imagined a "universal machine" whose processes mimicked a human carrying out mathematical computations.

This machine would be capable of changing its state based on the results of the given mathematical process it performed on an input, such as applying a sine function or arithmetic operations to a number.

Turing showed how computable numbers could lead to uncomputable ones that his universal machine could not reach through some defined rule, putting them out of reach of his universal machine.

In this way, Turing showed that there was no theoretical mathematical process that was capable of solving any and all mathematical problems – since uncomputable numbers were a problem his universal machine, a stand-in for a mechanical algorithm or process, could not solve.

While the solution was important in its own right, it was vastly overshadowed by the idea of Turing's universal machine. It wasn't Turing's goal, but along the way to his solution, he just casually invented the modern computer and those reading the paper recognized it for the innovation that it was.

## Lead up to the war

By 1937, it looked increasingly inevitable that Europe was heading for another catastrophic war. After publishing "On Computable Numbers," Turing traveled to the US to study with Alonzo Church. Church, concurrently but independently of Turing, developed his own solution to the Entscheidungsproblem in 1936, which he called Lambda Calculus. It was very similar to Turing's universal machine, but even Church acknowledged that it lacked the elegant simplicity of the "Turing machine," as he called it.

While at Princeton, Turing became acquainted with John von Neumann, a renowned mathematician, physicist, and computer science pioneer in his own right and the two discussed at length what we would now call artificial intelligence. Von Neumann was so taken with Turing that he offered to hire him as his assistant at Princeton, but Turing declined.

With war looming in Europe, Turing worked on a subject that had interested him as a boy at Sherborne, cryptography, and was hard at work developing a binary multiplier that he could use to assist him in his work, and which would prove crucial in the years ahead.

Turing earned a Ph.D. in mathematics from Princeton in 1938 and bid farewell to Von Neumann and Church, returning to Cambridge that summer. In that last year before the war, Turing stayed at Cambridge but had no official lectureship position, so mostly attended lectures with other students and sometimes debated with professors.

He continued to study cryptography and worked part-time at the Government Code and Cypher School (GCCS). When the UK declared war on Germany on September 3, 1939, Turing reported for duty the next day at Bletchley Park, the GCCS's wartime office, where Turing would carry out his most famous work.

## Cryptoanalysis and mathematical ciphers

Cryptography, the science of making and breaking encoded messages, is one of our oldest mathematical disciplines. Julius Caesar apocryphally encoded all of his communications with his officers in the field with a basic substitution cipher that made them unintelligible unless you knew how many positions to shift each letter in the alphabet to decode it.

All encryption basically functions the same way, but the mathematical techniques used to translate one character or digit in a message into another have grown much more sophisticated over the millennia.

By the time 1939 had rolled around, encryption had become even more essential, as communications were commonly relayed via radio, which anyone could theoretically listen in on.

To encode their messages, the German military used the Enigma machine. This was a commercially available cipher device that used a series of rotors and a plugboard whose positions routed electrical signals that scrambled a message beyond all recognition, but which could easily be decoded with another Enigma machine — if you knew what settings were used to encrypt the message.

The use of Enigma machines by the German military was well known in the 1920s and 1930s. The Polish Cipher Bureau was particularly aggressive at trying to decipher Germany's Enigma messages all through the 1930s, building up a catalog of rotor settings, cryptographic tables, and eventually, a machine called a bombe that systematically searched for the rotor settings being used by the Germans.

Successful encryption relies on increasing the order of complexity of your cipher, so when Germany added two more rotors to their Enigma machines to further scramble their messages, this increased the number of possible rotor settings exponentially.

This meant that building enough bombe machines to counter the German Enigma became too expensive and time-consuming for Poland to match. They would have needed dozens of additional machines at least and there simply wasn't enough time or resources to build them in the middle of 1939.

The Polish cryptographers reached out to the French and British, who anticipated the coming war, and sent intelligence officers to Poland in July 1939 for a crash course in Polish decryption methodology, including the bombe.

This exchange would prove critical to the coming British war effort, and Turing would be instrumental in building up the UK's own version of an Enigma-cracking machine.

## Alan Turing at Bletchley Park

When Turing arrived at Hut 8 of Bletchley Park, he was sworn to secrecy on penalty of criminal prosecution and then told to get to work. Hut 8 was responsible for decoding German U-boat communications, which were essential to protecting Allied shipping in the Atlantic, and Turing was more than up to the task.

At Bletchley, he earned himself the nickname Prof, and was described by his biographer, Andrew Hodges, as "the genius loci at Bletchley Park, famous as ‘Prof’, shabby, nail-bitten, tie-less, sometimes halting in speech and awkward of manner, the source of many hilarious anecdotes about bicycles, gas masks, and the Home Guard; the foe of charlatans and status-seekers, relentless in long shift work with his colleagues."

As eccentric a figure as Turing might have been, there was no questioning his genius. "You needed exceptional talent, you needed genius at Bletchley, and Turing’s was that genius," notes historian Asa Briggs.

His first contribution to Project Ultra, the name given to the Allied intelligence effort to break Nazi encryption, was making improvements to the Polish bombe, which he had already been developing for the GCCS that summer before the outbreak of the war.

The bombe, as it came to be called, operated by taking a sample of matching plaintext and ciphertext and electrically replicated possible Enigma rotor settings that would translate the plaintext into the ciphertext. Whenever the bombe would encounter a contradictory result during the process, it could skip the rest of the test, reset, and move onto the next possible setting.

Certain quirks of the Enigma made this easier, such as it being impossible to encrypt a letter into itself, and relatively quickly, the bombe could eliminate nearly all of the possible rotor settings, leaving far fewer to actually attempt to solve by more direct means.

Turing then solved the German naval indicator system used to encrypt its Enigma messages, which was a more complex Enigma with four rotors and operated by more disciplined personnel — human error on the part of the operator was often a key factor in breaking that day's Enigma settings in other German armed services.

Turing also applied a Bayesian statistical methodology, that he called Banburismus, which cryptographers used to rule out highly improbable rotor settings, greatly improving the efficiency of the bombe.

When Germany introduced the Lorenz SZ40 cipher in the middle of the war to encrypt strategic messages coming out of Berlin via radioteletype, Turing was instrumental in working out a method, nicknamed Turingery, to identify the wheel settings of the cipher machine, allowing them to be deciphered.

Given the importance of such high-level communiques, breaking the Lorenz cipher might have been even more important to the Allied war effort than cracking the Enigma.

Turing was sent to the US from 1942 through 1943 to assist in the codebreaking efforts there, which Turing found rather lacking. But while the US might not have had its own Turing, what it did have was industrial capacity running at full steam. American bombes were built that were faster than their British counterparts and were produced at scale. Ultimately, 121 American bombes were made, greatly assisting the work of Ultra.

Turing returned to Bletchley Park in 1943 as a cryptographic consultant for the entire sprawling GCCS operation. Hugh Alexander, who had taken over the operation of Hut 8 in Turing's absence, wrote of Turing at this time:

"There should be no question in anyone's mind that Turing's work was the biggest factor in Hut 8's success. In the early days he was the only cryptographer who thought the problem worth tackling...It is always difficult to say that anyone is absolutely indispensable but if anyone was indispensable to Hut 8 it was Turing."

By the end of the war, Nazi codes were regularly being intercepted and decrypted, helping decisively turn the tide against Germany by 1944.

Turing's contribution helped save his country from disaster in the critical early years of the war when Britain stood alone against the Nazi onslaught and its only lifeline was vulnerable naval convoys from the US.

Turing's codebreaking ensured many of those convoys safely navigated the U-boat infested North Atlantic and sustained Britain in its darkest hour. Though historical counterfactuals are always hard to measure, some estimate that Bletchley Park's success in cracking Nazi communications shortened the war by up to two years, saving millions of lives.

## Designing a universal computing machine

After the war, Turing turned his efforts to the Automatic Computing Engine (ACE) at Britain's National Physical Laboratory. There, he published a paper in 1946 describing a design for a stored-program computer, an essential step toward modern computers.

He was still sworn to secrecy by the Official Secrets Act, though, and he could not discuss many of the critical details of how ACE would work. Frustrated, Turing took a sabbatical in 1947 and recouped in London.

While he was away, the Pilot ACE, a less detailed version of Turing's design, started being built and was operational by 1950. Turing's design for the ACE wouldn't be built until after his death.

After taking an academic post in the mathematics department at the University of Manchester, Turing became the deputy director of the computing machine laboratory, which was also working on an electronic stored-program digital computer and had been heavily influenced by Turing's earlier theoretical concept of a universal Turing machine. He wrote some of the first programs for the Manchester Mark 1, one of the earliest examples of a stored-program computer, along with a programmer's manual for the computer, one of the first of its kind.

## The Turing Test: Defining an artificial intelligence

In 1950, Turing wrote a paper titled "Computing Machinery and Intelligence." He proposed a rather intuitive test that could determine whether a machine should be considered intelligent by human standards. If a human could have a conversation with a computer — without knowing that it was a computer beforehand — and not be able to distinguish it from a human being, Turing argued that a machine should be considered intelligent.

The Turing test, as it came to be known, is a foundational principle in artificial intelligence work today.

Turing also proposed in this paper that instead of attempting to build an "adult" machine intelligence, we should instead aim to build a computer with a "child's" intelligence, but with the capacity to learn through education.

This is essentially how computer scientists develop modern machine learning, by creating a neural network that can be taught to perform tasks. While not on the scale of the artificial intelligence Turing was discussing in his paper, it could very well be the foundation on which a true A.I. is built.

## Arrest and conviction

In December 1951, Turing began a relationship with 19-year-old Arnold Murray. Soon after, in January 1952, Turing's home was robbed and Murray told Turing that he knew who the robber was, which Turing then reported to the police.

During the investigation, Turing admitted to having a sexual relationship with Murray, which was illegal in the UK at the time, and the two were charged with Gross Indecency.

On the advice of his lawyer, Turing pled guilty to the charge and was convicted in March 1952. When he was sentenced, he was given a choice between imprisonment or chemical castration. Turing chose the latter, writing to a friend with a characteristic dark humor: "No doubt I shall emerge from it all a different man, but quite who I've not found out."

However, the conviction would also unravel Turing's life, as his security credentials were revoked, preventing him from continuing any work with GCCS's successor agency, GCHQ. He was also barred from entering the United States, though he was able to travel to other European countries, and he was able to retain his academic position.

The effects of the chemical castration, a series of injections of a form of estrogen, rendered him impotent and spurred the growth of breast tissue. Though reportedly taking all this in stride, no one can truly know how these changes were affecting his emotional and psychological state of mind.

## Death and legacy

On June 8, 1954, Turing's housekeeper found him dead in his bed at his home at 43 Adlington Road in Wilmslow, Cheshire, just south of Manchester.

His official cause of death was declared as cyanide poisoning. Next to his bed lay a half-eaten apple, which was presumed to be the means by which Turing consumed the fatal dose. The apple was never tested for cyanide, though, so we will never know for sure.

This has prompted some debate through the years as to whether his death was a suicide or an accidental cyanide poisoning from a small electroplating device in his home. Potassium cyanide is used to dissolve the gold used when gold-plating metal and Turing was known to have been experimenting with gold-plating spoons in the house at the time.

Accidental inhalation of cyanide fumes from this process would have been enough to kill Turing, but it might have done so slower than ingesting a dose would have, giving him enough time to make it into bed if he was feeling ill.

Turing was also known to eat an apple before bed and leaving a half-eaten apple out wasn't unusual for him. Turing also made a list of tasks he meant to take care of after returning from the bank holiday weekend, which doesn't point towards a suicidal state of mind.

Turing's mother also believed the cyanide poisoning was accidental. Though a genius of the highest order, like other great geniuses, Turing was also known to be somewhat careless at times. Being careless with cyanide is as certain a way to die as any. His mother, and others, believed he was simply careless with the potassium cyanide and accidentally poisoned himself, through inhalation or some other contact.

Whatever the ultimate cause, there is no doubt that in the last years of his life, Turing suffered brutal and humiliating persecution on account of his homosexuality.

In the decades since his death, Turing's contributions to the world have been more widely acknowledged, especially once his work with the GCCS during the war years was declassified. He has since become a celebrated figure of Gay Pride, both for his historic accomplishments and singular genius, but also as a reminder of the tragic human cost of prejudice and homophobia.

In 2009, a popular campaign launched by John Graham-Cumming to secure an official apology from the British government for its prosecution of Turing was successful, with Prime Minister Gordon Brown acknowledging the grave injustice it had inflicted:

"This recognition of Alan's status as one of Britain's most famous victims of homophobia is another step towards equality and long overdue. It is thanks to men and women who were totally committed to fighting fascism, people like Alan Turing, that the horrors of the Holocaust and of total war are part of Europe's history and not Europe's present. So on behalf of the British government, and all those who live freely thanks to Alan's work I am very proud to say: we're sorry, you deserved so much better."

A similar effort to have Turing officially pardoned was introduced in Parliament, but objections and procedural delays dragged the process out for years. Finally, in late 2013, Queen Elizabeth II signed a Royal pardon for Turing, effective immediately. Inspired by these efforts, the British government expanded its exoneration to all men previously convicted under similar indecency laws in 2017.

While this cannot undo the damage done, the recognition afforded Turing and other similarly convicted persons is an important step toward a more inclusive society where the brilliance and humanity of people like Turing can flourish for the benefit of all humanity.