What is an algorithm?


"A process or set of rules to be followed in calculations or other problem-solving operations, esp. by a computer."

Wikipedia - "In mathematics and computer science, an algorithm is a step-by-step procedure for calculations. Algorithms are used for calculation, data processing, and automated reasoning."

From Wisegeek.org - "In its most general sense, an algorithm is any set of detailed instructions which results in a predictable end-state from a known beginning. Algorithms are only as good as the instructions given, however, and the end result will be incorrect if the algorithm is not properly defined."

From The Art of Nathan Selikoff - http://nathanselikoff.com/resources/what-is-an-algorithm

From Computer Science for Fun - The Swap Puzzle

http://computer.howstuffworks.com/question717.htm

What is an Algorithm? from Wikiservity

Book - "Nine Algorithms That Changed the Future" by John MacCormack



Computing in the National Curriculum


The following statements, mentioning algorithms, are taken from the proposed curriculum for Computing

KS1 - Pupils should be taught to understand what algorithms are, how they are implemented as programs on digital devices, and that programs execute by following a sequence of instructions.

KS2 - Pupils should be taught to use logical reasoning to explain how a simple algorithm works and to detect and correct errors in algorithms and programs

KS3 - Pupils should be taught to understand at least two key algorithms for each of sorting and searching; use logical reasoning to evaluate the performance trade-offs of using alternative algorithms to solve the same problem.

Subject Knowledge Requirements for Entry into Computer Science Teacher Training


SKR1 = Algorithms

"A student about to embark on a primary teacher training course as a CS specialist should know, understand and be able to:
  • SKR1a Explain that an algorithm is a precise way of solving a problem which can be followed by humans and computers.
  • Give examples of algorithms met in everyday life.
  • Explain that computers need more precise instructions than humans and the need for precision to avoid errors.
  • Explain and show how algorithms can use selection (if), repetition (loops), procedures (sub-algorithms within an algorithm).
  • Explain the need for accuracy of algorithms.
  • Distinguish between an algorithm and the programs that implement that algorithm.

In addition to the above, a student about to embark on secondary teacher training as a CS specialist should know, understand and be able to:
  • Explain how the choice of an algorithm should be influenced by the data.
  • Be able to explain and use several key algorithms (e.g. sorting, searching, shortest path).
  • Explain how algorithms can be improved, validated, tested and corrected.
  • Explain that a single problem could be solved by more than one algorithm.
  • Explain and show how different algorithms can have different performance characteristics for the same task.
  • Successfully apply algorithms in solving GCSE and A Level type problems.

This is taken from the Computing at School Computer Science Curriculum

A pupil should understand what an algorithm is, and what algorithms can be used for.

Key Stage 1
  • Algorithms are sets of instructions for achieving goals, made up of pre-defined steps.
  • Algorithms can be represented in simple formats.
  • They can describe everyday activities and can be followed by humans and by computers.
  • Computers need more precise instructions than humans do.
  • Steps can be repeated and some steps can be made up of smaller steps.

Key Stage 2
  • Algorithms can be represented symbolically or using instructions in a clearly defined language.
  • Algorithms can include selection (if) and repetition (loops).
  • Algorithms may be decomposed into component parts (procedures), each of which itself contains an algorithm.
  • Algorithms should be stated without ambiguity and care and precision are necessary to avoid errors.
  • Algorithms are developed according to a plan and then tested. Algorithms are corrected if they fail these tests.
  • It can be easier to plan, test and correct parts of an algorithm separately.

Key Stage 3
  • An algorithm is a sequence of precise steps to solve a given problem.
  • A single problem may be solved by several different algorithms.
  • The choice of an algorithm to solve a problem is driven by what is required of the solution.
  • The need for accuracy of both algorithm and data.