Search topics and sections

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]

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
The two traditional ICALP tracks of theoretical computer scienceTheoretical computer scienceTrack A: Algorithms,Complexity and GamesTrack B: Automata, Logic, Semantics,and Theory of ProgrammingAlgorithmsData structuresComputational complexityCryptographyQuantum computingLearning theoryComputational geometryDistributed computingAlgorithmic game theoryAutomataLogic in computer scienceSemantics of programming languagesProgram verificationType systemsConcurrent systems
ICALP has traditionally split theoretical computer science into two tracks. The topics shown are examples from its 2025 call for papers.

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]

A Turing machinefinitely many statesControl10110……tape (unlimited)state qLR
A Turing machine: a control unit in state qq, one of finitely many states, drives a read/write head over a tape that is unlimited in both directions. The head reads the cell under it, writes a symbol, and moves one square left (L) or right (R).

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)n(ab)^n: "ab" repeated
Context-free Pushdown automaton (finite automaton plus a stack) anbna^n b^n: 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 anbna^n b^n is context-free but not regular.[8] Recognizing it needs memory that grows with the input, which a finite automaton lacks.

Chomsky hierarchy of formal languagesComputably enumerableTuring machineContext-sensitiveLinear bounded automatonContext-freePushdown automatonRegularFinite automaton(ab)nanbn
The Chomsky hierarchy as nested classes of formal languages. Each class is recognized by a more powerful machine than the class inside it. The language (ab)n(ab)^n is regular, while anbna^n b^n is context-free but not regular.

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]

  1. Assume some machine could decide which programs produce an endless sequence of binary digits.
  2. Use it to list every such sequence that a machine can compute.
  3. Build a new sequence by flipping the kk-th digit of the kk-th sequence on the list.
  4. The new sequence is computable but differs from every listed sequence, which is a contradiction.
Diagonal argument griddigit 1digit 2digit 3digit 4digit 5……⋮⋮011011100000011101100101010101…Sequence 1Sequence 2Sequence 3Sequence 4Sequence 5New sequenceflip each diagonal digitDiffers from sequence kat digit k, so it isnot on the list
Diagonal argument: five listed binary sequences form the rows of a grid, and flipping each diagonal digit gives a new sequence (1 0 1 0 1) that differs from sequence kk at digit kk. The new sequence differs from every row, so it cannot appear anywhere on the list.

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 nn.[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 nn.[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]

f(n)=O(g(n))  ⟺  there are constants c>0, n0>0 with 0≤f(n)≤c g(n) for all n≥n0f(n) = O(g(n)) \iff \text{there are constants } c > 0,\ n_0 > 0 \text{ with } 0 \le f(n) \le c\,g(n) \text{ for all } n \ge n_0

Here f(n)f(n) is the function being bounded, such as a running time, and g(n)g(n) is a simpler comparison function. The constant cc is a multiplier, and n0n_0 is the size beyond which the bound holds.[12]

Related notations give lower bounds (Ω\Omega) and tight bounds (Θ\Theta).[12] For example, merge sort runs in Θ(nlg⁡n)\Theta(n \lg n) worst-case time and insertion sort in Θ(n2)\Theta(n^2), 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 n2n^2, from exponential ones such as 2n2^n.[2] The gap is huge. For n=100n = 100, n2n^2 is 10,000, while 21002^{100} is about 1.3×10301.3 \times 10^{30}.

Growth rates of n log n, n squared, and 2 to the n 0 10 20 30 40 Input size n 1 10³ 10⁶ 10⁹ 10¹² Steps (log scale) 2ⁿ n² n log₂ n large gap
On a logarithmic scale, where equal steps up mean multiplying by the same factor, 2n2^n is a straight line reaching about 1.1×10121.1 \times 10^{12} at n=40n = 40, while n2n^2 reaches only 1,600 and nlog⁡2nn \log_2 n about 213. The shaded region marks the large gap between n2n^2 and 2n2^n.

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]
P and NP complexity classes, assuming P is not equal to NPIf P ≠ NP (unproved)NPsolutions easy to checkPeasy to solveSortingNP-completeSATKarp's 21problems
Complexity classes drawn on the unproved assumption that P≠NPP \neq NP. P (problems that are easy to solve, such as sorting) and the NP-complete problems (such as SAT and Karp's 21 problems) are separate regions inside NP, the class of problems whose solutions are easy to check.

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

  1. About SIGACT, ACM SIGACT.
  2. Mathematics and Computation (draft), Avi Wigderson, Princeton University Press, 2019.
  3. Turing Machines, Stanford Encyclopedia of Philosophy.
  4. Stephen A. Cook, A.M. Turing Award Laureate, Association for Computing Machinery.
  5. Future ICALPs, European Association for Theoretical Computer Science.
  6. ICALP 2025 Call for Papers, European Association for Theoretical Computer Science, 2025.
  7. The Church-Turing Thesis, Stanford Encyclopedia of Philosophy.
  8. Formal language theory: refining the Chomsky hierarchy, Gerhard Jäger and James Rogers, Philosophical Transactions of the Royal Society B, 2012.
  9. Michael O. Rabin, A.M. Turing Award Laureate, Association for Computing Machinery.
  10. Did Turing prove the undecidability of the halting problem?, Joel David Hamkins, Journal of Logic and Computation, 2026.
  11. Juris Hartmanis, A.M. Turing Award Laureate, Association for Computing Machinery.
  12. Introduction to Algorithms, Chapter 3: Growth of Functions, Cormen, Leiserson, Rivest, and Stein, MIT Press.
  13. P vs NP, Clay Mathematics Institute.
  14. Gödel Prize, ACM SIGACT.
  15. The Millennium Prize Problems, Clay Mathematics Institute and American Mathematical Society, 2006.
  16. Whitfield Diffie, A.M. Turing Award Laureate, Association for Computing Machinery.
  17. Leslie G. Valiant, A.M. Turing Award Laureate, Association for Computing Machinery.
  18. 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.
  19. A Mathematical Theory of Communication (1948), IEEE Xplore.
  20. IEEE Symposium on Foundations of Computer Science, IEEE Computer Society.
  21. ACM Symposium on Theory of Computing, ACM SIGACT.
  22. Knuth Prize, ACM SIGACT.

Figure

Subtopics

Aaron SidfordACM SIGACTActor model theoryAlgorithmAlgorithmic game theoryAlgorithmic information theoryAlgorithmic techniqueAnalysis of algorithmsAnalysis of Boolean functionsAravind JoshiAsymptotic analysisAutomata theoryBrendan McKay (mathematician)Bruno CourcelleCanonical formCertifying algorithmCoding theoryCombinatorics on wordsComputational complexityComputational complexity theoryComputational geometryComputational learning theoryComputational number theoryComputational social choiceComputational topologyComputer algebraCryptographyData structureDIMACSDiscrete Mathematics & Theoretical Computer ScienceEATCS AwardEli Ben-SassonEmil PostErdős LecturesEuropean Association for Theoretical Computer ScienceEvent structureExtractor (mathematics)Formal grammarFormal languageFormal methodsFormal verificationFrequency momentsGödel PrizeIMU Abacus MedalInnovations in Theoretical Computer ScienceInstitute for Advanced StudyInstitute of Mathematical Sciences, ChennaiInstitute of Mathematics, Physics, and MechanicsInternational Colloquium on Automata, Languages and ProgrammingInternational Conference on Concurrency TheoryIsolation lemmaJohn von NeumannJournal of the ACMKnuth PrizeL-notationLenore BlumLogic in computer scienceMark JerrumMathematical ReviewsModels of parallel computationMonge arrayNati LinialNatural computingParis Kanellakis AwardPEPAPhysics of computationPresburger AwardProgramming language theoryPumping lemma for context-free languagesQuantum computingRegion connection calculusReversible computingRewritingSemantics (programming languages)SIAM Journal on ComputingSimons Institute for the Theory of ComputingSmallest grammar problemSortingSymposium on Foundations of Computer ScienceSymposium on Theoretical Aspects of Computer ScienceSymposium on Theory of ComputingSyntactic monoidTennenbaum's theoremThe Turing GuideTheoretical Computer Science (journal)Theoretical cryptographyTheory of computationTheory of ComputingTrace monoidValiant–Vazirani theoremVan Benthem's theoremZvi Galil