Mathematics during World War II

Summary:World War II saw significant mathematical advances in cryptography, operations research, and navigation.

World War II was fought between two major alliances of countries, the “Axis” and the “Allies.” The beginning might be traced to pacts signed in 1936 and 1937 by the three primary Axis powers: Germany, which came to control much of the European continent; Italy, which influenced the Mediterranean; and Japan, which governed much of East Asia and the Pacific. The ultimately victorious Allies coalition, led by Great Britain, the United States, and the Soviet Union, gained the surrender of Italy in 1943 and Germany and Japan in 1945. Well over 50 countries participated in the war, and there were millions of military and civilian deaths, some of the most controversial being those that resulted from the United States’ use of the atomic bomb in Japan. Mathematics played a critical role in many aspects of the war effort, notably in coding and encryption, which achieved levels unseen in previous wars and led to additional developments in the subsequent cold war era, such as mathematician Claude Shannon’s ideas on information theory. New areas of applied mathematics, such as operations research, also emerged from technologies and problems created during or inspired by the war. Many mathematicians served in the military or worked for military agencies, such as the U.S. Aberdeen Proving Grounds. An Applied Mathematics Panel was formed in 1942 to solve war-related mathematical problems. Mathematicians were involved in the Manhattan Project to develop the atomic bomb, a matter that is widely discussed even in the twenty-first century with regard to the ethics of mathematics research and social obligations of mathematicians as citizens of the world. The immediate prewar era and wartime would also result in a flood of mathematicians and scientists emigrating to the United States and many other Allied countries, fleeing religious or political persecution, particularly in Nazi-controlled Europe. It also likely accelerated the growth of participation of women in mathematical and scientific careers. These individuals would shape both research and teaching for decades to come.

98697110-91126.jpg

Codes and Cyphers

Through World War I, most encrypted messages either used a paper-and-pencil cipher or a “book code” in which the enciphered version of each word was looked up in a codebook. Between the world wars, two new types of cryptography emerged: superencypherment and rotor machines.

With superencypherment, the text to be enciphered was converted into a string of digits. Then, a string of random digits (known as “additives”) was added with non-carrying addition. If the additives were never used again, the result was the “one-time pad” cipher. However, if the string of additives digits is reused, it is possible for code-breakers to break the cipher. In the 1930s, American cryptographer William Friedman developed the “kappa test,” a statistical test to determine when a superencypherment string was being reused.

The Japanese Navy used a codebook to convert plain text into numeric code groups, which were then superencyphered using a book of 50,000 random digits. During wartime, the number of encrypted messages sent was such that any string of these digits was reused, and the U.S. Navy was able to break the Japanese code.

The main technique was to search for so-called double hits. Suppose two encrypted messages read:

The double hit is underlined. It could be because of chance but the cryptographer assumes that it is because of the same code words being enciphered by the same stretch of additive. With enough double hits, the cryptographer can recover portions of the additive and start decoding the underlying code words, as well as locating the so-called indicator (numbers hidden in the message to tell the recipient where in the book of additives the sender started). It took months of traffic for enough double hits to appear to break the Japanese naval code, which was changed several times a year. The kappa test could also be used to locate re-used stretches of additive. In 1943, in a project later codenamed VENONA, the U.S. Army spotted seven double hits in 10,000 Soviet diplomatic messages. The Soviets, who used the unbreakable one-time pad system, had blundered by re-issuing some 30,000 pages of random additive, and VENONA succeeded in breaking some 2900 Soviet messages.

The Germans and Italians used the “Engima” cipher machine, which consisted of three rotors plus a steckerboard (a plugboard), which added a monalphabetic substitution to the polyalphabetic generated by the rotors. A rotor was a disc with 26 electrical contacts (for the Roman alphabet) on each side. Wiring inside the rotor connected the contacts. Such a rotor creates a monalphabetic cipher—each letter would always be replaced with the same letter. If the rotor is allowed to rotate one contract between letters, it generates a polyalphabetic cipher with a period of 26. If two rotors are connected together, so that the second one advances one space after the first one completes a rotation (in the same way as the rotating numbers in a mechanical car odometer), then the two rotors generate a polyalphabetic cipher with a period of 26×26 (sometimes 26×25, depending on how the two rotors were geared together). Three rotors generate a period of 26×26×26, and so on. The operator had up to eight rotors available, giving up to

possibilities for the rotors. For each day, there was a prearranged rotor selection and steckerboard setup and the operator would choose at random an initial rotation for each of the three rotors of the day. An “indicator” giving this random initial position had to be inserted into the message.

In the 1930s, three mathematicians, Marian Rejewski, Zerzy Rozycki, and Henyrk Zygalski of the Polish Biuro Szyfrow (Cypher Bureau) had figured out the wiring of the rotors in the Enigma, had worked out techniques for deciphering this indicator; which had been enciphered using the same Enigma, and had invented a machine called a “bomby,” which automated much of the work. With these tools and techniques, they were able to read German Enigma messages until the Germans introduced changes in 1938 that defeated the Polish techniques.

The Poles then turned over their work to the British and French. The British took over an estate north of London called Bletchley Park and brought in mathematicians to work on the Enigma and other ciphers. The first four mathematicians were Alan Turing (whose Turing Machine, of 1936 formed the theoretical basis of later computers), Gordon Welchman, John Jeffreys, and Peter Twinn. Bletchley Park’s main method for breaking Enigma was to find a crib (a word or words that were highly likely to be in a particular place in the message). Despite the features of Enigma that were supposed to hide any evidence of the plain text, there were certain relationships among the letters of the cyphertext that had to occur when the crib was enciphered. A machine called a “Bombe” then ran through all 263 positions of the three rotors, finding the very few that would produce these relationships. Multiple runs would be required for different choices of rotors but Bletchley also developed a statistical technique that—with luck—would eliminate numerous rotor choices.

Searching for a code that would be difficult to break using mathematically based cryptography methods, the U.S. government recruited native Navajo speakers. The Navajo language is very complex with unique phonetics, grammar, and syntax and no written or symbolic alphabet, making it nearly impossible for someone without substantial exposure to understand (no Axis linguists had such exposure) and providing no written cypher that could be analyzed. Several hundred Navajo code talkers served with the U.S. Marines, most in the Pacific theater.

Computers

While general-purpose electronic computers did not exist until after World War II, work during the war helped lead to their development. By 1940, analog computers of considerable sophistication existed. However, there were only a handful of digital computers, all of them electromechanical and not differing much in concept from Babbage’s analytical machine of the nineteenth century. At that time, the only design for an electronic computer was from John V. Atanasoff of Iowa State College (now Iowa State University), who with Clifford Berry designed the Atanasoff–Berry Computer (ABC). It was not a general-purpose computer, limited to the solution of sets of linear equations.

In Germany, Konrad Zuse began working on computers in 1936. In 1941, he constructed the electromechanical Z3, which was the first general-purpose programmable computer. It was used for calculations for aircraft design and was destroyed by Allied bombing in 1943. After the war, Zuse built computers commercially and also developed the first programming language, Plankalkül.

In 1941, the Germans invented a new type of cypher for high-level communications. Instead of replacing or scrambling letters, a machine was developed that worked on the bits of the five-bit teletype (Baudot–Murray) code. In principle, this process was a superencypherment in which the bits of the teletype code were superenciphered by a string of binary additives. The additives were not random but were produced by a set of 10 wheels that rotated with different periods.

To solve this cipher, Bletchley Park constructed an electronic device called the “Colossus.” Ten were built, each having from 1500 to 2500 vacuum tubes apiece. It was not a general-purpose computer since it could solve only one particular problem but the experience with electronic circuits and the knowledge that a device with thousands of vacuum tubes would work inspired, after the war, three successful British efforts (Turing’s ACE, Cambridge University’s EDSAC, and Manchester University’s Mark I) to build general-purpose electronic computers. This kept the United Kingdom competitive in computer design with the United States through the beginning of the 1960s.

98697110-29979.jpg

The Ordnance Department of the U.S. Army had the task of computing large numbers of range tables for artillery. Its Ballistic Research Laboratory, in cooperation with the Moore School of Engineering at the University of Pennsylvania, had the foresight—and ambition—to contract for an electronic computer, to be known as Electrical Numerical Integrator and Computer (ENIAC). The principal designers of the ENIAC were John Mauchly and John Presper Eckert (later developers of the UNIVAC line of computers), although many of the ideas of the design came from Atanasoff’s ABC. The ENIAC did not become operational until 1945. One of its first uses was in designing the hydrogen bomb.

By 1944, the shortcomings of this pioneering design had been realized. It could not handle the workload required for numerical solution of partial differential equations and plans were started for a more advanced computer to be known as EDVAC. In 1945, John von Neumann combined his own ideas, those of Alan Turing, and those of the ENIAC developers into the paper, “First Draft of a Report on the EDVAC,” which laid out the principles of the modern computer. This paper led to the “Von Neumann machine” model, still used in the twenty-first century, although most of the ideas came from Turing.

Operations Research

In June 1941, Coastal Command (that portion of the Royal Air Force that operated over the seas from land bases) brought in physicist Patrick M. S. Blackett as an advisor. Blackett decided that instead of designing new weapons, his duty was to analyze how Coastal Command performed its operations and see what he could recommend to improve them. Hence, his work became known to the British as “operational research” (also called “operations research”).

Blackett and his colleagues investigated a wide variety of submarine and anti-submarine operations. In one such project, the group figured out that a submarine attacked by an aircraft would not have time to dive very deep (indeed, it might still be on the surface), and that a setting of 25 feet for the depth charges the aircraft dropped had the best chance of lethality to the submarine. Another project was to figure out the optimum size of a convoy. It turned out that the larger the convoy was, the better. A convoy, even a large one, had almost the same chance of avoiding being seen by a submarine as a single ship did. What mattered was not the area of sea the convoy covered but its perimeter, where the escorts were stationed. The perimeter increased much slower than did the number of ships, so if both the number of ships and the number of escorts were doubled, each escort had a smaller length of the perimeter to cover, which gave it a better chance to catch enemy submarines trying to penetrate its portion of the perimeter.

The success of Blackett’s original group led to operational research’s extension to many other parts of the British forces. In April 1942, the U.S. Navy founded its own Anti-Submarine Warfare Operations Research Group, originally for antisubmarine warfare and later for work throughout the Navy. As Admiral King reported:

The knowledge… made it possible to work out improvements in tactics which sometimes increased the effectiveness of weapons by factor or three or five, to detect changes in the enemy’s tactics in time to counter them before they became dangerous, and to calculate force requirements for future operations.

World War II presented navigation problems not seen in prewar flying, such as how to find a target at night from the air. In the Battle of Britain, the Germans first used the “Knickebein” system for target location at night. Knickebein and it successor “X-gerät” used narrow radio beams that crossed over the target. Later, the Germans introduced “Y-gerät,” which used a single ground station, with the aircraft transmitting a return signal from which the distance from the aircraft to the transmitter could be determined by the ground station.

The Allies also developed targeting systems. One was the British “OBOE” in which two stations broadcast signals to which the aircraft responded, allowing each station to determine the distance to the aircraft. The aircraft flew a fixed distance in a circular arc from the first station until it was at a specified distance from the second station. The intersection of these two arcs was the target location. This Y-gerät/OBOE technique, except with the aircraft transmitting and the ground station responding, is still used in the twenty-first century in the Distance Measuring Equipment (DME) system widely used by both military and civilian aircraft for navigating over land.

The British also developed the “GEE” system, which used a different mathematical technique. There was no transmitter on the aircraft. Instead, there was a “primary” or “master” transmitter and at least two “secondary” or “slave” transmitters on the ground. The primary would broadcast a signal, and each secondary would broadcast its own signal as soon as it received the signal from the primary. Any given difference between the arrival times of the signal from a primary and secondary defined one branch of a hyperbola (since a hyperbola is the locus of all points the difference of whose distance from two foci is constant and whether the primary or secondary signal arrived first tells which branch of the hyperbola). The second primary-secondary pair defined one branch of a second hyperbola, and these two branches intersect in exactly two points. Either dead reckoning or a third pair could then be used to determine which of these two intersection points was the aircraft’s position.

GEE was soon developed into the Long Range Navigation (LORAN) system, which is still used worldwide for navigation at sea within approximately 1000 kilometers of the LORAN stations. Beyond that distance, the ionospheric bounce of the signals interferes with the ground wave.

The Mathematics Community in World War II

Mathematicians participated in both military service and multiple civilian roles during World War II. Some enlisted voluntarily or were drafted, such as Herman Goldstine, who worked as the army liaison to the ENIAC project. Many stayed in their academic positions, continuing to prepare students and working on war-related training programs in mathematics. Others left their colleges and universities to work for government programs related to the war effort, including the growing area of operations research, such as G. Baley Price, who worked on applications like bomber accuracy and Philip Morse, who is sometimes referred to as the “father of U.S. operations research” and is credited with organizing the U.S. Anti-Submarine Warfare Operations Research Group. Companies like the Radio Corporation of America (RCA), Westinghouse Electric Corporation, Bell Laboratories, Bell Aircraft Corporation, Grumman Aircraft Engineering Corporation, and Lockheed Corporation recruited mathematicians to help fulfill war contracts. The government also widely recruited nonmilitary mathematicians for groups like the Office of Scientific Research and Development, which had branches conducting medical research, fuse research, and a multi-application area looking at problems like submarine warfare, radar, and rocketry. This body came to include the Applied Mathematics Panel in 1942.

Mathematician and scientist Warren Weaver, a pioneer in the field of machine translation, headed the panel. Some of the problems investigated included gas dynamics and compressible fluids, underwater ballistics and explosions, shock waves in air and water, mechanics and damage in air-to-air combat and anti-aircraft fire, ballistics and firing tables, torpedo spread angles, land mine clearance techniques, and statistical methods. In this time period, women also experienced increasing opportunities to pursue and contribute to a diverse range of careers, including science and mathematics. Hunter College professor Mina Rees took a leave of absence during World War II to contribute to the war effort, working with the Applied Mathematics Panel. Following the war, she became head of the mathematics branch of the Office of Naval Research. The American Mathematical Society said

…the whole postwar development of mathematical research in the United States owes an immeasurable debt to the pioneer work of the Office of Naval Research and to the alert, vigorous and farsighted policy conducted by Miss Rees.

Bibliography

Budiansky, Stephen. Battle of Wits: The Complete Story of Codebreaking in World War II. New York: The Free Press, 2000.

Goldstine, H. The Computer From Pascal to von Neumann. Princeton, NJ: Princeton University Press, 1972.

Haufler, Hervie. Codebreakers’ Victory: How the Allied Cryptogaphers Won World War II. New York: New American Library, 2003.

Hodges, Andrew. Alan Turing: The Enigma. New York: Simon & Schuster, 1983.

Rees, Mina. “Mathematical Sciences and World War II.” The American Mathematical Monthly 87, no. 8 (1980).