Decoding the Enigma variations
It was billed as the star turn in their maths and computing week, but when Year 9 pupils at Hedingham School first caught sight of the Enigma machine, they could have been forgiven for thinking that Antiques Roadshow had arrived in their Essex classroom.
At first glance Enigma looks like an old typewriter in an unprepossessing wooden box. Yet this curious contraption was cutting-edge technology during the Second World War, its circuits and rotors churning out German coded messages that challenged some of the finest mathematicians in history. The Hedingham pupils were about to uncover some of its mysteries - and make the startling discovery that mathematicians can be heroes.
The Enigma came to Hedingham in March as part of a week arranged to celebrate the school's new status as a specialist maths and computing college. It was brought by Claire Ellis of the Enigma Schools Project, which is run by the Millennium Mathematics Project at Cambridge University.
Claire runs sessions on codes and codebreaking to excite young people about the possibilities of maths.
Only a few dozen models of the machine survive, mainly in museums. This one, once used by the German army in France, is owned by author Simon Singh, whose bestsellers include Fermat's Last Theorem and The Code Book.
It was Simon who first took the machine into schools, and his Code Book CD-Rom provides the cryptography tools and puzzles that feature in visits.
Hedingham's Year 9 students had an hour-long Enigma session - five were arranged to run on the same day, to accommodate all 200 pupils. Claire begins by explaining some of the simpler kinds of code that have been used throughout history. Caesar, for example, employed a straightforward shift of each letter in a message, replacing it with the letter three places along the alphabet.
Mary, Queen of Scots used her own alphabet of symbols, letters and numbers, unaware of how easily it could be analysed by 16th-century codebreakers - she paid with her life when they revealed she was plotting against Queen Elizabeth. Claire says: "Talking about how easy it is to crack this kind of cipher is building up to the fact that the Enigma machine was different - it ushered in a whole new generation of code-breaking."
She makes the point by typing the word "Hello" on the Enigma's keyboard. It is encrypted letter by letter, and students can view each result by watching to see which letter lights up on the machine's display. The action is projected on to an interactive whiteboard so everyone has a good view.
Claire says: "I type H, and it comes up as P; typing E produces F, and L comes up as O. Then I say: 'What is going to happen when I type another L?'
And the students say it is going to be O again. But then I type it and it comes up as something different, and I type it again and it comes up as something else. And there is a chorus of: 'How does that work?'"
She takes them through the workings of the machine, explaining how a letter is re-mapped by the wiring and three rotors. She shows how the alignment of the rotors changes after every keystroke, so that the mapping rules are constantly changing - hence the difference between the Ls. And she demonstrates how the machine can decrypt as well as encrypt messages, so long as the recipient has an Enigma and knows how to set it up in exactly the same way as the sender's machine.
The students try to calculate the number of different set-up permutations - the three rotors can be picked from a choice of five, each fitting into any slot in the machine in one of 26 different starting positions. Add the possible tweaks to the wiring and there could be 15,000,000,000,000,000,000 ways to configure the machine. The pupils learn more about how the Germans used Enigma, and how codebreakers at Bletchley Park employed maths, technology and much determination to crack it, altering the course of the war.
The sessions round off with a codebreaking challenge - a race against the clock to analyse the frequency of different letters in a coded message, and match them to the frequency patterns in the English language to break the code. "All kids love puzzles," says Claire, "and codebreaking gives them a new way into data collection and analysis."
Hedingham plans to follow up on the students' enthusiasm with the help of the Code Book CD-Rom. Assistant head David Dowling says: "Codebreaking gives students a new angle on skills such as data handling, problem solving and logical thinking. Enigma demonstrates how the maths they do in class has a purpose in real life - and how it can have a huge impact on society.
Cracking Enigma probably reduced the duration of the war by two years.
"We will be using the CD-Rom in maths lessons for hands-on codebreaking. It has lots of tools for coding and decoding, and we can use them for starter activities on the whiteboard, or on our portable tablet PCs. We will be working on data handling at the beginning of June, and the activities on Caesar's code will fit nicely with that."
Hedingham's maths and computing week was packed with events highlighting the use of maths and ICT across the curriculum. The theme was One World, and activities ranged from studying the maths of Da Vinci drawings to staging a re-enactment of the invention of the World Wide Web. David Dowling says: "Some activities involved using maths and ICT, others were designed to encourage students to think more laterally about the subjects.
It was all about sowing the seeds of ideas which can grow."
He found ideas for some of the Hedingham activities at the NRICHwebsite, also run by MMP. He says: "The website features interactive puzzles and games, and the roadshow brought in 12 of the problems as physical activities, which were set up around our library. Students were able to try them out, and they thought it was absolutely smashing. We are under pressure to get through the curriculum as quickly as possible, and days like these give them the chance to take their time with a problem and see it through to completion."
lEnigma sessions can be varied - for senior students, cryptography could be the lead-in to discussions on the invention of the modern computer, the science of internet security or career opportunities in maths and computing. Visit the website at http:mmp.maths.org Simon Singh's Code Book CD-Rom includes software that emulates an Enigma machine, and can be downloaded free from www.simonsingh.com
NRICH activities can be found athttp:nrich. maths.org