next up previous
Next: Up: Previous:

Decision Problems and Algorithms

A complexity class is a set of languages, membership in which is determined by a complexity measure (e.g., running time) on an algorithm that determines whether a given string belongs to a language.

Example

P = {L $\subseteq$ {0, 1}* $\mid$ there exists an algorithm A that decides L in polynomial time}



Theorem 36.2

P = {L $\mid$ L is accepted by a polynomial time algorithm}

Proof:

There exists an algorithm A' that runs algorithm A for a polynomial amount of time and rejects if A has not yet accepted the string; otherwise accepts.


next up previous
Next: Up: Previous: