Beta Phase: Square45 is currently in beta testing. Expect some features or content to be incomplete or missing.
45

Computational Complexity (Definition)

The field classifying computational problems according to their inherent difficulty and resource requirements.
📜

The statement of the theorem

Let TM\text{TM} denote the set of all deterministic Turing Machines. For any M and input xM \text{ and input } x, let TM(x)T_M(x) be the time complexity function, and SM(x)S_M(x) be the space complexity function. A language L is decidable in time O(f(n))L \text{ is decidable in time } O(f(n)) if there exists a TM M_L \text{ such that } L(M_L) = L \text{ and } T_{M_L}(x) \restrict{x \text{ length } n} \text{ is bounded by } c \text{ for some constant } c \text{ and } n \text{ large enough}.\n\nWe define the complexity class P\text{P} (Polynomial Time) as:\n\nP=k is a positive integerPk\text{P} = \bigcup_{k \text{ is a positive integer}} \text{P}_k \n\nwhere Pk\text{P}_k is the set of all languages LL such that LL is decided by a TM MM whose running time TM(n)T_M(n) is bounded by O(nk)O(n^k). Formally, P=DTIME(poly(n))\text{P} = \text{DTIME}(\text{poly}(n)), where DTIME(f(n))=Alg(L) s.t. L is decided by a TM M with TM(n) bounded by f(n)\text{DTIME}(f(n)) = \text{Alg}(\text{L}) \text{ s.t. } \text{L} \text{ is decided by a TM } M \text{ with } T_M(n) \text{ bounded by } f(n).\n\nMore generally, the computational complexity of a problem A\text{A} is characterized by the minimal resource function f(n)f(n) such that $\text{A} \text{ belongs to } \text{DTIME}(f(n)) \text{ or } \text{DSPACE}(f(n)).