Asymptotic Notation
Big Oh Notation (upper bound): a function eventually dominates a function if there is some constant such that:
Alternatively:
Big Omega Notation (lower bound):
Big Theta Notation (tight bounds):
Decision Problems
Every problem for which the possible answers are true or false can be interpreted as a language:
Time Complexity
Given a (terminating) machine , we can define a time function :
We define worst-case time complexity as :
Complexity Classes P and NP
Polynomial Time (P)
Polynomial time (P): a language is said to be solvable in polynomial time if there exists a deterministic Turing Machine s.t.:
- accepts
- is eventually dominated by a polynomial function
We can define .
Link to original
Non-deterministic Polynomial Time (NP)
Non-deterministic Polynomial time (NP): a language is said to be solvable in non-deterministic polynomial time if there exists an NDTM s.t.:
- accepts
- is eventually dominated by a polynomial function
We can define in the same way.
Link to original