Time Complexity Analysis

Algorithm's running time as a function of input size n

T(n): worst case run time of algorithm with input size n

Big-O: Asymptotic upper bound of time complexity

T(n) is O(g(n)) if there exist a constant C, n0 >= 0 such that T(n) ≤ c*g(n) for all n ≥ n0

Big-Ω : Asymptotic lower bound

T(n) is Ω (f(n)) if there exist a c > 0, n0 ≥ 0 such that T(n) ≥ c*f(n) for all n ≥ n0

Big-θ: Asymptotic tight bound:

T(n) is θ(f(n)) if T(n) = O(f(n)) and T(n) = Ω(f(n))

Properties:

Transitivity

Sum of Functions