Professor Peter Hilton: Bletchley Park code-breaker who became one of the most influential mathematicians of his generation

Peter Hilton was a crucial member of the Bletchley Park code-breaking team that was of vital importance in helping secure the Allied victory in the Second World War, as well as becoming one of the most influential post-war mathematicians of his generation.

Hilton confessed that it was a long time before he found work which compared with the heady excitement of his days at Bletchley Park. General Eisenhower, Supreme Allied Commander in Europe, said that the decoding successes at Bletchley Park shortened the War by at least two years, saving many thousands of lives.

Hilton was recruited to the Foreign Office under somewhat bizarre circumstances. With the order from Winston Churchill to recruit code-breakers, preferably mathematicians with knowledge of foreign European languages, interviewing boards were turning up at the country's leading universities. The combination was almost unheard of due to the premature specialisation in the British education system. They arrived in November 1941 at Oxford, where Hilton's tutor urged him to attend, although he was still an undergraduate and his German was self-taught and rudimentary. In the event, Hilton was the only candidate to present himself, and so was immediately offered a position.

Thus, on 12 January 1942, still uncertain as to what work he would be doing, Hilton presented himself at Bletchley Park and was escorted to Hut 8, where he was to work with some of the country's greatest mathematical minds. Colleagues included Alan Turing, who headed the team, developing the Enigma code-breaking machine and playing a huge role in the development of the computer; Peter Benenson, who later founded Amnesty International; Hugh Alexander, the British chess champion; Donald Michie, who became a Professor of Artificial Intelligence; and Roy Jenkins, future Chancellor of the Exchequer. Hilton got on especially well with Professor Henry Whitehead – they often shared a beer or two in the Bletchley pub that was subsequently renamed The Enigma – and when the war ended he was invited to return to Oxford as Whitehead's research student.

On his second day, Hilton began working with Turing on German naval codes produced by Enigma encryption machines, and concentrated on top secret Offizier messages (for officers' eyes only). His extraordinary ability to visualise meant that in his mind's eye he could unpick streams of characters from two separate teleprinters, a faculty that was to prove invaluable. His rapid deciphering of the convoluted messages provided the Allied forces with proposed German troop movements often hours before German generals in the field had been informed.

Hilton was a generous colleague and a committed enthusiast. He later wrote, "It goes without saying that my colleagues were all extraordinarily good at their wartime jobs at Bletchley Park: they were intelligent, quick, inventive, immensely hard-working and always encouraging each other." In 1942, he joined a team of more than 30 mathematicians in a section known as the Testery (after its head, linguist Major Ralph Tester), deciphering messages from Hitler's High Command to his generals.

The encryption became more complex and required even more sophisticated deciphering. The Germans' new Geheimschreiber [secret writer] machine was the "Lorenz SZ40" (nicknamed "Tunny" by the British). Hilton's ability to remember facts and figures proved vital and he became chief cryptanalyst on the "Tunny" project. Under his direction, his team worked out the basic design and built an emulator they called "Heath Robinson", after the cartoonist famous for his crackpot imaginary inventions. This, however, proved too slow at processing the data.

By February 1944, Colossus, the world's first programmable electronic computer, had been built and was operational. It was able to crack a Lorenz-encrypted message in hours rather than days; eventually 10 were constructed. Occasional German incompetence meant that sometimes two messages were transmitted using the same key, and Hilton spent many hours utilising his astonishing ability to work on two teleprinters simultaneously: "For me, the real excitement was this business of getting two texts out of one sequence of gibberish. I never met anything quite so exciting, especially since you knew that these were vital messages."

Born in 1923 in Brondesbury, north London, Peter John Hilton was the son of Elizabeth Freedman and a GP, Mortimer Hilton, whose practice was in Peckham. His interest in mathematics was inspired by an unfortunate incident. At the age of 10 he was knocked down by a Rolls-Royce; after many weeks in hospital with his leg in plaster to the waist, he made use of what he later described as "this sort of whiteboard, permanently available to me sitting on my stomach" to solve mathematical problems.

He attended St Paul's School in Hammersmith, where he taught himself German, not realising what an impact it would have on his life. He then won a scholarship to Queen's College, Oxford, where he read mathematics. Like most male undergraduates at the time, he underwent military training, in his case for the Royal Artillery.

After the war, Hilton completed his degree at Oxford and in 1948, joined the staff at Manchester University. In 1949, he married the actress Margaret Mostyn and they had two boys, Nicholas and Timothy. Following a three-year spell as a lecturer at Cambridge, while completing his PhD thesis under the tutelage of Professor Whitehead, he returned to Manchester as a senior lecturer in 1956. Two years later, he moved to Birmingham University as the Mason Professor of Pure Mathematics, a chair he held for four years.

In 1962, he then took up academic chairs in the United States, at Cornell University, University of Washington, Case Western Reserve University (Ohio) and finally in 1982, was appointed Distinguished Professor at the State University of New York in Binghamton. He retired in 1995 but he continued to lecture all over the world well into his eighties.

Following his time with Whitehead, who worked in algebraic topology, a branch of mathematics which uses tools from abstract structures of modern algebra to study topological spaces, Hilton went on to make important contributions to the field of topology. Hilton once asked, "What is algebraic topology, Henry?" Whitehead replied, "Oh, don't worry, Peter, you'll love it." Topology is now one of the central pillars of mathematics, with applications in field such as astronomy, quantum physics and the biology of DNA.

Hilton also helped create a new discipline in mathematics, homology theory, which has many practical applications, among them the classification of complicated surfaces in space. He also made significant contributions to other areas of mathematics including combinatorial geometry, combinatorics and number theory. He wrote many books and hundreds of articles, mainly in the areas of algebraic topology, homological algebra and group theory. He had a long-standing interest in mathematics education, becoming a consultant with the Children's Television Workshop, and waschairman of the US Commission on Mathematical Instruction and chairman of the National Research Council Committee on Applied Mathematics Training. He received numerous awards including the Silver Medal of the University of Helsinki and three honorary doctorates.

Although an academic, Hilton was no "stuffed shirt", and was widely regarded as a jovial fellow with boundless energy. He enjoyed amateur dramatics, chess and bridge and was not averse to singing bawdy songs and telling dirty jokes. One sleepless night at Bletchley Park, he spent the night composing one of the world's longest palindromes: Doc note: I dissent. A fast never prevents a fatness. I diet on cod.

Peter John Hilton, mathematician and code-breaker; born London 7 April 1923; Lecturer, Manchester University 1951–52; Lecturer, Cambridge University 1952–55; Senior Lecturer, Manchester University 1956–58; Mason Professor of Pure Mathematics, Birmingham University 1958–62; Professor of Mathematics, Cornell University 1962–71, University of Washington 1971–73; Beaumont University Professor, Case Western Reserve University 1972–82; Distinguished Professor of Mathematics, University of Central Florida 1994–; Distinguished Professor of Mathematics, State University of New York at Binghamton 1982–93, then Emeritus; married 1949 Margaret Mostyn (two sons); died Binghamton, New York 6 November 2010.