This page is part of the website

Mathematics Goes to the Movies

by Burkard Polster and Marty Ross


Breaking the Code (1996)

TURING’S MOTHER: How long have you been at Sherban?
CHRIS (TURING’s friend): A year longer than Troy, Alan.
MOTHER: Are you enjoying it?
CHRIS: I enjoy it very much.
Choosing the right school is so tremendously important, don’t you think? Are you impressed with Sherban?
TURING: It’s not that wonderful?
MOTHER: Of course it is. Why, what’s wrong with it?
Alan: Well, for one thing they don’t treat mathematics as a serious subject.
MOTHER: I can’t believe that.
TURING: Well, it’s true. You know what our form master said the other day? He said: “This room stinks of mathematics” And then he said, looking straight at me, he said: “Go out and get a disinfectant spray.”
MOTHER: Well, he was joking.
TURING: No, he hates anything to do with science or mathematics. You know he once said and he meant it, he said: “ The Germans lost the great war because they thought science was more important than religion.”
MOTHER: The teaching of mathematics is not the only way to judge the qualities of a school.
TURING: It is as far as I am concerned.
MOTHER: I gather you share this enthusiasm for sums and science?
CHRIS: Oh yes, very much so.
While all this is happening TURING is playing with the 15-puzzle (and solves it).

TURING: Job? Oh, I’m at the university. …I do research work…Scientific, mathematics. Actually, we are trying to build a special sort of machine, what people call the electronic brain.
GEORGE: Oh dear, that sounds a bit…
TURING: Like what?
GEORGE: That sounds a bit like that film. What’s it called? Michael Rennie. I saw it down in London. Michael Rennie and some sort of robot.
GEORGE: The day the earth stood still.
TURING: The day the Earth stood still.
GEORGE: Did you see it?
GEORGE: Oh, bloddy good. So what’s it do this thing you are making?
TURING: Well, you give it problems, mathematical problems and it solves them, very quickly.
GEORGE: How quickly.
TURING: Very, very quickly, far more quickly than a man could.
GEORGE: Like an adding machine.
TURING: No, no, it’s more than that. What we are trying to build is a machine that can learn things and eventually think for itself.
TURING: It’s not exactly a robot, it’s not really a brain, not like a human brain anyway. It’s what we call digital computer.
GEORGE: And you thought this up, did you?
TURING: Yes, sort of.
GEORGE: Must be interesting, a job like that.
TURING: Yes, it is.

MAN: You’ll have to bear with me, Turing. I’m not an administrator, neither am I a mathematician, but since it seems highly likely that we shall be working together the powers that be think that we should have some sort of exploratory conversation. Is that alright with you?
TURING: Yes, of course.
MAN:This is your file. I shall consult it from time to time. There is no need to be alarmed.
TURING: No, I am not.
MAN:I see that you have an interest in codes and ciphers. How did that begin?
TURING: Well, I’ve always been interested, I think, ever since I was a boy. I remember getting a prize at school, a book called Mathematical Recreations and Essays and there was one chapter on cryptography. I found it fascinating. Then, much more recently, I realized that my ideas in mathematics and logic could be applied to ciphers.
MAN: Ah, hmm. I’ve been furnished with some details of your work, Mr. TURING, most of which I have to tell you I find almost totally incomprehensible.
TURING: That’s hardly surprising.
MAN: I used to be rather good at mathematics when I was younger, but this is well, baffling. For instance, this thing here. On computable numbers with an application to the Entscheidungproblem. Tell me something about it.
TURING: Tell you what?
MAN: Anything. A few words of explanation, in general terms.
TURING: A few words of explanation?
MAN: Yeah.
TURING: In general terms?
MAN: If possible.
TURING: Well, it’s about right and wrong, in general terms. It’s a technical paper in mathematical logic, but it’s also about the difficulty of telling right from wrong. You see, people think that, well, most people think that in mathematics we always know what is right and what is wrong. Not so, not any more. It’s a problem that has occupied mathematicians for forty or fifty years. I mean how do you tell right from wrong? Bertrand Russel has written an immense book on the subject, his Pricipia Mathematica. His idea was to break down all mathematical concepts and arguments into little pieces and then show that they could be derived from pure logic …… in my book on computable numbers I wanted to show that no one method can work for all questions. Solving mathematical problems requires an infinite supply of new ideas. Well, it was one thing to make such a claim. It was a monumental task to prove it. I needed to examine the provability of mathematical assertions past, present and future. Well, I mean how on Earth ??? Eventually one word gave me a clue. People have been talking about a mechanical process, a process that could be applied mechanically for solving mathematical problems without requiring any human intervention or ingenuity. Machine! That was the crucial word. I conceived the idea of a machine, a TURING machine, which will be able to scan mathematical symbols, it will read them, if you like, it would read a mathematical assertion and then arrive at a verdict as to whether that assertion were provable. And with this concept I was able to show that Hilbert was wrong. My idea worked.
MAN: Well, I see. Well, I don’t, but I see something, I think.

GIRL: Actually, we have met before.
TURING: Really, where?
GIRL: You read a paper to the moral science club at Cambridge. We met briefly afterwards.
TURING: That was six, seven years ago.
GIRL: December 1933, I remember it very clearly. I remember you saying that mathematical propositions have not just one but a variety of interpretations. You opened up all sorts of possibilities I had never thought of before. It was most exciting.
TURING: Thank you.

GIRL: The message to be transmitted, is encoded by this machine. The sender and receiver have the same equipment, of course. And here under the keyboard are three rotors. Now, the letters of the alphabet circle each rotor. Now, if you press one of the keys, k for example, you’ll see that the plain text k is encoded into h. The first rotor then moves on. Pressing k again produces the letter f, and so on and so on. When the rotor has made a complete revolution the second rotor does the same and then the third. It’s a polyalphabetical machine with twenty six times twenty six times twenty six possible settings.
TURING: 17576.
GIRL: Yes.
TURING: Well, that’s not a tremendously large number.
GIRL: No, that’s true. A manual analysis would eventually lead to the correct setting given you’ve got enough patience, but it could take several days and the setting is changed each day.
TURING: How do they know which setting to use.
GIRL: They use a codebook which alas we don’t have, but at least we know how the machine works and we have been able to modify one of our own machines to simulate the enigma’s function.
GIRL: The trouble is, the Germans have just made the enigma a lot more elaborate, which means that our machine is virtually obsolete. Their operators are now equipped with a stock of five rotors from which any three can be used in any order when they set up the enigma
TURING: There are 60 possible combinations. 17576 times 60
GIRL: 1054560. They’ve also added a plug board to the apparatus like a telephone switchboard. They just attach pairs of letters to jet plugs and this swaps the letters before they are fed into the rotors and after. So, there are literally thousands of millions of possible permutations.
TURING: That is what is called a problem.

TURING: Look at this, it’s a fir cone.
GIRL: I can see it’s a fir cone.
Well, take it, look at it. I am going to tell you something extraordinary about this fir cone.
GIRL: It looks ordinary enough to me.
Define what is meant by a Fibonacci sequence.
GIRL: Fibonacci sequence is the sequence of numbers where each is the sum of the previous two. So, it starts with 1, then 1 +1 eqals 2, 1 and 2 3, 2 and 3 5, 3 and 5 is 8
5 and
8 is13 goood, well done, full marks. Now look at this fir cone. Look at the pattern of the brackets the leaves, follow them spiralling around the cone. Eight lines twisting to the left, thirteen twisting lines to the right. The numbers always come from a Fibonacci sequence.
GIRL: Always?
TURING: Always. And it’s not just fir cones. The petals of most flowers grow in the same way. Isn’t that amazing?
GIRL: Yes, it is.
TURING: Yeah, and it prompts the age-old question. Is God a mathematician?

GIRL: What sort of work are you doing?
TURING: I am at Manchester university.
GIRL: Yes, I know that.
TURING: We’ve built a digital computer. Do you remember all my theorizing about universal machines? Well, we have done it, we made one. It’s all thanks to our work at Bletchley.
GIRL: How exciting. That must be so exciting.
TURING: And I am using the computer to simulate the growth patterns of plants and animals, like the Fibonacci patterns in a fir cone. Do you remember me telling you about that?

TURING: Look, let me try and explain something. In order to unravel the messages encoded by the enigma machine, we had to make certain deductions. We had to deduce the position of the machine’s rotors for each transmission. Now, in other words, we had to construct a chain of logical deductions for each of the rotor positions. Now, if this chain of deductions led you to a contradiction, that meant you were wrong and you had to move on to the next rotor position and start all over again, and so on and so on. It was an impossibly lengthy and laborious task and we didn’t know what to do and then suddenly, one spring afternoon, just after lunch, I remember the conversation I had with Wittgenstein. We were discussing an elementary theorem in mathematical logic, which states that the contradiction implies any proposition, and I saw immediately if we could build a machine that embodied this idea, we would have a code breaking machine with the necessary speed. Now, it would have to be a machine of electrical relays and logical circuits, which could sense contradictions, recognize consistencies. Now if your guess was wrong, electricity would flow through all the related hypothesis and knock them out in a flash. If your guess was right it would and the electrical current would stop at the correct combination. Our machine would be able to examine thousands of millions of permutations at amazing speed and with any luck would give us the way in. What a moment that was. It’s extraordinary, quite extraordinary. So, you see, it took more than mathematics and electronic ingenuity to crack the German U-boot enigma. It required determination, tenacity, moral fibre, if you like. That’s what made it all so deeply satisfying. Everything came together there, all the strands of my life, my work as a mathematician, my interest in ciphers, my ability to solve practical problems, my love of my country.