Session 22 of Software Lessons, “Complexity Theory, Big-O Notation, P=NP,” runs about 24 minutes.
What this session covers
- Overview of complexity theory
- Big-O notation
- Complexity classes
- P=NP (polynomial time versus non-deterministic polynomial time)
Key ideas
- Complexity theory classifies problems by the resources, mainly time and memory, that any algorithm needs to solve them.
- Big-O notation gives an upper bound on growth, so O(n) grows linearly and O(n²) grows with the square of the input size.
- Class P contains problems that can be solved in polynomial time.
- Class NP contains problems whose proposed solutions can be verified in polynomial time.
- Whether P equals NP is a major unsolved problem, and the answer would change what we know about which problems are practically solvable.