Skip to content

#Computational Complexity

1 ideas

We're gathering ideas for this tag. Check back soon!

Get new #Computational Complexity ideas by email

Every Thursday: the week's best ideas, with the newest from #Computational Complexity.

Computational Complexity: A Guide to the Limits of Computation

Computational complexity is the branch of computer science and mathematics that asks how much of a resource a problem genuinely demands. The resources are usually time, meaning the number of steps an algorithm takes, and space, meaning the memory it needs. Its central questions are not about one particular program or one particular machine, but about whole families of problems: what is the cheapest possible way to solve any problem of this kind, and which problems are cheap in principle and which are not.

The field grew out of the theory of computation. Once it was clear that some problems cannot be solved by any algorithm at all, the natural next question was what happens to the problems that can be solved — how hard are they? Complexity theory answers that by measuring cost as a function of input size rather than in seconds, so that conclusions survive changes in hardware. This is why you meet notation like O(n log n) or O(n²): it describes how the workload grows as the input grows, which is what actually matters when data gets large.

The main landscape

Problems are grouped into complexity classes. P contains the problems solvable in time that grows polynomially with the input; these are the ones we consider practically tractable. NP contains problems whose proposed solutions can be checked quickly, even if finding them seems hard. Every problem in P is also in NP, and whether the reverse is true is the most famous open question in the subject — the P versus NP problem. If the two classes turned out to be equal, an enormous range of difficult problems would suddenly have efficient solutions.

Read more

Beside P and NP sit classes describing other resources and other kinds of computation: space-bounded classes like PSPACE, randomised classes, classes defined by circuits, and hierarchies built from interactive proofs and approximation. NP-complete problems — satisfiability being the archetype — are the hardest members of NP, and a fast algorithm for any one of them would give fast algorithms for all of them.

What beginners should know

Start with algorithms and the analysis of running time, since complexity theory is written in that language. Then learn reductions, the technique of showing that one problem is at least as hard as another by translating between them; reductions are the workhorse of nearly every hardness result. Get comfortable with proof by construction and with the idea of a worst-case guarantee.

Two habits help. First, distinguish worst case from average case and from practical performance: a problem can be intractable in theory yet perfectly manageable on the inputs people actually have. Second, expect no answers. Much of the field is a map of open questions, and a well-stated conjecture is a contribution in itself.

You do not need to be a specialist to use the ideas. Knowing roughly where a problem sits tells you whether to search for a clever exact method, settle for an approximation, or accept that only heuristic approaches are realistic.

Videos come from YouTube and posts from Instagram; titles and summaries are our own. All rights belong to their creators.