Computation
Computation is any process that produces a result by following a fixed set of exact rules, one step at a time. Adding two numbers on paper, sorting a list of names, and running an app on a phone are all computations. The rules are often written as an algorithm, and whoever follows them needs care but no insight or cleverness.[1]
In the 1930s, Alan Turing, Alonzo Church, and others turned this everyday idea into an exact mathematical one, which is now a core part of computer science.[2] Their work showed that one general-purpose machine can, in principle, do any computation that any other Turing machine (an imaginary rule-following machine, described below), or any ordinary computer, can do. It also showed that some problems can never be solved by computation at all.[2][3]
What a computation is
In logic and mathematics, a step-by-step method is called effective (or mechanical) when it meets four conditions:[1]
- It is written as a finite number of exact instructions, each using a finite number of symbols.
- If followed without error, it gives the desired result in a finite number of steps.
- A person could carry it out with only paper and pencil, at least in principle.
- It needs no insight, intuition, or ingenuity from that person.
A computation is what happens when such a method is carried out on a given input.
An example: Euclid's algorithm
The Euclidean algorithm finds the greatest common divisor of two whole numbers, the largest number that divides both.[4] It runs as follows:
- Divide the larger number by the smaller one and note the remainder.
- Divide the previous divisor by that remainder.
- Repeat step 2 until the remainder is zero. The last number you divided by is the answer.
For 1071 and 462, the steps are 1071 = 2 × 462 + 147, then 462 = 3 × 147 + 21, then 147 = 7 × 21 + 0. The greatest common divisor is 21. Each step is mechanical, so the person doing it does not need to know why the method works.
Formulas and design techniques
Some methods are built for one specific mathematical task. For example, Bellard's formula, published by Fabrice Bellard in 1997, is a formula for computing the nth binary digit of π, which Bellard presented as faster than earlier formulas.[5] A binary digit is a digit in base two, so it is either 0 or 1.
Designers build new algorithms from general strategies called algorithmic techniques. Probably the best known is divide and conquer, which splits a problem into smaller subproblems.[6]
From human computers to machines
Word origin
The English word computation dates from about 1400. It comes from the Latin computare, "to sum up, reckon, compute".[7]
Human computers
For centuries, a computer was a person. Teams of human computers were common until the 1980s.[8]
Computing was a job that needed mathematical skill and the ability to do repeated work.[8]
The job title changed as machines took over. At NASA's Jet Propulsion Laboratory, the title "Computer" was replaced with "Engineer" around 1970.[8]
Turing's model
Turing based his 1936 analysis on human computers, not on machines.[3] The computing machines of his day, such as desk calculators, could do only limited tasks.[3]
Turing instead described an imagined person computing by following fixed rules on a strip of paper divided into squares. This imagined worker became the Turing machine.[3]
Models of computation
In the 1930s, logicians wanted to prove that certain problems have no effective method. To do that, they needed an exact, formal replacement for the informal idea of an effective method.[1][3]
Such a formal definition is called a model of computation.
The Turing machine
A Turing machine is an imaginary device with three parts:[3]
- a tape of unlimited length, divided into squares that each hold one symbol or a blank;
- a head that scans one square at a time;
- a finite set of internal states, of which the machine is in exactly one at any moment.
At each step, the current state and the scanned symbol fully decide what happens next. The machine writes a symbol in the scanned square, moves one square left or right (or, in Turing's original version, stays put), and goes into a new state.[3]
The machine's program is a finite list of rules. Each rule is written as a quintuple, a list of five items:[3]
Here is the current state and is the symbol being scanned. is the symbol to write, says whether to move left, move right, or stay, and is the next state.[3] Standard modern versions add a special halting state, and the computation ends when the machine enters it.[3]
Many variants exist, such as tapes that are infinite in one direction or in both, or different sets of symbols. None of these variants computes more or fewer functions than the original.[3]
Other models
Several other models, with very different designs, appeared between the 1930s and the 1960s.[1] In lambda calculus, a function is called λ-definable when its values can be found by a process of repeated substitution.[1] Post's worker moves along a two-way infinite row of boxes, each of which is either empty or holds a single mark.[1]
| Model | Main people | Year |
|---|---|---|
| General recursive functions | Kurt Gödel, building on Herbrand and others | 1934 |
| Lambda calculus | Church and Kleene, with Rosser | 1932 to 1936 |
| Turing machine | Alan Turing | 1936 |
| Post's worker in a "symbol space" | Emil Post | 1936 |
| Markov algorithms | A. A. Markov | 1951 |
| Register machines | Shepherdson and Sturgis | 1963 |
Equivalence of the models
All of these models turned out to describe the same set of functions.[1] In 1936, Church and Kleene proved that the λ-definable functions are exactly the recursive functions. Turing, who learned of Church's proposal while preparing his own paper, proved that λ-definability and Turing-machine computability are equivalent.[1]
The Church-Turing thesis
The Church-Turing thesis says that every effective computation can be carried out by a Turing machine.[1] In other words, the functions whose values an effective method can find are exactly the functions a Turing machine can compute.
Three facts about the thesis matter most:
- Origin: Church and Turing put forward versions of it independently in the mid 1930s.[1]
- Status: it is not a theorem, because it links an informal idea to a formal one. Post called Church's version a "working hypothesis" and criticized presenting it as a definition.[1]
- Evidence: every exact definition of effective computation proposed so far has been proved equivalent to the others, even though they look very different.[1]
The name comes from Stephen Kleene. He introduced the term "Church's thesis" in 1952, and "Church-Turing thesis" also seems to come from him (1967).[1]
Universal machines
Turing also showed that there are universal machines. A universal Turing machine can compute any function that any other Turing machine computes, by following coded instructions that describe the other machine.[2] So one general-purpose computer is enough, instead of a different machine for each task.[2]
Two further points:
- Memory limit: modern digital computers are universal in this sense, with one limit. A universal Turing machine has unlimited memory, while a real computer's memory can be extended but never without limit.[2]
- Small universal machines: in 2007, Alex Smith, a 20-year-old college student, gave a 40-page proof that Wolfram's 2-state 3-symbol Turing machine is universal and won a $25,000 prize.[9][10] Computer scientist Vaughan Pratt questioned the proof, and part of the debate was over what "universal" should mean.[9]
Limits of computation
Most functions cannot be computed
Most functions are not computable by any Turing machine, and so by no digital computer.[2] The proof is a counting argument, a comparison of how many items are in two sets. It runs in three steps:[2]
- Machines can be listed. Each machine has a finite list of instructions, so all machines can be put into one list. A set that can be listed this way is called countable.
- Functions cannot be listed. Functions over the natural numbers (0, 1, 2, and so on) are uncountable, meaning they cannot all be placed in one complete list.
- So machines fall short. An uncountable infinity is much larger than a countable one, so machines can compute only a tiny part of these functions.
The diagonal method
The diagonal method proves that a set cannot be listed. It assumes a complete list exists, then builds a new item that differs from the first item in its first place, from the second item in its second place, and so on. The new item differs from every item in the list, so the list was not complete.[11]
Cantor introduced this method, now called Cantor's diagonal argument, to prove that the set of real numbers (all the numbers on the number line) is uncountable.[3] Church, Post, and Turing each used a form of the diagonal method to show that particular problems are not computable.[3]
The halting problem
The halting problem asks whether a given program, run on a given input, will eventually stop. No algorithm answers this correctly for every program and input.[12] The proof is by contradiction:[12]
- Suppose a program H(P, I) always correctly says whether program P halts on input I.
- Build a program X that takes a program P as input and runs H(P, P). If H says "halts", X loops forever, and if H says "does not halt", X stops.
- Run X on itself. If H(X, X) says X halts, then X loops forever. If H(X, X) says X does not halt, then X halts.
- Either way H gives the wrong answer, so no such H can exist.
Problems that no algorithm can solve in every case are called undecidable problems.
The Entscheidungsproblem
The theory of computation grew out of a question in logic. The Entscheidungsproblem (German for "decision problem") asks for an effective method to decide, for any statement of first-order logic, whether it can be derived (proved) in that logic.[3] David Hilbert and Wilhelm Ackermann stated the problem in 1928, in an equivalent form.[3]
Turing's 1936 paper used Turing machines to prove that no such method exists, and Church reached the same result independently.[3] Hilbert had hoped every mathematical problem could be solved, declaring in 1930, "We must know. We shall know."[3]
The cost of computation
Computability asks whether a problem can be solved at all. Computational complexity theory asks how much time and memory a solution needs.[13]
Measuring time and space
The worst-case time complexity of a machine is the largest number of basic steps it needs on any input of a given size:[13]
Here is an input, is its size, is a whole number, and is the number of basic steps takes on before it halts with an output.[13]
Space complexity, written , measures memory instead of time. It is defined the same way but counts the memory cells visited or written.[13]
Polynomial and exponential growth
Complexity theory treats a problem as feasible when a Turing machine can solve it in a number of steps bounded by a polynomial in the input size.[13] A polynomial in is a sum of fixed powers of times constants, such as . An exponential count such as instead raises a fixed number to a power that grows with , and it soon becomes enormous:
| Input size | steps | steps |
|---|---|---|
| 10 | 100 | 1,024 |
| 20 | 400 | 1,048,576 |
| 50 | 2,500 | about |
The idea that feasible means polynomial time is called the Cobham-Edmonds thesis. Jack Edmonds first proposed polynomial time as the mark of a "good algorithm" in 1965.[13] The thesis is regarded as less firmly established than the Church-Turing thesis.[13]
Complexity classes
A complexity class is the set of problems that can be solved within a given bound on time or memory.[13] Three central classes are:
- P (polynomial time): problems a Turing machine can solve in a number of steps bounded by a polynomial in the input size.
- NP (nondeterministic polynomial time): problems that some computation of a nondeterministic Turing machine can decide in polynomial time.
- EXP (exponential time): problems solvable in at most steps for some fixed .
These classes nest as P ⊆ NP ⊆ PSPACE ⊆ EXP, where PSPACE is the class of problems solvable with polynomial memory.[13]
It is proved that P is strictly smaller than EXP, but no one knows which of the inclusions in between are strict.[13] Whether P equals NP, the P versus NP problem, is often called the most important open question in theoretical computer science.[13]
Kinds of computation
Computing systems differ in what they process.[2]
| Kind | What it processes | Examples |
|---|---|---|
| Digital | Sequences of separate values, such as 0s and 1s, using operations that depend on each value's position in the sequence | Turing machines, most modern computers |
| Analog | Values that can change smoothly over a range, using calculus operations such as integration (finding totals) and differentiation (finding rates of change) | Analog computers, used mainly to solve systems of differential equations (equations that describe quantities and how they change) |
| Quantum | Qubits (quantum bits), the basic units of information in a quantum computer | Quantum computers |
Quantum computation drew wide interest after Peter Shor showed in 1994 that a quantum algorithm can apparently factor large numbers far faster than any known non-quantum (classical) algorithm.[14] See Shor's algorithm.
There is no proof yet that quantum computers are faster than classical computers in general.[14]
Computations also differ in how they are arranged in time:[2]
- Serial: steps run one after another.
- Parallel: several steps run at once.
In concurrent computing, several computations make progress during overlapping time periods.[15] Parallel computing is a closely related field.
Computation in physical systems
Abstract and concrete computation
The mathematical theory treats computation abstractly, while science and daily life deal mostly with concrete computation in physical systems such as computers and brains.[2] How the two relate is not part of the mathematical theory itself.[2]
This raises the question of what makes a physical system count as computing. Put simply, what do computers have that rocks lack, so that computers compute and rocks, apparently, do not?[2]
Accounts of what it means to compute
Philosophers have offered several answers:[2]
- Simple mapping account: due to Hilary Putnam, it says a physical system performs a computation when its physical states can be mapped onto the computation's states so that physical changes mirror the computational steps.
- Semantic account: computation is the processing of representations, things that stand for something else, such as symbols with meaning. Jerry Fodor's 1981 slogan sums it up as "no computation without representation".
- Mechanistic account: it sorts computing systems by the physical things they process and how their parts work, giving digital, analog, quantum, and neural-network computation.
Physical limits
The physical Church-Turing thesis extends the original thesis from methods to physics. Its bold form says that any physical process can be computed by some Turing machine.[2]
Hypercomputation studies models that go beyond Turing machines.[3] Examples include:
- Oracle machines (Turing, 1939).[3]
- Infinite-time Turing machines (Hamkins and Lewis), which are allowed to keep running through infinitely many steps.[3][16]
- Accelerating Turing machines (Copeland), which do each step in half the time of the step before, so they could finish infinitely many steps in two units of time.[3][17]
None of these models gives an effective method for problems such as the halting problem.[3] Proposed physical examples rely on somewhat artificially arranged systems, and a suggested quantum hypercomputer has been criticized as not physically realistic.[14]
References
- The Church-Turing Thesis, Stanford Encyclopedia of Philosophy, 2023.
- Computation in Physical Systems, Stanford Encyclopedia of Philosophy, 2025.
- Turing Machines, Stanford Encyclopedia of Philosophy, 2025.
- The Euclidean Algorithm, Kansas State University Department of Mathematics.
- Pi Formulas, Algorithms and Computations, Fabrice Bellard, 1997.
- Algorithm design techniques, Anany Levitin, Villanova University.
- Computation: Etymology, Origin and Meaning, Online Etymology Dictionary.
- Before Computers Were Machines, They Were Women, Smithsonian American Women's History Museum.
- $25000 Controversy, Plus Magazine, University of Cambridge, 2007.
- The Prize Is Won; The Simplest Universal Turing Machine Is Proved, Stephen Wolfram Writings, 2007.
- 18.404J Lecture 8: Undecidability, Michael Sipser, MIT OpenCourseWare, 2020.
- CS245 Undecidability, University of Waterloo, 2017.
- Computational Complexity Theory, Stanford Encyclopedia of Philosophy, 2016.
- Quantum Computing, Stanford Encyclopedia of Philosophy, 2024.
- Concurrent computing, IEEE Technology Navigator.
- Infinite Time Turing Machines, Joel David Hamkins and Andy Lewis, arXiv, 1998.
- Hypercomputation: computing more than the Turing machine, Toby Ord, arXiv, 2002.
