Primary
Algorithm ○꠹|Definition|1st|20251119205401-00-⌔
Algorithm
In mathematics and computer science, an algorithm (/ˈælɡərɪðəm/) is a finite sequence1 of mathematically rigorous instructions, typically used to solve a class of specific problems or to perform a computation.2 Algorithms are used as specifications for performing calculations and data processing. More advanced algorithms can use conditionals to divert the code execution through various routes (referred to as automated decision-making) and deduce valid inferences (referred to as automated reasoning).
In contrast, a heuristic is an approach to solving problems without well-defined correct or optimal results.3 For example, although social media recommender systems are commonly called “algorithms”, they actually rely on heuristics as there is no truly “correct” recommendation.
As an effective method, an algorithm can be expressed within a finite amount of space and time4 and in a well-defined formal language5 for calculating a function.6 Starting from an initial state and input, a computation occurs at each step, eventually producing output7 and terminating. The transition between states can be non-deterministic; randomized algorithms incorporate random input.8
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original Footnotes
“A procedure which has all the characteristics of an algorithm except that it possibly lacks finiteness may be called a ‘computational method ’” (Knuth 1971:5). ↩
“Definition of ALGORITHM”. Merriam-Webster Online Dictionary. Archived from the original on February 14, 2020. Retrieved November 14, 2019. ↩
David A. Grossman, Ophir Frieder, Information Retrieval: Algorithms and Heuristics, 2nd edition, 2004, ISBN 1402030045 ↩
“Any classical mathematical algorithm, for example, can be described in a finite number of English words” (Rogers 1987:2). ↩
Well defined concerning the agent that executes the algorithm: “There is a computing agent, usually human, which can react to the instructions and carry out the computations” (Rogers 1987:2). ↩
“an algorithm is a procedure for computing a function (concerning some chosen notation for integers)… this limitation (to numerical functions) results in no loss of generality”, (Rogers 1977:1). ↩
“An algorithm has one or more outputs, i.e., quantities which have a specified relation to the inputs” (Knuth 1973:5). ↩
Whether or not a process with random interior processes (not including the input) is an algorithm is debatable. Rogers opines that: “a computation is carried out in a discrete stepwise fashion, without the use of continuous methods or analog devices… carried forward deterministically, without resort to random methods or devices, e.g., dice” (Rogers 1987:2). ↩
Secondary
• • •