The British were deep in the throes of the Battle of the Atlantic. In six short months of 1940, German U-boats had sunk three million tons of Allied shipping. The U.S. Navy joined the quickly growing British forces in the region to help push back the German attack on convoys of Allied supplies and imported goods. The Germans had one goal: keep Britain isolated and vulnerable to attack.

But the Germans were also too confident in their system of sending encrypted messages from land to its seamen in the Atlantic. See, they were depending on a remarkable, typewriter-like encryption machine, called Enigma. Messages could be scrambled using a collection of wheels that offered billions of combinations. The complexity — and simplicity — of the Enigma machine was its greatest success and failure.

By 1939, the Poles had managed to get their hands on an Enigma machine, and just before the country was invaded, the Polish intelligence organization sent the machine to the British. A code-breaking headquarters was set up in Bletchley Park an estate in Buckinghamshire.

And this is where math — and Alan Turing — comes into the story.

Born in London in 1912, Turing showed great aptitude for mathematics at a young age — but like many of the great mathematicians before him, he was much more interested in following his own instincts and interests. As a result, his performance in school was checkered. In 1931, he enrolled in King’s College Cambridge to study mathematics, and after graduating in 1935, he became a fellow of the school.

Turing was fascinated by a variety of mathematical concepts, including logic and probability theory. He independently discovered the Central Limit Theorem, which explains why many distributions are close to the normal distribution (or bell curve). (Trust me, this is a really big deal.) He also began experimenting with algorithms, designing the Turing machine. This led him to Princeton, where he studied with Alonzo Church, before returning to England in 1938.

At first, Turning considered his “machine” to be an abstract concept — a computer was a *person* doing a computation. But over time, he began considering the possibility that an actual machine could be built that would follow algorithms to solve problems. Once back in England, he began developing this invention.

But in 1939, war was declared. Turing was asked to be a part of the Bletchley Park team in England. Using the stolen Enigma machine provided by the Poles, he and mathematician Gordon Welchman developed the first “bombe” or WWII, British code-breaking machine, which collected top-secret information the team called ULTRA. By the end of the war, Turing and his colleagues had developed 49 such bombes, which were instrumental in decoding German Navy U-Boat messages during the long Battle of the Atlantic.

While Turing’s inventions did not end World War II, historians estimate that his contributions shorted it by several years and helped save thousands of lives.

This work propelled Turing into the burgeoning field of computer science. Employed by the National Physical Laboratory, he set his mind to developing the first digital computer, but his colleagues dismissed his ideas. In 1949, he joined Manchester University, where he laid the groundwork for the field of artificial intelligence.

But something was simmering under the surface: Turing’s sexuality. He didn’t particularly hide his attraction to men, and in 1952, he was arrested and convicted for the crime of homosexuality. His choice was to go to prison or accept chemical castration, a process designed to reduce the libido and thus sexual activity. He chose the latter. Although he had continued to work in secret for the Government Communications Headquarters (GCHQ, the British intelligence agency), because he was an out, gay man, his security clearance was revoked. Still, Turing went back to work on his research in computers and applying mathematics to biology and medicine.

In the summer of 1954, his house cleaner found Turing dead in his bedroom, a half eaten apple near his body. The coroner found that he had died of cyanide poisoning, and the subsequent inquest ruled his death a suicide. However, his mother asserted that his death was accidental, a result of cyanide residue on his fingers.

In 2009, the British government issued a posthumous apology to Turing for his arrest, conviction and chemical castration. Prime Minister Brown called his treatment “appalling”:

While Turing was dealt with under the law of the time and we can’t put the clock back, his treatment was of course utterly unfair and I am pleased to have the chance to say how deeply sorry I and we all are for what happened to him … 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.

This year, marking the 100-year anniversary of his birth, much of the math and science community around the world has celebrated Alan Turing Year, designed to elevate Turing’s contributions to the fields. (And in fact, Google introduced one of the most challenging of its Doodles on Turing’s 100th birthday. Check it out!)

*What did you already know about Alan Turing? And what could more could he have accomplished had his life not been so short? Share your reactions in the comments section.*

*I have had a wonderful, wonderful time exploring these stories of math history this month. Let’s do it again sometime! If you’d like to learn something more about math history, drop me a line.*