Alan Mathison Turing (; 23 June 1912 – 7 June 1954) was an English mathematician and logician widely regarded as the father of theoretical computer science. He formalised the concepts of algorithm and computation with the Turing machine, a model of a general-purpose computer, and his contributions to cryptanalysis helped the Allies of World War II decipher messages encrypted by the German Enigma machine. He also contributed the Turing test to philosophy of artificial intelligence and the Turing pattern concept to mathematical and theoretical biology.

Born in London and raised in southern England, Turing graduated from King's College, Cambridge, and earned a doctorate from Princeton University in 1938. During World War II, he worked at the Government Code and Cypher School at Bletchley Park, Britain's codebreaking centre, and focused on decrypting German naval messages as the head of Hut 8. His techniques improved on the pre-war Polish bomba method and hastened cryptanalysis of the Enigma ciphering system. The resulting intelligence, known as Ultra, proved helpful in the Battle of the Atlantic. After the war, Turing joined the National Physical Laboratory, where he designed the Automatic Computing Engine, an early stored-program computer.

In 1948, he joined Max Newman's Computing Machine Laboratory at the University of Manchester, contributing to the development of early Manchester computers. He also turned to mathematical biology, working on the chemical basis of morphogenesis and theorizing chemical oscillators independently of their experimental observation. In 1952, after acknowledging a sexual relationship with another man, Turing was prosecuted for gross indecency. He received probation conditional on chemical castration and lost his security clearance. He died on 7 June 1954, aged 41, by cyanide poisoning. The inquest ruled his death a suicide.

Turing left a lasting legacy in mathematics, computing, and codebreaking. His wartime work, covered by the Official Secrets Act, went unrecognised during his lifetime. He later received numerous honors and memorials. His death was examined and interpreted by his family and biographers, who variously accepted, supported, questioned, or disputed the inquest's verdict. Following a 2009 campaign, British prime minister Gordon Brown officially apologised for the "appalling way [Turing] was treated", and Queen Elizabeth II granted Turing a pardon in 2013. The Alan Turing law refers to part of a 2017 UK law that retroactively pardoned men cautioned or convicted under the criminalisation of homosexual acts.

Early life and education

Family

Turing was born in Maida Vale, London, while his father, Julius Mathison Turing, was on leave from his position with the Indian Civil Service (ICS) of the British Raj government at Chatrapur, then in the Madras Presidency and presently in Odisha state, in India. Turing's father was the son of a clergyman, the Rev. John Robert Turing, from a Scottish family of merchants that had been based in the Netherlands and included a baronet. Turing's mother, Julius's wife, was Ethel Sara Turing (née Stoney), daughter of Edward Waller Stoney, chief engineer of the Madras Railways. The Stoneys were a Protestant Anglo-Irish gentry family from both County Tipperary and County Longford, while Ethel herself had spent much of her childhood in County Clare. Julius and Ethel married on 1 October 1907 at the Church of Ireland St. Bartholomew's Church on Clyde Road in Ballsbridge, Dublin.

Julius's work with the ICS brought the family to British India, where his grandfather had been a general in the Bengal Army. However, both Julius and Ethel wanted their children to be brought up in Britain, so they moved to Maida Vale, London, where Alan Turing was born on 23 June 1912, as recorded by a blue plaque on the outside of the nursing home where he was born, which later became the Colonnade Hotel. Turing had an elder brother, John Ferrier Turing, father of Dermot Turing, 12th Baronet of the Turing baronets. In 1922, he discovered Natural Wonders Every Child Should Know by Edwin Tenney Brewster. He credited it with opening his eyes to science.

Turing's father's civil service commission was still active during Turing's childhood years, and his parents travelled between Hastings in the United Kingdom and India, leaving their two sons to stay with a retired Army couple. At Hastings, Turing stayed at Baston Lodge, Upper Maze Hill, St Leonards-on-Sea, now marked with a blue plaque. The plaque was unveiled on 23 June 2012, the centenary of Turing's birth.

Very early in life, Turing's parents purchased a house in Guildford in 1927, and Turing lived there during school holidays. The location is also marked with a blue plaque.

School

Turing's parents enrolled him at St Michael's, a primary school at 20 Charles Road, St Leonards-on-Sea, from the age of six to nine. The headmistress recognised his talent, noting that she "...had clever boys and hardworking boys, but Alan is a genius".

Between January 1922 and 1926, Turing was educated at Hazelhurst Preparatory School, an independent school in the village of Frant in Sussex (now East Sussex). In 1926, at the age of 13, he went on to Sherborne School, an independent boarding school in the market town of Sherborne in Dorset, where he boarded at Westcott House. The first day of term coincided with the 1926 General Strike, in Britain, but Turing was so determined to attend that he rode his bicycle unaccompanied from Southampton to Sherborne, stopping overnight at an inn.

Turing's natural inclination towards mathematics and science did not earn him respect from some of the teachers at Sherborne, whose definition of education placed more emphasis on the classics. His headmaster wrote to his parents: "I hope he will not fall between two stools. If he is to stay at public school, he must aim at becoming educated. If he is to be solely a Scientific Specialist, he is wasting his time at a public school". Despite this, Turing continued to show remarkable ability in the studies he loved, solving advanced problems in 1927 without having studied even elementary calculus. In 1928, aged 16, Turing encountered Albert Einstein's work; not only did he grasp it, but it is possible that he managed to deduce Einstein's questioning of Newton's laws of motion from a text in which this was never made explicit.

Christopher Morcom

At Sherborne, Turing formed a significant friendship with fellow pupil Christopher Collan Morcom (13 July 1911 – 13 February 1930), who has been described as Turing's first love. Morcom was a student athlete, photographer, music collector, and astronomer, notable for his elaborate school pranks.

Their relationship, particularly in discussion of science and astronomy, is collected in letters. The Enigma details how Morcom "used to tease Alan a good deal", with various running in-jokes and pranks to inconvenience Turing. Nevertheless, their intellectual correspondences provided inspiration in Turing's future endeavours.

In February 1930, shortly before graduation, their relationship was cut short by Morcom's death. Months prior, the two had had a weeklong tour of Trinity College, Cambridge to sit scholarship examinations. Days after attending a Salisbury Singers concert, Morcom died of complications of bovine tuberculosis, which he had contracted earlier in life.

Morcom's death caused Turing great sorrow. He accepted multiple prizes on Morcom's behalf, choosing books in Morcom's memory as prizes; and Turing also won the posthumous Christopher Morcom Science Prize, organized by Morcom's mother. In a letter to Morcom's mother, Frances Isobel Morcom (née Swan), Turing wrote:

Turing's relationship with Morcom's mother continued long after Morcom's death, with her sending gifts to Turing, and him sending letters, typically on Morcom's birthday. A day before the third anniversary of Morcom's death (13 February 1933), he wrote to Mrs. Morcom:

It has been speculated that Morcom's death was the cause of Turing's atheism and "the conviction that all phenomena must have materialistic explanations". Circa 1932, Turing wrote The Nature of Spirit while visiting Morcom's family home. His writings show a belief in such concepts as a spirit surviving death independent of the body. In a later letter, also written to Morcom's mother, Turing wrote:

University and work on computability

In 1929 Turing and his friend Christopher Morcom applied for scholarships at Trinity College, Cambridge. Morcom, who was successful, had various advantages over Turing – he was nearly a year older, and both his father and brother had studied at Trinity. However, he died three months after the offer was made. Turing, on the other hand, was unsuccessful, but sat the King's College, Cambridge Scholarship Examination in Mathematics in 1930. King's reserved most of its places for Etonians (there was a historic link with Eton as a feeder institution), making the exam very competitive for candidates from other schools. However, its examiners had a slightly different slant to those in other colleges. Hodges describes the King's examiners as looking for "a spark of originality" and notes that the papers were "notorious for their unorthodox questions".

Turing was awarded an exhibition (a lower-value scholarship) worth £80 per annum (equivalent to about £4,300 as of 2023). His undergraduate studies at Cambridge were from February 1931 to November 1934. He studied "Schedule B" of the Mathematical Tripos course. He was awarded first-class honours in mathematics. His dissertation, On the Gaussian error function, written during his senior year and delivered in November 1934 proved a version of the central limit theorem. It was finally accepted on 16 March 1935. By spring of that same year, Turing started his master's course (Part III)—which he completed in 1937—and, at the same time, he published his first paper, a one-page article called Equivalence of left and right almost periodicity (sent on 23 April), featured in the tenth volume of the Journal of the London Mathematical Society. Later that year, Turing was elected a Fellow of King's College on the strength of his dissertation where he served as a lecturer. However, unknown to Turing, the version of the theorem he proved in his paper had already been proven by Jarl Waldemar Lindeberg in 1922. Despite this, the committee found Turing's methods original and so regarded the work worthy of consideration for the fellowship. Abram Besicovitch's report for the committee went so far as to say that if Turing's work had been published before Lindeberg's, it would have been "an important event in the mathematical literature of that year".