Wednesday, 6 August 2014

Algorithm, who could ask for anything more?

First, I have to thank Stanley Kelly-Bootle for the line that I borrowed for the title of this post, modelled of course on Ira Gershwin. I thought it was a pretty good joke when I first laughed at it in 1982, but maybe it had been around for much longer than that. It is a bit scary that in the intervening 30-odd years it has gone from being a joke to being an article of faith. Everyone believes that everything can, and should, be reduced to an algorithm. This is the same as saying that everything can be automated, and that what humans usually refer to as the "skill and experience" can be taken out.

The word Algorithm is a westernised form of al-Khwārizmī, the name of a Persian mathematician who flourished in the late 8th to 9th centuries. His name is, it seems, derived from the oasis region where he was born, sometimes called Chorasmia in what now appears to be Uzbekistan.  Al-Khwārizmī was a seriously smart bloke, who among many other things was the first to write about solving mathematical problems by using numerals written in columns, for tens and units, and using a step-by-step approach. His techniques came to be known as Algorism. In this way he sort-of invented maths, in its modern form anyway, and 'Algebra' - a term he coined and which we owe entirely to his lasting influence.

The name in the form 'algorithm' has been borrowed by computer scientists to mean something more specific, and a bit difficult to explain. We can get close to understanding the idea if we just say that an algorithm is anything that can be realised as a computer program*. Take for example the programmes** found on automatic washing machines. We need to tell the machine how to wash clothes, so we decompose the process in our minds in to a sequence of steps each characterised by drum speeds, durations, temperatures and so on. These steps can be stored and executed by the machine (the program), but the idea that is expressed by the description of the steps is the "algorithm".

Phew! We can build machines that adequately wash clothes. This is because the process of washing clothes can be adequately expressed as an algorithm. For my own part I am mighty glad this is true because I have, in the past, lived without automatic washing machines so I know what a blessing they are. But to stick to the point, the key word in this paragraph is 'adequately'.

Let's choose a more controversial example, like driving a car. This example has been much in the news recently because cars without human drivers are on the verge of being feasible and so we need an algorithm to describe the process. Once we have the algorithm it can be embedded in a machine (the car can be 'programmed') and we are away. Who is going to dream up this algorithm? Can this be done 'adequately'? Can we even define what adequately means in this case?

My current purpose is to comment only on the first of these questions: "Who is going to dream up this algorithm?" I have been writing computer programmes since 1975 and helping other people to learn how to do the same for most of that time. Only once, working with my colleagues Raymond Flood, John Axford and Robert Lockhart in Oxford in the 1990s, did the opportunity come up to develop a course that did not concentrate on programming, but instead emphasised the importance of algorithmic thought. My own view is that we were highly successful!

I believe we can, and must, teach algorithmic thought if we are going to increasingly rely on algorithms. Or maybe what I mean is that we can, and must, develop people's ability to think algorithmically by good coaching. In any case this is far more important than a thousand exercises involving designing an 'app' for a smart-phone than concentrates on its usability and marketability; this will not produce a generation of engineers that will make you feel comfortable in your driver-less car, reading the newspaper, on a busy road.

  I am bound to get comments from people who object to this as a definition, which is fine, because I am not pretending it is one.

  ** Lapsed into UK spelling there - it seems right.

This essay also occurs in substantially the same form on LinkedIn.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.