An algorithm is a mechanical and completely reliable procedure or set of instructions for completing an operation in a finite number of steps. For example, "To unlock a door with an unfamiliar set of keys, try each one until one of them does unlock." Another example, from logic, is truth-tables, which determine whether a formula is a tautology. In mathematical contexts, an algorithm is a mechanical procedure for computing a result or outcome. Use of an algorithm always provides a solution to a problem, unlike an heuristic.

See Also: computation; heuristic.

Back to index.