What are algorithms?

An algorithm is a sequence of instructions or a set of rules to get something done.

You’ll favour a particular route home from school – you can think of it as an algorithm. There are plenty of alternative routes home, and there’ll be an algorithm to describe each one of those too. There are even algorithms for deciding the shortest or fastest route, such as form the basis of satnav systems.

Algorithms are written for a human, rather than for a computer to understand. In this way, algorithms differ from programs.

A diagram showing the stages of making jam-on-toast.

A table showing how digits shift through place values when multiplied by ten.

A set of rules - an algorithm - for multiplying a number by ten.

Why are algorithms important?

Computer scientists strive for algorithms which solve problems in the most-effective and efficient ways – getting the most-accurate results, in the quickest time, with the fewest resources (memory or time).

Search engines such as Bing or Google use algorithms to order a list of search results so that, more often than not, the result we want is at the top of the front page of results. Your Facebook newsfeed is derived from your friends’ status updates and other activity, but it only shows that activity which the EdgeRank algorithm assesses to be of most interest to you. Your recommendations from Amazon, Netflix and eBay are algorithmically generated, based in part on what other people are interested in.

What do algorithms look like in the Primary curriculum?

Helping pupils get an idea of what an algorithm is needn’t be confined to computing lessons. A recipe in cookery, instructional writing in English, the method for a science experiment: each can be considered an algorithm.

For various activities, pupils will already follow a sequence of steps – e.g. getting ready for lunch or going to PE. In maths, one’s approach to mental arithmetic might be an implementation of a simple algorithm. Another example would be that of a teacher’s lesson plan.

A drawing of some flowers with four steps to planting a seed.

A sequence of instructions - an algorithm - for how to plant a seed.

A chart showing the different spellings of the "or" phoneme, and where they are used.

Spelling rules for the "or" phoneme.

3 - 5 years

Teachers naturally create opportunities for sequencing, which is a key element of algorithms. Children learn to take turns with others, to tidy up and line up. Sequencing happens during roleplay activities; for example, the events which occur when we go to post a letter at the Post Office.