Big Theta Notation
Big Theta(θ) Notation
Introduction
The main idea of asymptotic analysis is to have a measure of efficiency of algorithms that doesn’t
depend on machine specific constants, and doesn’t require algorithms to be implemented and time
taken by programs to be compared. Asymptotic notations are mathematical tools to represent time
complexity of algorithms for asymptotic analysis. The 3 asymptotic notations are mostly used to
represent time complexity of algorithms: Big Oh Notation, Big Theta(Θ) notation and Big Omega(Ω).
We will be looking into Theta notation in detail:
Θ Notation
The theta notation bounds a function from above and below, so it defines exact asymptotic behavior.
A simple way to get Theta notation of an expression is to drop low order terms and ignore leading
constants.
For example, consider the following expression.
3n3 + 6n2 + 6000 = Θ(n3)
Dropping lower order terms is always fine because there will always be a n0 after which
Θ(n3) has higher values than Θ(n2) irrespective of the constants involved.
For a given function g(n), we denote Θ(g(n)) is following set of functions.
Θ(g(n)) = {f(n): there exist positive constants c1, c2 and n0 such
that 0 <= c1*g(n) <= f(n) <= c2*g(n) for all n >= n0}
The above definition means, if f(n) is theta of g(n), then the value f(n) is always between c1*g(n) and
c2*g(n) for large values of n (n >= n0). The definition of theta also requires that f(n) must be non-
negative for values of n greater than n0.
The growth rate for functions are:
1<lg n<√ x<n<nlgn<n2<n3…<2n<3n...<n!<nn
Questions: