Renaissance Labs · Mathematics

68 Computer science

Computer science

Are there problems whose answers are quick to check but hopelessly slow to find?

The mathematical side of computer science studies what can be computed and at what cost. It defines precise models of computation, designs algorithms and data structures, and proves limits on what any algorithm can achieve. It also covers the theory of programming languages and software, formal languages, databases, artificial intelligence and the use of computers in mathematical research.

Results come in two kinds. Upper bounds exhibit an algorithm and analyze its running time or memory use. Lower bounds and impossibility results show that no algorithm can do better, often by reducing one problem to another. The area borrows heavily from logic, combinatorics, probability and algebra, and it returns questions to them, such as the P versus NP problem.

How many comparisons to sort?

Eight distinct numbers can be arranged in 8⋅7⋯2⋅1=403208 \cdot 7 \cdots 2 \cdot 1 = 40320 orders. A sorting method that only compares pairs learns one yes or no answer per comparison, so kk comparisons can tell apart at most 2k2^k orders. Since 215=32768<403202^{15} = 32768 < 40320, every such method needs at least 16 comparisons on some input. Merge sort needs at most 17 on eight numbers.

Central objects

Algorithm
A finite, precise procedure that transforms an input into an output.
Turing machine
A simple abstract computer with a tape and a finite set of rules, used to define computability.
Complexity class
A set of problems solvable within a given resource bound, such as P or NP.
Reduction
A way of transforming one problem into another, showing the second is at least as hard.
Data structure
A way of organizing data so that chosen operations are fast.
Formal language
A set of strings over a finite alphabet, often described by a grammar or an automaton.
Boolean circuit
A network of AND, OR and NOT gates computing a function of input bits.

Landmark theorems

  1. Undecidability of the halting problem1936

    There is no algorithm that takes as input a Turing machine and an input string and correctly decides, in every case, whether the machine eventually halts on that input.

  2. Kleene's theorem

    A language is accepted by some finite automaton if and only if it is described by some regular expression.

  3. Time hierarchy theorem

    If ff and gg are time-constructible functions with f(n)log⁡f(n)=o(g(n))f(n)\log f(n) = o(g(n)), then some language is decidable by a deterministic Turing machine in time O(g(n))O(g(n)) but not in time O(f(n))O(f(n)). In particular, P is strictly contained in EXP.

  4. Cook-Levin theorem1971

    Boolean satisfiability is NP-complete: it lies in NP, and every problem in NP reduces to it in polynomial time.

  5. PCP theorem1992

    Every language in NP has a verifier that uses O(log⁡n)O(\log n) random bits, reads only a constant number of bits of a proposed proof, always accepts a correct proof of a true statement, and rejects every proposed proof of a false statement with probability at least 1/21/2.

  6. AKS primality theorem2002

    There is a deterministic algorithm that decides whether a given integer is prime in time polynomial in the number of its digits.

Open problems and frontiers

  • P versus NP

    Can every problem whose solutions can be verified in polynomial time also be solved in polynomial time?

  • Exponent of matrix multiplication

    Can two n×nn \times n matrices be multiplied using O(n2+ε)O(n^{2+\varepsilon}) arithmetic operations for every ε>0\varepsilon > 0?

  • Complexity of integer factoring

    Is there a polynomial-time algorithm on a classical computer that factors integers?

Environments in this area

No environment in this area yet. Each environment is a generator of Lean tasks with a verifier: see how they are built and add one.

Contribute an environment