Definition:Algorithm

Context

 * Computer Science
 * Mathematical Logic

Definition
An algorithm is a finite set of instructions or rules that defines a sequence of operations for solving a particular problem.

The word ultimately derives from the name Muhammad ibn Musa al-Khwarizmi, although almost certainly is the result of linguistic evolution of the archaic term algorism, with which "algorithm" should not (and will probably not) be confused.

An algorithm must have the following properties:

Finiteness
An algorithm must terminate after a finite number of steps.

Definiteness
Each step of an algorithm must be precisely defined.

Inputs
An algorithm has zero or more inputs, which are values supplied either:
 * before the algorithm starts;
 * as the algorithm runs.

These inputs are taken from specified sets of objects.

Outputs
An algorithm has one or more outputs. These are values which are specifically determined by the inputs.

Effectiveness
An algorithm is supposed to be effective.

That is, its operations must be basic enough to be able to be done exactly and in a finite length of time by, for example, somebody using pencil and paper.