complexityclasses
Complexity classes are formal groupings of decision problems according to the resources required to solve them on a Turing machine. They provide a framework to compare the intrinsic difficulty of problems beyond asymptotic runtime. Most work focuses on time or space; time-based classes track how the running time grows with input size, while space-based classes track memory usage.
Time classes include P, the set of problems solvable in polynomial time by a deterministic Turing machine;
Space classes include L (logarithmic space) and NL (nondeterministic logarithmic space); PSPACE for polynomial space. We
Many NP problems are complete for NP, meaning they are among the hardest in NP under polynomial-time
In addition, randomized classes such as RP and BPP capture problems solvable efficiently with randomness; results
These classifications are idealized models; real-world algorithms sometimes defy simple categorization.