Important Computational Complexity Classes

computational complexities diagram

The image above is a portion of an infographic I made recently on computational complexity classes, which is the topic at the foundation of things like big O notation and the P vs. NP Millennium Prize problem that you can win $1,000,000 for solving.

It shows the relation between common complexity classes such as P (problems that are solvable in polynomial time as the size of the input grows) or EXP (problems that are solvable in exponential time as the size of the input grows) in a way I find much more clear than the usual bubble diagram.

Here is the full infographic, available as a PNG, PDF, or SVG (also on GitHub):

Important Computational Complexity Classes infographic

Please feel free to use it as an educational resource.

I made it based on the first 50 minutes or so of the truly excellent Lecture 1 of MIT 6.890 Algorithmic Lower Bounds: Fun with Hardness Proofs from Fall 2014 with instructor Erik Demaine where he draws the same diagram:

blackboard diagram from lecture video

The entire course is available freely online, as are many other MIT courses, including 6.006 Introduction to Algorithms from Fall 2011 which I have watched every lecture of and strongly recommend. (Though the 2020 version is probably more up to date.)