By Clare Spencer
Alan Turing: Credited with innovation in many disciplines
Alan Turing was a World War II code-breaker. He was also gay.
Fifty-five years after the mathematician committed suicide, Downing Street has apologised for the "appalling" way in which he was treated because of his sexuality.
According to Winston Churchill, Turing made the single biggest contribution to Allied victory in the war against Nazi Germany.
His pivotal role in cracking intercepted messages helped the Allies to defeat the Nazis in several crucial battles.
Turing's biographer, Dr Andrew Hodges, says that once he had discovered how to break the Enigma machine codes, it was like having a daily newspaper - full of nothing but detailed information on the activities of German U-boats.
In 1952, however, Turing was prosecuted for gross indecency after admitting a sexual relationship with a man. Two years later he killed himself.
He lived in a time when homosexuality between men was a criminal offence.
He avoided a prison sentence by agreeing to undergo experimental hormone therapy - he was injected with female hormones to reduce his sex drive and chemically castrated.
His career was also curtailed - security privileges were removed, meaning he could not continue work for the UK Government Communications Headquarters (GCHQ).
In 1954 at the age of 41, he is thought to have taken his life by eating a cyanide-laced apple at his home in Wilmslow, Cheshire.
His biographer, Dr Andrew Hodge, says no-one really knows what happened in the two years between his conviction and death but he blames treatment by the government of the time for driving him to despair.
'Kind and eccentric'
He said: "His relationship with the state, the state which he had helped to save essentially in the 1940s, that is the crucial background to his death."
Turing's oldest niece, Inagh Payne, was 18 when he died. She remembers him as "immensely kind and very eccentric" and said he used to cycle around the code-cracking headquarters at Bletchley Park in a gas mask because he suffered from bad hay fever.
She recalls sitting on his knee asking him repeatedly what he did at the office. Turing remained quiet about his work for the war effort.
Her father kept her away from newspaper reports of Turing's conviction for gross indecency. It was not until years later that she learned how influential her uncle had been in the war and how he had been treated because of his sexuality.
Turing is credited with laying the foundations for computer technology and artificial intelligence. He worked on one of the first recognisable modern computers, the Manchester Mark 1.
Dr Hodges says he had the "most amazing brain" and his influence is only starting to be recognised: "Appreciation of what he has done is only growing. There were so many fields he touched."
In 1936 he established the conceptual and philosophical basis for the rise of computers in a seminal paper called On Computable Numbers.
In 1950 Turing devised a test to measure the intelligence of a machine. It is now named after him. Essentially, he asked if a machine can think and, if it could think, whether a computer could fool a human into believing it is a human too.
In 1990 the Cambridge Center for Behavioural Studies pledged a cash prize of $100,000 for the first computer whose responses were indistinguishable from a human's.
Turing's personal life came to media attention after computer programmer Dr John Graham-Cumming started a petition asking for a posthumous apology - thousands of people signed it, including Stephen Fry, Ian McEwan and scientist Richard Dawkins.
Prime Minister Gordon Brown has now apologised for how he was dealt with in the 1950s.
He said that "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."