NEWLY-DISCOVERED PAPERS BY ALAN TURING: THE WARTIME ‘DELILAH’ PROJECT WHICH PRECEDED HIS WORK ON THE AUTOMATIC COMPUTING ENGINE.
The most important and extensive collection of Turing’s autograph material to come to auction, including over 40 pages of working notes and mathematics written by Turing, with other papers from his key collaborator Donald Bayley, demonstrating their work on the portable voice-scrambler ‘Delilah’. Turing learns the practicalities of electrical engineering from a young Donald Bayley and, in turn, Turing’s mathematical theorems and Bayley’s transcript of lectures given by Turing, demonstrate the maturity and extent of Turing’s knowledge of the mathematical side of circuit design which was so essential to the Delilah project and beyond.
Alan Turing, Donald Bayley and Delilah.
Donald Bayley (1921-2020) was born into humble circumstances, the son of a sheet metal worker at the tram depot in Walsall, Staffordshire. He was awarded a scholarship to St Mary’s Grammar School, Walsall (where he was taught mathematics by Alan Turing’s friend James Atkins) and from there won another scholarship to read electrical engineering at Birmingham University, graduating in 1942 with a first-class degree. As it was wartime, he was commissioned into the Royal Electrical and Mechanical Engineers (REME) where he excelled in all his courses and soon became an obvious choice to assist Turing on a new top-secret project. Thus, the young Bayley, scarcely more than a university student, found himself working with an acknowledged mathematical genius on project ‘Delilah’ (so named by Turing’s lab-mate Robin Gandy after the infamous deceiver of men), the aim being to design a portable voice encryption system, ‘the first to be based on rigorous cryptographic principles’ (Bayley, letter to Jack Copeland, 1997).
Turing had already been working on Delilah at Hanslope Park, just five miles from Bletchley, for six months before Bayley joined him in March 1944. The two men were to become close friends but as Bayley recalls, his first meeting with Turing was inauspicious: ‘…He was a bit slapdash; I was very well-organised… This chap had his shirt hanging out. There were resistors and capacitors, as fast as he’d soldered one on another would fall off. It was a spider’s nest of stuff – a complete mess. We made up a ‘breadboard’ sheet of plywood, you soldered between strips of metal, to make up the board. He hadn’t worked on it like that at all, soldered anyhow, and hoped they’d hold together. He was annoyed I mentioned his shirt hanging out. He took it for granted. He said I shouldn’t have mentioned it…’ (Dermot Turing, Prof: Alan Turing Decoded, 2016, p.142).
‘I admired the originality of his mind’, Bayley said – ‘he taught me a great deal, for which I have always been grateful’ (letter to Jack Copeland, 1997). Their main task was to design and build Delilah’s circuits: ‘…He had realised that it could be synthesised out of standard components. This was an entirely new idea to Don Bayley, as was the mathematics of Fourier theory that had been used to attack it. It was a tough problem, which Alan said had involved spending a whole month in working out the roots of a seventh-degree equation… he was able to tell his new assistant a good deal about the mathematics of circuit design… But it needed Don to bring his practical experience to bear on the problem… He also kept beautifully neat notes of their experiments, and generally kept Alan in order…’ (Andrew Hodges, Alan Turing: The Enigma, London, 1992, p.350). For more on the technicalities of Delilah see Professor Jack Copeland’s explanation below.
Turing took a cottage nearby with Robin Gandy and a cat called Timothy, and spent his leisure time running, looking for mushrooms in the park, or gathering in the mess with the junior officers to look at newspapers, gossip and discuss military or scientific matters. Turing, Bayley and Gandy became lifelong friends, the three enjoying long countryside walks together in their spare time. In the interests of doing something more intellectually improving, in the winter of 1944, Bayley, Gandy and Alan Wesley commandeered a ‘…singularly cold classroom…’ (Hodges, p.352) at Hanslope and organised evening lectures on mathematical methods given by Turing: ‘…mainly on Fourier analysis and related material using the calculus of complex numbers. He illustrated his discussion of the idea of ‘convolution’… with the example of a mushroom…’ (Hodges, p.352). Bayley’s notes from these lectures form a document of major significance (see item vi), comprising what is in effect a textbook of advanced mathematics for circuit engineers.
By the end of 1944, the equipment that sampled and enciphered the speech signal was finished. Turing demonstrated the system to officials by encrypting and decrypting a taped speech by Winston Churchill. It was proved to work satisfactorily (‘…it did all that could be expected of it…’ Bayley later wrote to Jack Copeland), but the speech quality was poor. Germany fell in May 1945, not long after Delilah was finished and, too late to be of use in the war, it was not put into production. When Turing left for the National Physical Laboratory in October 1945, he intimated that he wanted Bayley to join him, but Bayley was not due for release from Hanslope until February 1947 and they never worked together again.
The friends celebrated quietly on 8 May 1945, VE Day. Bayley recalls ‘I spent VE day with Alan Turing, Alan Wesley and Robin Gandy. We were all living at Hanslope at that time and on VE day a car with a driver took us to a village called Yardley Grobian… We crossed the A5 on foot and walked into the woods to a clearing which was bathed in sunshine where we sat down together. I said to Turing: “Well, the war’s over now; it’s peacetime so you can tell us all.” Turing replied, “Don’t be so bloody silly”. That was the end of that conversation! We went to the pub in the village for lunch… There was an evening party… Robin Gandy went to the stage to take part in the activities causing onlookers much amusement (Donald thought he “made an ass of himself”)… Later on a party from Bletchley went to Europe to see what the Germans had been up to in their sphere of expertise. Alan Turing was one of that party…’ (Note by Bayley supplied by the vendor).
After the war, having proved his worth with Delilah, Bayley stayed on at Hanslope Park (which today remains a top-secret government site, home to His Majesty’s Government Communications Centre or HMGCC, suppling British intelligence with specialised hardware and software). He married Mabel Haddock in May 1946 and Turing often stayed with them in Woburn Sands, enjoying the friendship and conventional domesticity. On one memorable weekend, Bayley and Turing made an unsuccessful attempt to retrieve some silver ingots that Turing had buried for safekeeping in 1940: “…T hadn’t made a map but knew the location reference a rusty pram he’d left at the edge of wood after using it to transport the silver bars… To my amusement he took off his shoes and socks and paddled in the stream…” (Donald Bayley’s annotations on a newspaper obituary of Professor Donald Michie, included in the lot with other cuttings). Bayley worked mainly in the Diplomatic Wireless Service Engineering Group, and his passport from the 1950s shows he travelled widely to Iron Curtain countries as well as to the United States and other allies of Britain. One of Bayley’s major projects was to design the text-based ‘Piccolo’ system for secret diplomatic radio communications. Bayley’s ‘Piccolo’ was adopted by the British Foreign and Commonwealth Office and his system was used worldwide for decades. He retired from Hanslope Park in 1975, and his family recall that he was extremely reticent about what he did during the war, and neither did he speak about his later work at Hanslope. Donald and Mabel were childless so, wishing to ensure these papers’ survival, he gave them to a family member some years before his death with a note tentatively asking “Some historical interest?”.
Provenance: Donald Bayley (1921-2020); thence by descent.
Commentary on the Papers.
by Professor Jack Copeland, Director of the Turing Archive for the History of Computing.
In 1943, cryptology’s new frontier was the encryption of speech. Turing extended existing text-encryption technology to the new territory of speech-encryption. Text-based machines such as the German SZ (which Turing and his Bletchley Park colleagues broke in 1942) worked by adding obscuring characters, called ‘key’, to the plain-text message. The systematic rules of letter-addition that were hard-wired into the SZ, would automatically generate the encrypted form of the message. Key was produced by a Key Generator situated inside the SZ cipher machine. The Key Generator was a system of twelve wheels: as the wheels turned, they churned out a continual stream of seemingly random letters and other keyboard characters. The wheels in the receiver’s machine were synchronised with those in the sender’s, and so produced the same letters and characters of key. The receiving machine stripped the key off the incoming message, revealing the plain-text.
Delilah added obscuring key to spoken words, much as the SZ added obscuring key to written words. In Delilah’s case, the key was a stream of pseudorandom numbers (i.e., random-seeming numbers but not truly random). Delilah’s key was produced a Key Generator consisting of a system of five rotating wheels and some very sophisticated electronic circuitry. As with the SZ, the Key Generator of the receiver’s Delilah had to be synchronized with that of the sender’s, so that both machines produced identical key. The first step in the encryption process was to ‘discretize’ the speech, turning it into a sequence of individual numbers. Each of these numbers corresponded to the speech signal’s voltage at that particular moment in time. Delilah then added key to these numbers and this created the encrypted form of the speech. (Delilah’s additions were simply of numbers to numbers—as opposed to the addition of letters to letters in the SZ—and moreover ‘carries’ were ignored.) The encrypted speech would be transmitted automatically to the second Delilah at the receiving end of the communications link. The receiving Delilah then stripped the key away from the incoming transmission, and the resulting numbers (specifying voltages) were used to reproduce the original speech. The result was whistly and full of background noise, but usually intelligible—although if the machine made a mistake, there would be ‘a sudden crack like a rifle shot’, Turing and Bayley reported.
i) The Laboratory Notebook: ‘of outstanding interest’.
This laboratory notebook is of outstanding interest, being a record of important scientific experiments performed by Turing and recorded in his own hand, with further experiments recorded by Bayley under Turing’s direction.
The first experiment, recorded in Turing’s handwriting, concerns the measurement of a pulse (Turing called it the ‘A2-pulse’) emitted by an electronic circuit known as a ‘multivibrator’. Multivibrators were a vital part of Turing’s all-important Key Generator. The pulse of electricity was measured by feeding it into an oscilloscope, which displayed the shape of the pulse on a screen. The next page of the notebook, headed ‘Measurement of “Heaviside function”‘, records voltages measured in a section of the same multivibrator circuit. In laboratory work, experiments are often repeated, and Turing headed the following page ‘Second Experiment for measurement of A2 pulse’. Further experiments recorded in the notebook tested the performance of the main parts of Delilah—the Pulse Modulator, the Harmonic Analyser, the Key Generator, the Signal and Oscillator Circuits, and the Radio Frequency and Aerial Circuits.
The laboratory notebook is in Turing’s handwriting up to and including the testing of the Key Generator, and thereafter is in Bayley’s. Turing worked alone for approximately the first six months of the project, before Bayley joined him in March 1944. Presumably Turing passed the notebook to Bayley at that stage. The parts in Turing’s hand form a record of the order in which he built and tested early prototype circuits for the various functional elements of Delilah.
Turing’s Key Generator was the most original part of Delilah. In detail, it consisted of the five-wheeled unit mentioned above, plus eight multivibrator circuits—in effect, eight more very complicated ‘wheels’. There was additional circuitry for enhancing the random appearance of the numbers that the eight multivibrators produced. Turing was a pioneer in the application of multivibrators to cryptography; today, there is intense interest in the field.
ii) The Bandwidth Theorem: ‘a crucial step in the Delilah encryption process’.
A crucial step in the Delilah encryption process was the conversion of speech into a sequence of numbers (to which key was then added). This conversion of sound-waves into numbers was done by sampling the frequency of the sound-wave at a rate of several thousand times a second, producing several thousand numbers per second. Then, at the other end of the communications link, these numbers could be used to reproduce the sound-waves. This was a process that communications engineers were familiar with, and there is a fundamental theorem stating what the sampling rate needs to be if the sound waves are to be reproduced exactly. This is the bandwidth theorem.
Most probably Turing wrote out the proof of the theorem as a tutorial for Bayley. Turing’s two handwritten pages are based ultimately on the work of the French mathematician Fourier (1768–1830) and the concept of a ‘Fourier transform’. This decomposes a sound-wave (or any waveform) into individual frequencies that make it up (just as a musical chord can be decomposed into the frequencies of the individual notes that make the chord up). In their report on Delilah, Turing and Bayley noted that ‘the human ear works on a Fourier analysis basis’. The theorem itself goes back to work in the 1920s and 1930s, after which, in 1940, Claude Shannon of Bell Labs in New York wrote his now famous article sketching this earlier work and giving his own formulation and proof of the theorem, which he called the ‘sampling theorem’ (his article was not published until 1949). It is highly likely that Turing and Shannon discussed the theorem while Turing was visiting Bell Labs in 1943.
Turing often wrote on the reverse side of other notes that he had finished with, and this is the case here. He began his proof of the bandwidth theorem on the reverse of a sheet of notes about logic formulae. These brief notes appear to relate to a logical system of Alonzo Church. Church was Turing’s Ph.D. supervisor at Princeton University before the war, and Turing continued thinking intermittently about Church-style logic while so busy with his codebreaking work at Bletchley Park, even publishing a paper on one of Church’s logical systems in 1942.
iii) Red Form Notes: ‘conveys something of the excitement and challenging nature of the Delilah project’.
Red Forms, so-called because they were printed in red ink, were used by W/T (wireless-telegraphy) intercept operators, members of the so-called ‘Y Service’, the organisation responsible for the interception of enemy radio transmissions. Intercept operators with headphones searched the airwaves for encrypted German military transmissions. Transmissions from the German SZ machine were instantly recognisable by their distinctive sound, while other features gave away the military origin of Enigma transmissions in Morse code. Once an intercept operator had locked onto an encrypted transmission, the letters composing it were written out on a Red Form, together with additional information such as the time of interception and the radio frequency. The Red Forms were then usually despatched to the codebreakers at Bletchley Park.
Hanslope Park housed an extensive interception operation, monitoring Northern Europe. Ever short of writing paper—which was in limited supply throughout the war—Turing seems to have repurposed these Red Forms, writing detailed mathematical notes concerning Delilah (possibly the Key Generator) on the blank reverse sides, probably for Bayley’s benefit. The very appearance of these notes conveys something of the excitement and highly challenging nature of the Delilah project. The Red Forms and the evidence of wartime shortages, the untidy formulae Turing has scribbled out for Bayley, and the sheer complexity of the mathematics, all contribute to the picture of a genius and his young assistant working closely together on this fiendishly complex device.
The numbered sheets begin by considering pulses of electricity. The first sheet contains a diagram of a single pulse and there are calculations, continuing onto the next sheet, concerning the area of the pulse. Sheet 3 contains a diagram showing a system consisting of one electrical resistor and one electrical capacitor. Turing labels the input into the system ‘Pulse of area A at time 0’. Beneath the diagram he calculates how the capacitor’s charge waxes and wanes as the pulse of electricity passes through the system. (There are some corrections at the top right of the sheet in another hand, probably Bayley’s.) The calculations continue onto sheet 4, where Turing calculates the ‘output volts with pulse of that area’, and also onto sheet 5, where he solves integral equations involving time, resistance, charge, and the ‘imaginary’ number operator i (used in representing capacitance). Sheet 6 displays a diagram in which a wave-like pulse is analysed into discrete ‘steps’, beneath which is an exposition of what Turing called the ‘Fourier theorem’. There follow several pages of Fourier-type analysis involving integral equations. That the notes were intended primarily as a tutorial for Bayley is indicated by Turing’s inclusion of a proof of the Fourier theorem.
The unnumbered sheets, some of which are in Turing’s hand, consist of similar material. One sheet contains the same diagram as numbered sheet 3, with calculations showing the voltages and currents at various points in the system. The reverse sides of the numbered sheets, the actual Red Forms, are all blank, but some of those on the reverse sides of the unnumbered sheets have writing on them. Seemingly these were used as scrap paper by radio intercept staff before Turing acquired them. One Red Form contains notes in an unidentified hand about transformer characteristics, while another contains jottings about coil windings and frequencies, also in an unidentified hand.
iv) Determination of Volts: ‘the basis of the multivibrator’s behaviour’
The diagram shows an electrical circuit similar to the multivibrator circuits appearing in the first and second experiments recorded in Turing’s lab notebook (Item i). The circuit consists of a triode valve, three capacitors and five resistors (‘valve’ is the British term for a vacuum tube). On the left of the diagram, Turing shows the input coming from an oscillator, and on the right he shows the output going to a ‘Scope’—the oscilloscope used to visualize the circuit’s behaviour. The triode valve is depicted by a circle in the middle of the diagram, and its three constituent elements are drawn inside the circle, the ‘anode’ at the top, the ‘cathode’ at the bottom, and in between them, stretching right across the circle, is the ‘control grid’. Once the voltage at the grid rises above the ‘cut-off’ value, this precipitates the cumulative avalanche-effect that is the basis of the multivibrator’s behaviour. The oscilloscope indicates when the avalanche has commenced. Turing has written these notes on the back of another type of red-printed Y Service form, an operator log sheet (type S. 323).
v) ‘Faltung’: ‘a helpful analogy with the shape of a mushroom’.
The German ‘Faltung’ literally means ‘folding’. It is an earlier term for what mathematicians now usually call a ‘convolution’. Convolutions are important in the maths of signal-processing—which is the use Turing was making of them in his Delilah work—and also, nowadays, in image-processing as well as in neural networks and deep learning. In electrical circuit theory (Turing’s specific application) a convolution essentially describes the result of ‘blending’ two separate waveforms together.
In these notes, no doubt written for Bayley’s benefit, Turing is explaining the mathematics of convolutions. He uses a helpful analogy with the shape of a mushroom. This visual metaphor is also mentioned in Bayley’s record of Turing’s evening lectures at Hanslope (Item vi), where Bayley noted ‘the analogy of the mushroom’ (on page 11). Diagrams of convolutions have a mushroom-like appearance, with a central stalk and the mushroom’s cap around it.
Turing’s notes begin with a diagram resembling the head of a mushroom and embedded stalk. There is a similar head-of-a-mushroom diagram on page 11 of Bayley’s lecture notes (Item vi); on the right of this diagram ‘Faltung’ has been written in pencil, in what appears to be Turing’s hand.
As with Item iv, Turing has written these notes on the back of a radio log sheet. Dated 9th August 1942, the log sheet shows a fruitless attempt to determine the bearing of an intercepted enemy transmission of frequency of 10242 kilocycles per second (10.242 MHz in modern notation). The sheet records the results of efforts to measure the bearing at seven different intercept stations, in Scotland, Northern Ireland, Norfolk, Devon, and Cornwall. Even with such a spread of stations, however, there was ‘No fix’. The form also records ‘Poss between GENOA and NAPLES’ and ‘Reported by Hanslope’.
vi) Bayley’s School File: ‘the most extensive single work by Turing currently known’.
Bayley’s handwritten record of Turing’s after-dinner sessions is fixed separately into the binder. It consists of sheets of notes numbered 1–180, plus two unnumbered sheets at the beginning, in red ink, containing a reference list of standard mathematical forms. This document, which is of major significance, will be designated ‘Turing’s Lectures on Advanced Mathematics for Electrical Engineers’. It represents the most extensive single work by Turing currently known. Effectively these notes form a textbook—terse, selective, and now of course very out-of-date—on advanced maths for circuit engineers. No doubt Bayley was not the only member of Turing’s audience, since there were numerous electrical engineers working at Hanslope.
Electronics itself does not figure much in the lectures. There are only passing references (e.g., page 49 mentions ‘Cath Foll’, referring to a circuit called a cathode follower). Bayley liked to relate that Turing had only recently taught himself elementary electronics, by studying an RCA vacuum tube manual while he was crossing the Atlantic from New York to Liverpool, in March 1943. This cannot be quite true, because Turing made some use of electronics in his 1940 document on Enigma and the Bombe (known at Bletchley Park as ‘Prof’s Book’, ‘Prof’ being his nickname). Nevertheless Turing’s knowledge of practical electronics was almost certainly inferior to his assistant’s, at least initially, since Bayley was versed in electronics at university, and moreover was involved with radar before his transfer to Hanslope. When it came to mathematical matters, however, the situation was very different. These lectures demonstrate the extent and maturity of Turing’s knowledge of the mathematical side of electrical circuit design. It was knowledge that was essential to the Delilah project, most especially to the design of the all-important Key Generator.
Turing’s Lectures on Advanced Mathematics for Electrical Engineers cover the following topics: Fourier series, power in a signal, low pass filters, Fourier integrals and Fourier transforms (with applications to pulses and circuits), applications of differential and integral calculus, the Heaviside function, transmission along a submarine cable, Faltung (convolutions) and applications, network problems, the Energy Theorem, complex numbers, Argand diagrams, functions of complex variables, Cauchy–Riemann equations, Cauchy’s Theorem, singularities, limits, continuity, boundedness, Cauchy’s Integral Formulae, Liouville’s Theorem, Taylor’s Theorem, Laurent’s Theorem, branch points, Laplace’s equation, electrostatics, Gauss’s Law, circuits obeying Ohm’s Law, vectors and tensors, Green’s Theorem, Poisson’s equation, Nabla, Stokes’ Theorem, and electromagnetic waves and the wave equation.
vii) Loose Notes: ‘each page seems to concern a different electrical problem’.
a) Two foolscap pages covered with what appears to be Turing’s handwriting. Bayley’s explanatory note inside the front cover of the ring binder (see Item vi) stated ‘Some p.p. in his [i.e. Turing’s] own hand’. Each foolscap page seems to concern a different electrical problem. The first begins with a diagram of a network of inductors and capacitors. An ‘L’ written above the first inductor indicates that its inductance is L units. Below the diagram, Turing multiplied two matrices together, one matrix concerning inductance and the other capacitance. He then drew another diagram, presumably representing the same network, showing input and output voltages v1 and v2. There follow calculations involving v1 and v2. The second foolscap page gives an equation for ‘Cut-off’ and investigates behaviour ‘Below cut-off’.
b) Three pages of notes in Bayley’s handwriting. Two of these pages (one of which is filled with writing on both sides) contain summary notes concerning certain of the topics covered in Turing’s Lectures on Advanced Mathematics for Electrical Engineers (Item vi). Perhaps Bayley used these as reference sheets. At the top of the third page, on the right, Bayley has written ‘(Submarine cable See p.40 of notebook)’. The heading ‘Submarine Cable’ is found on page 40 of Turing’s Lectures on Advanced Mathematics for Electrical Engineers and this page and the next concern the mathematics of transmission along such a cable. Bayley’s third page extends the calculations on page 41 of the Lectures and shows a calculation of the output that is produced by an input of a unit pulse.
viii) ‘Problem’: ‘a rather plodding (for Turing) investigation’.
The first folio is crammed on both sides with mathematics. It begins with the underlined heading ‘Problem’. Turing then gave a pair of equations and wrote: ‘Discuss the convergence of the sequence xn‘. What follows is a rather plodding (for Turing) investigation of a number of different cases, in steps that he labelled A through H. The style of presentation strongly suggests that the problem and its solution were being investigated for someone else’s benefit, presumably Bayley’s. The second folio presents a diagram summarising some features of the solution. In one case, there is oscillation between two values; in another, the value tends to a limiting value; and in yet another case, it diverges to infinity.