Skip to content

Algorithm

Version
v4 · 2026-10-17 · History
Prime #
11
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Also from
Mathematics
Related primes
Function (Mapping)

Core Idea

Step-by-step procedure for solving a problem.

How would you explain it like I'm…

Step-by-Step Recipe

When you make a peanut butter sandwich, you do the same steps in the same order every time: get bread, open jar, spread, close. If you follow the steps just right, you always end up with a sandwich. A recipe like that, written so anyone can follow it, is an algorithm.

Recipe of Exact Steps

An algorithm is a list of steps that takes some starting stuff and turns it into a result. The steps have to be clear enough that anyone — or even a machine — could follow them without guessing. There must be a finite number of steps, each step must be unambiguous, and the procedure has to stop. A recipe, the long-division method, and instructions for tying your shoes are all algorithms. The point isn't just what answer you want; it's the exact, repeatable way of getting there.

Step-by-Step Procedure

An algorithm is a finite, definite, effective procedure for transforming inputs into outputs by a prescribed sequence of steps. The essential commitment is to *procedure*: not just what the answer is (that's a function) but the ordered, mechanically executable way of producing it. Every algorithm specifies its admissible inputs, a finite sequence of unambiguous steps, a termination condition it is guaranteed (or expected) to reach, and the result it produces at termination. The classical constraints — finiteness (it ends), definiteness (each step is unambiguous), and effectiveness (each step can actually be carried out) — together ensure the procedure can be executed without needing intelligence or judgment to fill in gaps.

 

An algorithm is a finite, definite, effective procedure for transforming inputs into outputs by a sequence of prescribed steps. The essential commitment is to *procedure*: not merely what the output should be — that is a function, a mathematical mapping — but the ordered, mechanically executable way of producing it. Every algorithm specifies four ingredients: (1) its admissible inputs, the class of objects it operates on; (2) a finite sequence of unambiguous steps; (3) a termination condition that the procedure is guaranteed (or in randomized cases, expected) to reach; and (4) a result it produces at termination. The classical constraints, articulated in Knuth's standard treatment, are finiteness (the procedure halts in a finite number of steps), definiteness (each step is precisely specified, with no ambiguity), and effectiveness (each step is sufficiently basic that it can in principle be carried out exactly by a person with paper and pencil). Together these constraints ensure the procedure can be executed without appeal to intelligence or judgment. The distinction between algorithm and function is structural: many distinct algorithms can compute the same function (e.g., several sorting algorithms all sort), and one algorithm's complexity profile and resource requirements can differ sharply from another's even when their outputs agree.

Broad Use

Guides reasoning in structured problem-solving (e.g., recipes, workflows, or business processes).

Clarity

Breaks processes into repeatable, structured steps, like recipes or sorting algorithms.

Manages Complexity

Standardizes problem-solving into repeatable steps.

Abstract Reasoning

Encourages structured, sequential reasoning and process optimization.

Knowledge Transfer

Found in computer science, logistics, and medicine (diagnostic protocols).

Example

A navigation app uses Dijkstra's algorithm to find the shortest path between two locations.

Relationships to Other Abstractions

Current abstraction Algorithm Prime

Parents (1) — outgoing typed relations

  • Algorithm presupposes, conditional Function (Mapping) Prime

    An algorithm presupposes Function Mapping when its complete declared inputs determine one terminating output; unmodeled random choices or partial behavior fall outside this condition.

    Condition / exception The procedure's extensional result is total and single-valued on a fully declared input domain; any random choices or relevant environment state are fixed as explicit inputs, and every admitted execution in that domain terminates with one result.

Children (80) — abstractions linked here by typed relations

  • AKS primality test Domain-specific is a kind of Algorithm

    AKS is a deterministic finite procedure for deciding primality.

  • Alternating-Direction Implicit Method Domain-specific is a kind of Algorithm

    Alternating implicit solves form a definite numerical procedure for a specified target.

  • Bisection Method Domain-specific is a kind of Algorithm

    Algorithm is the strict parent because bisection prescribes finite executable steps, maintains a correctness invariant, terminates under a tolerance rule, and has an explicit evaluation bound.

  • Block walking Domain-specific is a kind of Algorithm

    Block walking is a domain-specific kind of Algorithm: Block walking is a combinatorial proof technique that traverses structured blocks of a configuration according to local transition rules so a global counting, ordering, or existence result follows from the walk.

  • Bruun's FFT algorithm Domain-specific is a kind of Algorithm

    It is a finite computational procedure for the DFT.

Hierarchy path (1) — routes to 1 parentless root

Not to Be Confused With

  • Algorithm is not Transformation because transformation is a general mapping rule from inputs to outputs; an algorithm is a sequence of deterministic steps that, when executed, performs a computation or transformation—transformation is the abstract mapping; algorithm is the executable procedure.
  • Algorithm is not Recursion because recursion is the self-referential pattern where a function calls itself with reduced problem size; an algorithm may use recursion as a technique but can also use iteration or other control structures—recursion is a specific control pattern; algorithm is the broader executable procedure.
  • Algorithm is not Heuristic because a heuristic is a practical rule or shortcut that produces good (but not guaranteed optimal) results efficiently; an algorithm is a step-by-step procedure that is deterministic and guaranteed to terminate with a specified output—heuristic sacrifices optimality for efficiency; algorithm guarantees correctness.
  • Algorithm is not Iteration because iteration is the repetition of a process; an algorithm may use iteration but also uses other control structures (conditionals, recursion)—iteration is a control technique; algorithm is the full executable procedure.
  • Algorithm is not Sequencing because sequencing is the ordering of actions in time; an algorithm specifies not just the sequence but the logical control flow, conditionals, and data transformations—sequencing is the ordering; algorithm is the complete procedure with logic and data structures.