Book Review: Alan Turing: The Enigma by Andrew Hodges

2012editionA brief panic over running out of things to read led me to poll my twitter followers for suggestions, Andrew Hodges’ biography of Alan Turing, Alan Turing: The Enigma  was one result of that poll. Turing is most famous for his cryptanalysis work at Bletchley Park during the Second World War. He was born 23rd June 1912, so this is his 100th anniversary year. He was the child of families in the Indian Civil Service, with a baronetcy in another branch of the family.

The attitude of his public school, Sherbourne, was very much classics first, this attitude seems to have been common and perhaps persists today. Turing was something of an erratic student, outstanding in the things that interested him (although not necessarily at all tidy) and very poor in those things that did not interest him.

After Sherbourne he went to King’s College, Cambridge University on a scholarship for which he had made several attempts (one for my old college, Pembroke). The value of the scholarship, £80 per annum, is quite striking: it is double the value of unemployment benefit and half that of a skilled worker. He started study in 1931, on the mathematics Tripos. His scholarship examination performance was not outstanding. Significant at this time is the death of his close school friend, Christopher Morcom in 1930.

King’s is a notorious hotbed of radicals, and at this time Communism was somewhat in vogue, a likely stimulus for this was the Great Depression: capitalism was seen to be failing and Communism offered, at the time, an attractive alternative. Turing does not appear to have been particularly politically active though.

During his undergraduate degree, in 1933, he provided a proof of the Central Limit Theorem – it turns out a proof had already been made but this was his first significant work. He then went on to answer Hilbert’s Entscheidungsproblem (German for “Decision Problem) in mathematics with his paper, “On computable numbers”1. This is the work in which he introduced the idea of a universal machine that could read symbols from a tape, adjust its internal state on the basis of those symbols and write symbols on the tape. The revelation for me in this work was that mathematicians of Turing’s era were considering numbers and the operations on numbers to have equivalent status. It opens the floodgates for a digital computer of the modern design: data and instructions that act on data are simply bits in memory there is nothing special about either of them. In the period towards the Second World War a variety of specialised electromechanical computing devices were built, analogue hardware which attacked just one problem. Turing’s universal machine, whilst proving that it could not solve every problem, highlighted the fact that an awful lot of problems could be solved with a general computing machine – to switch to a different problem, simply change the program.

Alonzo Church, at Princeton University, produced an answer for the Entscheidungsproblem  at the same time; Turing went to Princeton to study for his doctorate with Church as his supervisor.

Turing had been involved in a minor way in codebreaking before the outbreak of World War II and he was assigned to Bletchley Park immediately war started. His work on the “Turing machine” provides a clear background for attacking German codes based on the Enigma machine. This is not the place to relate in detail the work at Bletchley: Turing’s part in it was as something of a mathematical guru but also someone interested in producing practical solutions to problems. The triumph of Bletchley was not the breaking of individual messages but the systematic breaking of German systems of communication. Frequently, it was the breaking of a system which was critical in principle the Enigma machine (or variants of it) could offer practically unbreakable codes but in practice the way it was used offered a way in. Towards the end of the war Turing was no longer needed at Bletchley and he moved to a neighbouring establishment, Hanslope Park where he built a speech encrypting system, Delilah with Don Bayley – again a very practical activity.

Following the war Turing was seconded to the National Physical Laboratory where it was intended he would help build ACE (a general purpose computer), however this was not to be – in contrast to work during the war building ACE was a slow frustrating process and ultimately he left for Manchester University who were building their own computer. Again Turing shows a high degree of practicality: he worked out that an alcohol water mixture close to the composition of gin would be almost as good as mercury for delay line memory*. Philosophically Turing’s vision for ACE was different from the American vision for electronic computing led by Von Neumann: Turing sought the simplest possible computing machinery, relying on programming to carry out complex tasks – the American vision tended towards more complex hardware. Turing was thinking about software, a frustrating process in the absence of any but the most limited working hardware and also thinking more broadly about machine intelligence.

It was after the war that Turing also became interested in morphogenesis2 – how complex forms emerge from undifferentiated blobs in the natural world, based on the kinetics of chemical reactions. He used the early Manchester computer to carry out simulations in this area. This work harks back to some practical calculations on chemical kinetics which he did before going to university.

Turing’s suicide comes rather abruptly towards the end of the book. Turing had been convicted of indecency in 1952, and had undergone hormone therapy as an alternative to prison to “correct” his homosexuality. This treatment had ended a year before his suicide in 1954. By this time the UK government had tacitly moved to a position where no homosexual could work in sensitive government areas such as GCHQ. However, there is no direct evidence that this was putting pressure on Turing personally. Reading the book there is no sick feeling of inevitability as Turing approaches the end you know he has.

Currently there are calls for Turing to be formally pardoned for his 1952 indecency conviction, personally I’m ambivalent about this – a personal pardon for Turing is irrelevant: legal sanctions against homosexual men, in particular, were widespread at the time. An individual pardon for Turing seems to say, “all those other convictions were fine, but Turing did great things so should be pardoned”. Arnold Murray, the man with whom Turing was convicted was nineteen at the time, an age at which their activities were illegal in the UK until 2000.

What struck me most about Turing from this book was his willingness to engage with practical, engineering solutions to the results his mathematical studies produced.

Hodges’ book is excellent: it’s thorough, demonstrates deep knowledge of the areas in which Turing worked and draws on personal interviews with many of the people Turing worked with.

Footnotes

1. “On computable numbers, with an application to the Entscheidungsproblem”, A.M. Turing, Proceedings of the London Mathematical Society 42:230-265 (1936).

2. “The Chemical Basis of Morphogenesis”, A.M. Turing, Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, Vol. 237, No. 641. (Aug. 14, 1952), pp. 37-72.

3. My Evernotes for the book

4. Andrew Hodges’ website to accompany the book (link)

Industrial collaboration agreements: bald men fighting over a comb?

This piece was originally published on the ALDES website:

 

The Samsung-Apple patent battle brings to light an area of intellectual activity of which my more academic colleagues are probably little aware. As an industrial scientist the value of a project is not measured by the number of papers published in peer reviewed literature or even in our own internal literature; it is measured, amongst other things, by the number of patents it has produced. Starting out on a project, the intellectual property landscape investigated and remains critical throughout. Scientific work to defend patents in legal actions is top priority, and in this there is the thrill of the chase – the positive feedback for winning a patent litigation case is immediate. The bottom line is that any patent attorney is paid more than pretty much any scientist!

The idea of a patent is that it gives the holder a period of exclusivity for their invention during which they can exploit it commercially, the benefit to society is that the knowledge that might have been locked into a company is made public for all to see. Without patents, why do research? You might spend millions to invent something but once you’ve invented it, in the absence of a patent, a competitor could exploit your invention at little cost to themselves. Alongside patents you can protect your intellectual property using registered designs, trademarks or you may attempt to keep your invention a “trade secret”.

Patents have a long history, they originated in Italy in the 15th century, with the first formal modern patent law in England the Statute of Monopolies in 1624. In England this replaced a more widespread system of “patent letters” which gave groups of craftsmen monopolistic rights to practice their trade. The 1624 statute swept this away and replaced it with a system of patents which protected specific inventions.

Reading the history of science one frequently comes across references to patents. For example, Chester Hall Moor invented the achromatic eyepiece for telescopes sometime in the 1730s. His solution requires two lenses made of different types of glass to be used together, he commissioned two different opticians to make these two lenses, so as not to give the game away. His idea worked but, perhaps surprisingly for someone who was a barrister by profession, he chose not to patent his invention but appears to have told a couple of instrument-makers the details. They made little of the invention but in 1758 John Dollond “re-discovered” the technique, helped by a coincidence: when Hall commissioned two different opticians to make his lenses, they sub-contracted to the same man to whom Dollond spoke during his own research apparently, picking up vital clues.

John Dollond was awarded the patent for the achromatic lens in April 1758. This patent was subsequently challenged by opticians who realised that Dollond had a valuable invention that was taking business from them and, following some research, discovered the significant “prior art”originating with Chester Moor Hall. John Dollond died in 1761, but his son Peter continued to litigate, successfully, against competitors infringing the patent bringing some of them to bankruptcy.

Christiaan Huygens patented the pendulum clock in 1657. Soon after he was in dispute with Robert Hooke over the invention of the spring driven clock, ultimately no patent was awarded here. James Watt protected his invention of the steam engine with separate condenser, which was extended in term by an act of parliament – a hard fought battle won with the support of his business partner, Matthew Boulton.

Albert Einstein, more famous for his work in theoretical physics, had approximately 50 patents to his name, most notably for a refrigerator which he patented with his former student Leó Szilárd.This isn’t as surprising as it first seems, Einstein was capable as an experimental scientist, and familiar with the patenting process from his time in the Patent Office. It is notable that I’ve struggled to find a list of Einstein’s patents, finding a list of his scientific publications is trivial.

This piece of contemporary research gives an insight into the patenting behaviour of academics in the Mechanical and Electrical Engineering and Computer Science departments at MIT, it finds that 10-20% of the academics in these departments filed patents in any one year, and over half filed no patents in a 15 year period. Interviews showed that even in the 10-20% of academics filing patents, this was far from a core activity: often they were pushed into it by visiting scientists or industrial collaborators. In my view the figure of 10-20% is actually pretty high when compared with the experience I had as an academic scientist over 10 years. The research also found that corporations who collaborated with academics to publish papers were a distinct group from those who collaborated to produce patents. Although there was no correlation between numbers of papers that an academic produced and the number of patents, academics who patented published more highly cited papers.

This contrast in patenting behaviour between past and present is a little forced; prior to the 20th century there was little in the way of university science departments with salaried researchers supported by grants. A researcher might be able to support his work by private means, patronage or bodies such as the Royal Society or Royal Institution but in the absence of these commercial exploitation via patents was the way to get income from your scientific work.

More recently universities have started to create technology transfer officers with the view to exploiting patents generated internally – in the US this was driven by the Bayh-Dole Act, which gave researchers the right to patent intellectual property arising from federally-funded research. These changes can lead to lengthy negotiations over research contracts with industrial partners; the industrial partner will fight for ownership of intellectual property generated and, on behalf of the researcher, so will the university knowledge transfer office. This can lead to the appearance of bald men fighting over a comb; I was once involved in a PhD project where getting the contract signed took as long as the PhD, in an area where none of the scientists involved had a serious expectation of generating anything patentable!

References
1. The achromatic eyepiece story is from Stargazer: The life and times of the telescope by Fred Watson.

The Milky Way

Milky Way

The Milky Way (Canon 600D, 18mm, ISO6400, 30s, f/4.5)

Regular readers will know I recently bought myself a telescope, a Celestron 5SE Schmidt-Cassegrain reflector but this post covers some astrophotography conducted without the aid of a telescope almost the opposite in fact. I’ve been on holiday recently to somewhere with pretty good dark skies, unfortunately I did not have my telescope with me but I did have a tripod, a Canon 600D SLR and a collection of lenses although in this instance I just used the 18-55mm kit lens at the wide end (18mm). I also had my planisphere and a copy of the free planetarium software, Stellarium.

I’ve used my camera with a standard lens to take photos of the night sky before: to make star trails, so far my experiments in this area have been a bit disappointing. The aim with star trail photographs is to have nice bright trails showing the apparent motion of stars around the pole as the earth rotates, against a dark background. In my experiments I used 30s exposures at f/4, ISO200 on a 10mm lens which I then combined using a simple application called StarTrails.

Back to my holiday snaps – I started my evening taking photos as I had done for my star trails, I have to say this was all a bit disappointing – individual photos do show the stars in the sky and with some effort one can trace out the patterns of the constellations – you might just be able to spot Cassiopeia in the image below.

Towards Cassepoia

Cassiopeia (Canon 600D, 18mm, ISO200, 30s, f/4.5)

Getting a bit bored with this, I turned the sensitivity right up so I was imaging at f/4.5 ISO6400 with 30s exposures and suddenly this popped out:

Towards Casseopia

The Milky Way towards Cassiopeia (Canon 600D, 18mm, ISO6400, 30s, f/4.5)

Cassiopeia is in there somewhere but there are just so many more stars (and a few clouds). This opened the flood gates and I indiscriminately fired off shots along the line of the Milky Way, just visible in the image above. At this time of year, in the early evening in the UK the Milky Way goes from horizon to horizon passing almost directly overhead starting a little East of North and finishing a little West of South.

Now this is fun but now I have a bunch of images of parts of the Milky Way. Can I stick them together? It turns out I can, I used Microsoft ICE on the images I had acquired and got this mosaic:

Milk Way Composite

The Milky Way, 5 image mosaic prepared in Microsoft ICE (Canon 600D, 18mm, ISO6400, 30s, f/4.5)

This spans almost horizon to horizon. I was rather pleased with this, however I struggled to work out where I was in the sky, picking out constellations from the huge mess of stars is very tricky. It turns out help is at hand in the form of astrometry.net, this is an online service which takes an image of the night sky and works out which bit of the sky it shows and labels it all nicely. It can’t handle the mosaic image shown above, but can handle the individual images – you can see my images here. One of the formats in which data is provided is Google Earth’s KMZ format, so you can see the images projected onto the celestial sphere in Google Earth – my combined KMZ file is here, it’s 12MB.

There are improvements to be made in the process:

  • if I’d had it with me my 10-22mm lens would have been nice – it would give me more sky in one shot;
  • better familiarity with my planisphere would mean less indiscriminate firing off of shots;
  • ideally I’d have gone for a cloudless night;
  • there’s a bit of optimisation on the exposure settings, ISO6400 is at the limit of my camera and if you zoom right in there is some evidence of colour noise, also towards the zenith the stars are motion smeared – as in star trail pictures so shorter exposures would be nice;
  • compositionally it would be good to include some of the earthly scenery;
  • working out how to turn off the security lights of the holiday cottage we were staying in would have been good.

All in all a rather fun evening!

Harlech

Rhiwgoch BachOur first holiday with Thomas, now aged 7 months, it promised to be rather different from previous ones! We headed for North Wales since it is close and has a seaside.

We booked Rhiwgoch Bach, a cottage above Harlech, proprietors Ieuan and Gwen Edwards. Gwen provides rather fine Welsh cakes (somewhere between a scone and a biscuit) as a welcome gift. Thomas fell asleep just before we left Chester at 9am and awoke as we arrived a little after 11am. The drive from Chester is straightforward and rather scenic although the final stretch is up from Harlech is a narrow, steep twisting lane hemmed in at both sides by high stone walls with limited passing places. This is the route provided in the instructions to get to the cottage, it makes for a simple description but there is an alternative, rather less exciting route.

The cottage has a large, well-equipped kitchen there is a little private garden – if only the weather had been fine enough to sit out in it. The views from the cottage are spectacular, out over the sea to the Llŷn peninsula, South to rocky Foel Ddu, surrounded by rough farmland.

View towards Porthmadog

Day 1 – Saturday

In the afternoon we visited Harlech, it clings to the side of a steep drop down to the sea with the castle sitting on a rocky promontory.

Harlech Castle (view from outside)

The weather was warm, mainly sunny. Sunset over the Llŷn peninsula was glorious.

Sunset from Rhiwgoch

Thomas helped us with some stargazing by waking us a couple of hours after he’d gone to bed. In a perfectly clear sky, with little light pollution (apart from the cottage security lights), we saw the Milky Way.

Day 2 – Sunday

The weather more overcast today, in the morning we went down to Harlech beach, a huge expanse of sand. In the afternoon we walked up the road and headed to Foel Senigl, a little hill. We didn’t quite reach the top because the track from the road didn’t lead there. As the afternoon drew on the clouds came in and it rained, and was windy.

Thomas and Ian on Harlech beach

Thomas was happy in the cot until about midnight.

Day 3 – Monday

Rain menaced for most of the day, in the morning we went to Porthmadog to do some food shopping. The harbour is pleasant enough and there are a number historic railways. 

Building by Porthmadog Harbour

The rest of the town I found a bit grim.

In the afternoon we went to the beach at Llandanwg, this is closest to the cottage and on a rather more manageable scale than Harlech beach. It has rockpools but more comprised rocks on sand than rocks with holes in them. Behind the beach is a small church with a graveyard full of old slate gravestones, and some short-cropped grass leading down to an estuary.

St Tanwg Church at Llandanwg

Thomas has his first tooth, it’s one of his lower incisors – it isn’t visible but to the touch his gum feels toothy rather than gummy.

Day 4 – Tuesday

A little surprised to find the weather relatively clear, but very breezy. We headed down the road to Barmouth which is a Victorian seaside resort. It has a lengthy promenade to walk along and once again the harbour area is pleasant with some fine stone buildings, the town has some fine old stone buildings and a lot of shops selling seaside tat.

Barmouth Harbour

It seems to have a lot of tattoo parlours for its size, and a disturbingly named “arousal Café”, surely the result of a lost letter.

Arousal Cafe?!

In the afternoon the weather continued fine so we went to Harlech castle, this turns out to be a high value for money investment – the castle has a spectacular location looking out from a rocky promontory across the estuary to Porthmadog and the hills of the Llŷn peninsula. The castle itself is relatively intact, the outer walls almost complete but with most of the internal structure gone. It is possible to walk around the parapets. There is a small park along the road out of Harlech, going south, from which you get a good exterior view of the castle.

Harlech Castle

The sky was clear in the early evening so I had a go at some photography of the night sky, this worked surprisingly well, I have pictures of the Milky Way. I was held back a bit by not knowing how to use my planisphere, the unturn-offable security light and by the fact that constellation naming is more than a little random.

Milky Way

Day 5 – Wednesday

In the morning we went to see the Nantcol waterfall up the valley from Llanbedr. This involved a bit of rough walking, although nothing compared to previous holidays!

Nantcol Waterfall

In the afternoon the weather took a turn for the worse, the wind howled impressively around the cottage, we disappeared into a wet cloud and slept.

Day 6 – Thursday

Our last day in Harlech, in the morning we visited Portmeirion which was in the midst of preparations for the No. 6 festival. The village is bizarre but attractive it’s the sort of weird mock-Italianate style I might adopt if I had money to burn.

Portmeirion

As well as the village the coast on the estate is very fine with views out across the estuary.

Portmeirion (view towards Porthmadog)

In the afternoon we went down again to a blustery Llandanwg beach.

We returned home on Friday morning, Thomas sleeping all the way home.

More photos here.

GCSE results through the ages

This year there is a fuss because GCSE pass results have not gone up as anticipated. Ultimately this turns out to be an issue with a new English exam which was marked generously in the January sitting when compared to the June sitting, thus relatively disadvantaging the later sitting in this year.

But aside from this, here is an graph showing pass rates for GCSEs since they started in the late eighties:

304

(source: BBC News)

A steady increase in those achieving grades A-C from 40% when the exam was introduced in 1988 to over 60% now. Never mind the unfairness within this year, what about those disadvantaged by taking the exams a few short years ago?

This behaviour is also reflected in A-level results, below is a graph showing the percentage of A grades since the 1970s.

304

(source: BBC News)

We examine students for several reasons:
1. To provide confirmation that they know certain things in order to be accepted onto further courses or employment;
2. To provide “ranking” information so we might pick the “best” candidates either to accept onto a course, or to employ;
3. To measure the performance of schools, arguably this is a serious misuse of examinations.

It would appear our examination system is focused on 2 rather than 1 but is not sensitive because ever more people are awarded higher grades each year which means distinguishing the best students is ever harder, and the graphs above suggest we cannot make year to year comparisons.

Previously A grades at A-level were awarded as a fixed proportion of the cohort, similarly the other grades. So for example the students with the top 8% marks were awarded an A grade. This scheme has some merit: it assumes that that students have the same performance distribution year on year and uses this property to derive grade boundaries.

My performance at work is graded in a similar way; in my case this is a poor scheme – there are no objective measures of my performance against my colleagues in the form of an exam. Furthermore the distribution is enforced in groups of less than 20 people; there are statistical tests to establish whether a distribution of grades matches a prescribed distribution – these tests come with a caveat that they are invalid for samples smaller than about 50.

However, for a schools examination system these problems are rather less relevant: we have an objective examination system and a cohort of thousands. The current system asks us to believe that every year students are getting better and better: todays A-level students are three times as good as the A-level students of the 1980s, and the GCSE students of today are 50% better than those of the 1980s. Most people outside the education system will find this difficult to believe, and not just because they took their exams in the “olden days”. For the record: I took my A-levels in 1988, and the old fashioned O’ levels in 1986 prior to the introduction of the GCSE.

The current scheme has a strong whiff of political necessity: how can you show your changes to the education system are a success if your marking system is such that grades are awarded in fixed proportion? The current system allows you to show year on year advances, like the production of tractors in the Soviet Union.