BOOKS CODE-BR.EAKER. The life and death of Alan Turing. BY JIM HOLT O n June 8, 1954, Alan Turing, a forty-one-year-old research scien- tist at Manchester University, was found dead by his housekeeper. Before getting into bed the night before, he had taken a few bites out of an apple that was, appar- ently, laced with cyanide. At an inquest, a few days later, his death was ruled a sui- cide. Turing was, by necessity rather than by inclination, a man of secrets. One of his secrets had been exposed two years before his death, when he was convicted of "gross indecency" for having a homo- sexual affair. Another, however, had not yet come to light. It was Turing who was chiefly responsible for breaking the Ger- man Enigma code during the Second World War, an achievement that helped save Britain from defeat in the dark days of 1941. Had this been publicly known, he would have been acclaimed a national hero. But the existence of the British code-breaking effort remained closely guarded even after the end of the war; the relevant documents weren't declassi- fied until the nineteen-seventies. And it wasn't until the eighties that Turing got the credit he deserved for a second, and equally formidable, achievement: creating the blueprint for the modern computer. It is natural to view Turing as a gay martyr, hounded to death for his sexual- ity despite his great service to humanity. But it is also tempting to speculate about whether he really was a suicide. The flight to Moscow, in 1951, of Guy Burgess and Donald Maclean, British diplomats and rumored lovers who had been covertly working for the Soviets, prompted one London newspaper to editorialize that Britain should adopt the American policy of "weeding out both sexual and political perverts." Turing's role in wartime code- breaking had left him with an intimate knowledge of British intelligence. Mter his conviction for homosexuality, he may have seemed out of control. He began travelling abroad in search of sex, visiting 84 THE NEW YORKER, FEBRUARY 6, 2006 countries bordering on the Eastern bloc. The coroner at his inquest knew none of this. Noone tested the apple found by his bedside for cyanide. The possibility of clandestine assas- sination is hinted by the title of David Leavitt's short biography, "The Man Who Knew Too Much: Alan Turing and the Invention of the Computer" (N orton/Atlas; $22.95), borrowed from the Hitchcock thriller. Leavitt, the au- thor of several novels and short-story col- lections with gay protagonists, rings the gay-martyr theme in the book's open- ing pages by invoking another film clas- sic, "The Man in the White Suit." In that 1951 comedy, which Leavitt reads as a gay allegory, a scientist is chased by a mob that feels threatened by a mirac- ulous invention of his. Then a third film is mentioned, one that evidently made an impression on Turing: the 1937 Disney animation "Snow White and the Seven Dwarfs." Those who knew him said that he was particularly fond of chant- ing the witch's couplet, "Dip the apple in the brew, / Let the sleeping death seep through." So we're prepared for a life story that, though steeped in logic and mathematics, is part mystery, part para- ble of sexual politics, part fairy tale. A lan Mathison Turing was conceived in India, where his father worked in the Indian civil service, and born in 1912 during a visit by his parents to London. Instead of taking their child back to the East, they sent him to live with a retired Army couple in a seaside English town. Alan was a good-looking boy, dreamy, rather clumsy, hopelessly untidy, and not very popular with his classmates. The loneliness of his childhood was finally dispelled when, in his early teens, he met another boy who shared his pas- sion for science. They became insepara- ble friends, exploring esoterica like Ein- stein's relativity theory together. When, a year later, the boy died of tuberculosis, Turing seems to have been left with an ideal of romantic love that he spent the rest of his life trying to duplicate. In 1931, Turing entered Cambridge. His college, King's, "had a very 'gay' rep- utation," Leavitt notes, and was known for its links to the Bloomsbury group. Turing's unworldliness kept him apart from the aesthetic set; he preferred the more Spartan pleasures of rowing and long-distance running. But Cambridge also had a rich scientific culture, and Turing's talents flourished in it. With the backing of John Maynard Keynes, he was elected a Fellow of King's College in 1935, at the age of twenty-two. When the news reached his old school, the boys celebrated with a clerihew: "Turing / Must have been alluring / To get made a don / So early on." With a stipend, no duties, and High Table dining privileges, he was free to follow his intellectual fancy. That spring, attending lectures in the foundations of mathematics, he was introduced to a deep and unresolved matter known as the "decision problem." A few months later, during one of his ha- bitual runs, he lay down in a meadow and conceived a sort of abstract machine that settled it in an unexpected way. The decision problem asks, in es- sence, whether reasoning can be reduced to computation. That was the dream of the seventeenth-century philosopher Gottfried von Leibniz, who imagined a calculus of reason that would permit dis- agreements to be resolved by taking pen in hand and saying, Calculemus-"Let us calculate." Suppose, that is, you have a set of premises and a putative conclusion. Is there some automatic procedure for de- ciding whether the former entails the lat- ter? Can you determine, in principle, whether a conjecture can be proved true or false? The decision problem calls for a mechanical set of rules for deciding whether such an inference is valid, one that is guaranteed to yield a yes-or-no answer in a finite amount of time. Such a method would be particularly useful to mathematicians, since it would allow them to resolve many of the conundrums in their field-like Fermat's last theorem, or Goldbach's conjecture-by brute force. That is why David Hilbert, who in 1928 challenged the mathematical com- munity to solve the decision problem, called it "the principal problem of math- ematicallogic."