Theoretical computer science
Theoretical computer science (TCS) is the part of computer science and mathematics that studies computation with mathematical proof.[1][2] It asks three broad kinds of questions.
- Which problems can computers solve at all?
- How much time and memory do they need?
- What do randomness, many processors, secrecy, and quantum physics make possible?
The field began with Alan Turing's 1936 paper. It defined an abstract computer now called the Turing machine and proved that some basic tasks cannot be computed.[2]
TCS results are about mathematical models, not particular machines. So a proof that no Turing machine can solve a problem means that no computer we could build could solve it either, as long as the model is accepted as a reasonable model of computers.[3]
Basic ideas
TCS works with a few core ideas. Each has a precise mathematical definition.
- A computational problem is a question with an input and a required output, such as "put this list in order".
- An algorithm is a finite, step-by-step method for solving a problem.
- A model of computation is a mathematical description of a machine that runs algorithms. The Turing machine was the first to make "algorithm" precise.[2]
- Resources are what a computation uses up, such as time, memory, and communication.[2] Time is counted as the number of steps a computation takes, as a function of the size of its input.[4]
The field asks two kinds of questions about problems.[2]
- Whether a problem can be solved by any algorithm at all. This is the subject of computability theory.
- How much time and memory a solvable problem needs. This is the subject of computational complexity theory, which grew in the 1960s.
TCS has a mathematical side. Researchers prove theorems and follow mathematical taste, as in any branch of mathematics.[2]
It also has a practical side. New technology keeps raising new kinds of computation that need theoretical models, and the theory feeds ideas back into practice.[2]
Main branches
The field covers many areas. ACM SIGACT, a professional group for the field, lists these:[1]
- algorithms
- data structures (ways to store and organize data so programs can use it)
- computational complexity
- parallel and distributed computation
- probabilistic computation
- quantum computation
- automata theory
- information theory
- cryptography
- program semantics and verification
- machine learning
- computational biology (computing applied to problems in biology)
- computational economics (computing applied to problems in economics)
- computational geometry (solving geometric problems by computation)
- computational number theory and algebra (using computation to study numbers and algebra)
The table below gives the main question and an example for several of these branches.
| Branch | Main question | Example |
|---|---|---|
| Algorithms and data structures | How can a problem be solved quickly? | Sorting a list |
| Complexity theory | How much time or memory does a problem need? | The P versus NP problem |
| Computability | Can the problem be solved at all? | The halting problem |
| Automata and formal languages | What can simple machines recognize? | Finite automata |
| Cryptography | How can hard problems protect secrets? | Public-key cryptography |
| Learning theory | When can a machine learn from examples? | PAC learning |
| Quantum computation | What can quantum computers do faster? | Shor's algorithm |
| Logic, semantics, and verification | What do programs mean, and are they correct? | Proving a program meets its specification |
Two broad halves
The field is often split into two halves. The International Colloquium on Automata, Languages and Programming (ICALP) has traditionally divided its program into two tracks.[5] Its 2025 call for papers lists typical topics for each.[6]
| Track | Name | Some typical topics |
|---|---|---|
| A | Algorithms, Complexity and Games | Design and analysis of algorithms, data structures, computational complexity, cryptography, quantum computing, computational learning theory, computational geometry, distributed computing |
| B | Automata, Logic, Semantics, and Theory of Programming | Automata, logic in computer science, semantics of programming languages, program verification, type systems, models of concurrent systems |
Models of computation
A model of computation fixes exactly what a single step of a computation is. This lets researchers prove statements about all algorithms at once.
The Turing machine
A Turing machine is a theoretical device with a finite number of states and an endless tape divided into squares.[3] A state is the machine's current condition, one of a fixed, finite list.[3]
Each square holds one symbol, and at each moment the machine reads one square. Depending on its state and that symbol, it writes a symbol, moves one square left or right, and changes state.[3]
The model assumes unlimited memory and unlimited time. This keeps the definition from ruling out a function only because a real machine would run out of room.[3]
Turing also built a universal Turing machine. Given the description of any other Turing machine, it carries out what that machine computes.[3]
The Church-Turing thesis
An effective method is a finite set of exact, step-by-step instructions that a person can carry out without insight or ingenuity to get an answer.[7]
In 1936 Alonzo Church and Alan Turing each gave an exact version of this informal idea.[7] Church used functions definable in the lambda calculus, and Turing used his machines. Turing proved the two describe the same functions.[7]
The Church-Turing thesis states that every effective computation can be carried out by a Turing machine.[7] It is a claim about an informal idea, so it cannot be proved like a theorem. Emil Post called Church's version a "working hypothesis" that needs continual checking.[7]
Automata and the Chomsky hierarchy
Weaker machines than the Turing machine are also studied. They are easier to analyze and match many practical tasks.
A finite automaton has finitely many states and reads its input one symbol at a time, with no other memory.[8] A nondeterministic machine may have several possible moves at each step.[9]
Michael Rabin and Dana Scott introduced nondeterministic machines in their 1959 paper on finite automata.[9]
The Chomsky hierarchy, from Noam Chomsky's 1956 work, sorts formal languages (sets of strings) into four levels of increasing complexity.[8] Each level matches a kind of machine.
| Level | Machine that recognizes it | Example language |
|---|---|---|
| Regular | Finite automaton | : "ab" repeated |
| Context-free | Pushdown automaton (finite automaton plus a stack) | : some a's, then the same number of b's |
| Context-sensitive | Linear bounded automaton (Turing machine whose tape length is at most a fixed multiple of the input length, plus a constant) | |
| Computably enumerable | Turing machine |
A computably enumerable language is one whose strings a Turing machine can recognize. The machine answers "yes" for every string in the language, but on a string outside it, it may give another answer or run forever.[8]
The language is context-free but not regular.[8] Recognizing it needs memory that grows with the input, which a finite automaton lacks.
Limits of computation
Some precisely stated problems cannot be solved by any algorithm. A problem with a yes-or-no answer is called undecidable when no Turing machine answers it correctly for every input.
The Entscheidungsproblem
David Hilbert and Wilhelm Ackermann called the Entscheidungsproblem "the main problem of mathematical logic" in 1928.[7] It asked for an effective method to decide whether any formula of first-order logic is provable.[7]
First-order logic is the standard logic of "and", "or", "not", "for all", and "there exists", used to make statements about objects and their relations. A formula is provable when it can be derived step by step from the axioms using only the rules of the logic.[7]
Church and Turing each showed in 1936 that no such method exists, with Church publishing a few months earlier.[7]
The halting problem
The halting problem asks whether a given program, run on a given input, will ever stop. It is undecidable.[10] Its history has several steps.[10]
- Turing's 1936 paper proved closely related results, such as that no machine can decide whether a given program will ever print a certain symbol.
- Stephen Kleene gave the familiar self-referential proof for the halting problem in his 1952 book Introduction to Metamathematics. The proof runs a machine on its own code number.
- The phrase "halting problem" first appears in Martin Davis's 1958 book Computability and Unsolvability.
Turing's printing problem is easily converted into the halting problem and back. Turing is commonly credited with the result, and Hamkins argues that a qualified credit is fair.[10]
The diagonal argument
Turing's proofs adapt Cantor's diagonal argument.[3][10]
- Assume some machine could decide which programs produce an endless sequence of binary digits.
- Use it to list every such sequence that a machine can compute.
- Build a new sequence by flipping the -th digit of the -th sequence on the list.
- The new sequence is computable but differs from every listed sequence, which is a contradiction.
Measuring efficiency
A step is one basic operation of a fixed model of computation. Running time is the number of steps, written as a function of the input size .[4]
For example, Hartmanis and Stearns measured time on the multi-tape Turing machine, a Turing machine with more than one tape.[11][3] They chose it because it was thought closer to real computers.[3]
Researchers usually study the worst case, the largest running time over all inputs of size .[12] Constant factors and smaller terms are dropped, because for large inputs the growth rate matters more than they do.[12]
Big O notation
Big O notation states an upper bound on growth.[12]
Here is the function being bounded, such as a running time, and is a simpler comparison function. The constant is a multiplier, and is the size beyond which the bound holds.[12]
Related notations give lower bounds () and tight bounds ().[12] For example, merge sort runs in worst-case time and insertion sort in , so merge sort wins once inputs are large enough.[12]
This style of study is called asymptotic analysis. It is central to the analysis of algorithms.
Polynomial and exponential time
Complexity theory separates polynomial running times, which are bounded by a fixed power of the input size such as , from exponential ones such as .[2] The gap is huge. For , is 10,000, while is about .
Problems solvable in polynomial time are treated as efficiently solvable. They form the class called P.[2][11]
Complexity theory and P versus NP
Juris Hartmanis and Richard Stearns founded complexity theory in papers of 1964 and 1965.[11]
They named the field and introduced the complexity class, the set of all problems solvable within a given amount of a resource.[11]
They also proved that more time lets machines solve more problems.[11] They received the Turing Award for this work.[11]
P and NP
Two classes are central.[4]
- P holds problems that are easy to solve, meaning solvable in polynomial time.
- NP holds problems whose proposed solutions are easy to check, meaning checkable in polynomial time.
The Clay Mathematics Institute gives an example. Choose 100 of 400 students for a dormitory so that no pair on a list of incompatible students is chosen together. Checking a proposed choice is easy, but the number of possible choices is greater than the number of atoms in the known universe, so trying them all is hopeless.[13]
NP-completeness
In 1971 Stephen Cook showed that some problems in NP, now called NP-complete, are as hard as any problem in NP.[4]
This has a strong consequence. If any one NP-complete problem can be solved in polynomial time, then every problem in NP can.[4]
Cook's first example was the Boolean satisfiability problem (SAT).[4]
His main tool was the reduction, a fast way to turn one problem into another.[4]
NP-complete problems turned out to be everywhere.
- In 1972 Richard Karp proved 21 problems from combinatorics (the mathematics of counting and arranging objects), optimization, and graph theory NP-complete.[4]
- In 1979 Michael Garey and David Johnson's book listed over 300 NP-complete problems.[4]
- Today the known NP-complete problems number in the thousands.[4]
The open question
The P versus NP problem asks whether every problem whose solutions are easy to check is also easy to solve. Cook and Leonid Levin stated it separately in 1971, according to the Clay Institute.[13] It is still unsolved.[4]
Kurt Gödel had raised a form of the question earlier, in a letter to John von Neumann shortly before von Neumann's death.[14]
In 2000 the Clay Institute made it one of seven Millennium Prize Problems, each with a US$1 million prize.[15]
Why lower bounds are hard
Proving P differs from NP needs a lower bound. Here that means a proof that some problem cannot be solved by any algorithm in polynomial time.[2]
Much of this work uses Boolean circuits, a hardware-like model built from logic gates. Strong lower bounds are known for restricted circuits, and "barrier" results explain why current methods seem unable to reach general models.[2]
Hardness as a tool
Hard problems are not only obstacles. Several branches use them, or study how new models change what is hard.
Cryptography
Whitfield Diffie and Martin Hellman's paper "New Directions in Cryptography", published in 1976, set out public-key cryptography.[16] Each user has a public key for locking messages and a private key for unlocking them. Computing the private key from the public one must take too long to be useful.[16]
British intelligence (GCHQ) had found similar ideas earlier but kept them secret.[16]
Cook's reductions support complexity-based approaches to cryptographic security.[4]
Learning
Leslie Valiant's probably approximately correct (PAC) model gives a number-based test for when a machine can be said to learn.[17] A learner uses past examples to form a hypothesis whose future error is controlled. The model started the area now called computational learning theory.[17]
Quantum computation
In 1994 Peter Shor presented quantum algorithms that factor integers and compute discrete logarithms in polynomial time. He presented them at the Symposium on Foundations of Computer Science.[18]
A discrete logarithm problem asks for the exponent that turns a given base into a given number under repeated multiplication.[18]
Both problems are thought hard for ordinary computers. Several cryptosystems, systems that protect messages with encryption, are built on them.[18]
Information
Claude Shannon's 1948 paper "A Mathematical Theory of Communication" created information theory.[19]
Information theory studies how much information can be sent or stored. SIGACT lists it among the topics of TCS.[1]
History
TCS grew out of mathematical logic in the 1930s and became a field of its own from the 1960s.[2][11]
| Year | Event |
|---|---|
| 1936 | Church and Turing show the Entscheidungsproblem unsolvable; Turing defines his machine[7] |
| 1943 | Warren McCulloch and Walter Pitts's study of neural networks (computing models inspired by nerve cells in the brain) starts automata theory[9] |
| 1948 | Shannon founds information theory[19] |
| 1956 | Chomsky's three models of language lead to the Chomsky hierarchy[8] |
| 1959 | Rabin and Scott introduce nondeterministic machines[9] |
| 1960 | First meeting of what became the Symposium on Foundations of Computer Science (FOCS)[20] |
| 1964 to 1965 | Hartmanis and Stearns found complexity theory[11] |
| 1969 | First ACM Symposium on Theory of Computing (STOC)[21] |
| 1971 | Cook introduces NP-completeness[4] |
| 1972 | Karp proves 21 problems NP-complete[4] |
| 1976 | Diffie and Hellman publish public-key cryptography[16] |
| 1994 | Shor's quantum factoring algorithm[18] |
| 2000 | P versus NP named a Millennium Prize Problem[15] |
Hartmanis's work helped set up computer science as a discipline different from mathematics, physics, and electrical engineering.[11]
Research community
ACM SIGACT promotes research in theoretical computer science and runs an awards program.[1]
SIGACT works with the European Association for Theoretical Computer Science (EATCS) on the Gödel Prize.[14]
Conferences
- STOC, sponsored by SIGACT, has met every year since 1969 and is held in spring.[21][20]
- FOCS, sponsored by an IEEE technical committee, is held each autumn. It began in 1960 as the Symposium on Switching Circuit Theory and Logical Design and took its present name in 1975.[20]
- ICALP, run by EATCS, traditionally splits its program into Track A and Track B. From 2009 it also offered a Track C on foundations of networks and multi-agent systems.[5]
Prizes
- The Gödel Prize, given jointly by EATCS and SIGACT, honors outstanding papers and includes US$5,000.[14]
- The Knuth Prize, given by SIGACT and the IEEE committee, honors a sustained record of major contributions. It is named for Donald Knuth.[22]
- Many Turing Awards have gone to theorists, including Cook, Hartmanis and Stearns, Rabin and Scott, Valiant, and Diffie and Hellman.[4][11][9][17][16]
Open questions
Many central questions are still open.
- Whether P equals NP.[13]
- How to prove strong lower bounds for general models such as unrestricted circuits.[2]
- How properties of computation beyond time and memory, which matter in new settings, can be modeled and measured.[2]
References
- About SIGACT, ACM SIGACT.
- Mathematics and Computation (draft), Avi Wigderson, Princeton University Press, 2019.
- Turing Machines, Stanford Encyclopedia of Philosophy.
- Stephen A. Cook, A.M. Turing Award Laureate, Association for Computing Machinery.
- Future ICALPs, European Association for Theoretical Computer Science.
- ICALP 2025 Call for Papers, European Association for Theoretical Computer Science, 2025.
- The Church-Turing Thesis, Stanford Encyclopedia of Philosophy.
- Formal language theory: refining the Chomsky hierarchy, Gerhard Jäger and James Rogers, Philosophical Transactions of the Royal Society B, 2012.
- Michael O. Rabin, A.M. Turing Award Laureate, Association for Computing Machinery.
- Did Turing prove the undecidability of the halting problem?, Joel David Hamkins, Journal of Logic and Computation, 2026.
- Juris Hartmanis, A.M. Turing Award Laureate, Association for Computing Machinery.
- Introduction to Algorithms, Chapter 3: Growth of Functions, Cormen, Leiserson, Rivest, and Stein, MIT Press.
- P vs NP, Clay Mathematics Institute.
- Gödel Prize, ACM SIGACT.
- The Millennium Prize Problems, Clay Mathematics Institute and American Mathematical Society, 2006.
- Whitfield Diffie, A.M. Turing Award Laureate, Association for Computing Machinery.
- Leslie G. Valiant, A.M. Turing Award Laureate, Association for Computing Machinery.
- Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, Peter W. Shor, arXiv (expanded version of a paper in the Proceedings of the 35th Annual Symposium on Foundations of Computer Science, 1994), 1995.
- A Mathematical Theory of Communication (1948), IEEE Xplore.
- IEEE Symposium on Foundations of Computer Science, IEEE Computer Society.
- ACM Symposium on Theory of Computing, ACM SIGACT.
- Knuth Prize, ACM SIGACT.
