Chapter 9Complexity Analysisslides.en.pdf:411

NP, PSPACE, P

Where some problems live (and we don't know the boundaries)

Concept

Complexity classes group problems by the resources needed to solve them.
Three crucial classes:

P — Polynomial time. Decision problems solvable by a deterministic
Turing machine in time O(nk)O(n^k) for some kk.

Examples: reachability in graphs, primality (in P since 2002), shortest path,
sorting verification, satisfiability of Horn formulas.

NP — Nondeterministic Polynomial time. Decision problems whose YES
instances have a certificate verifiable in polynomial time. Equivalently,
solvable by a nondeterministic TM in polynomial time.

Examples: SAT (satisfiability), Hamiltonian cycle, graph coloring, TSP
(decision version), subset sum, clique.

PSPACE — Polynomial space. Problems solvable using O(nk)O(n^k) memory,
regardless of time. By Savitch's theorem, PSPACE = NPSPACE (nondeterministic
polynomial space).

Examples: quantified Boolean formula (QBF), game tree evaluation, regular
expression equivalence.

The chain:

PNPPSPACEP \subseteq NP \subseteq PSPACE

The big open question: P=NPP = NP? Is every problem whose solution is
quickly verifiable also quickly solvable? Most experts believe PNPP \neq NP,
but no proof is known — and a proof would change mathematics, cryptography,
and AI forever.

A reward of $1,000,000 from the Clay Mathematics Institute awaits a
solution. The question is one of seven Millennium Prize Problems.

Why this matters for AI. Many AI tasks — planning, scheduling, reasoning,
constraint satisfaction — are NP-complete or PSPACE-complete in the worst
case. Practical algorithms use heuristics, approximations, or special-case
structure to dodge the worst case.

Animation — complexity classes
Transcript — click a line to jump6 cues
  1. 0.0sComplexity classes
  2. 1.0sOuter green rounded box draws: PSPACE, polynomial space
  3. 2.0sMiddle amber box draws inside: NP, polynomial-time verifiable
  4. 3.0sInner cyan box draws: P, polynomial time
  5. 4.4sThree lines list canonical problems for each class
  6. 6.3sP subset NP subset PSPACE, inclusions are conjectured strict
Practice — score 100% to advance
Multiple choice
Q1
What is the class P?
Q2
What is the class NP?
Q3
What is the relationship between P, NP, PSPACE?
Q4
Is P=NPP = NP proven?
Q5
Why is P=NPP = NP important for AI?
Match definitions
Match each concept on the left to its definition on the right.
Loading…