Computing Library › Glossary
Glossary

Algorithm

A finite, unambiguous procedure that transforms inputs into outputs to solve a problem.

Definition

An algorithm is a precise, finite sequence of steps that solves a class of problems, taking valid inputs to correct outputs. It must be unambiguous, terminate, and be effective, with each step executable in finite time.

The same problem often admits many algorithms with different trade-offs in time, memory, simplicity, and numerical stability. Choosing among them is an engineering decision informed by the expected input size and the cost of each resource, not a search for one universally best method.

Correctness and efficiency are separate concerns, and both demand evidence: a proof or careful argument that the algorithm always produces the right answer, and an analysis of how its cost grows. History is full of plausible procedures that fail on edge cases or degrade catastrophically at scale. The discipline of algorithm design is as much about establishing these guarantees as about having the idea, which is why analysis accompanies invention.

Qualities of a good algorithm

Why it matters

Algorithms are the intellectual core of computing, independent of any language or machine. The choice of algorithm often matters far more than hardware: a better algorithm can turn an intractable problem into a routine one, a difference captured by asymptotic complexity.

Fusion connection

The plasma physics codes Kronos runs are, at heart, carefully chosen numerical algorithms; selecting efficient, stable ones is what makes large simulations feasible.