0% found this document useful (0 votes)
93 views3 pages

Asymptotic Notation

Asymptotic notation is used to analyze algorithms by simplifying functions into big-Oh, Omega, and Theta notations. Big-Oh notation represents asymptotic upper bounds, Omega notation represents lower bounds, and Theta notation represents tight bounds that are both upper and lower bounds. These notations allow analysis to ignore less significant terms by focusing on the major terms of a function.

Uploaded by

Vasu Devan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views3 pages

Asymptotic Notation

Asymptotic notation is used to analyze algorithms by simplifying functions into big-Oh, Omega, and Theta notations. Big-Oh notation represents asymptotic upper bounds, Omega notation represents lower bounds, and Theta notation represents tight bounds that are both upper and lower bounds. These notations allow analysis to ignore less significant terms by focusing on the major terms of a function.

Uploaded by

Vasu Devan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Asymptotic Notation

Asymptotic notation is a way of expressing the cost of an algorithm. Goal of Asymptotic


notation is to simplify Analysis by getting rid of unneeded information
Following are the asymptotic notation:
BigOh Notation (O) :

>> O(g(n)) = { f(n) : there exist positive constants c and n0 such that 0 < f(n) < c*g(n) for all n > n0 }
>> It is asymptotic upper bound.
>>The function f(n) = O(g(n)) iff there exist positive constants c and n0 such that f(n) c * g(n) for all n, n n0.
>> The statement f(n) = O(g(n)) states only that g(n) is an upper bound on the value of f(n) for all n, n no.
>> Eg :
1. 3n + 2 = O(n)
3n + 2 4n for all n 2.
2. 3n + 3 = O(n)
3n + 3 4n for all n 3.
3. 100n + 6 = O(n)
100n + 6 101n for all n 6.

Omega Notation ()

>> (g (n)) = { f(n) : there exist positive constants c and n0 such that 0 < c * g(n) < f(n) for all n > n
>> Asymptotic lower bound.
>> The function f(n) = (g(n)) iff there exist positive constants c and n0 such that f(n) c * g(n) for all n, n n0
>> The statement f(n) = (g(n)) states only that g(n) is only a lower bound on the value of f(n) for all n, n no.
>> E.g.
1. 3n + 2 = (n)
3n + 2 3n for all n 1.
2. 3n + 3 = (n)
3n + 3 3n for all n 1.
3. 100n + 6 = (n)

100n + 6 100n for all n 0.


Theta Notation ()

>> (g(n)) = { f(n) : there exist positive constants c1 and c2 and n0 such that 0 < c1 * g(n) < f(n) < c2 * g

for all n > n0 }

>> The function f(n) = (g(n)) iff there exist positive constants C1, C2 and n0 such that C1 * g(n) f(n) C2 * g
for all n, n n0.
>> E.g.
1. 3n + 2 = (n)
3n + 2 3n for all n 2.
3n + 2 4n for all n 2.
So, C1 = 3, C2 =4 & n0 =2.
>> The statement f(n) = (g(n)) iff g(n) is both an upper and lower bound on the value of

f(n).
Little oh Notation (o)

>> o(g(n)) = { f(n) : for any positive constant c>0 , there exists a constant n0 such that 0 < f(n) < c * g(n)

all n > n0 }
>> We use o notation to denote an upper bound that is not asymptotically tight.

>> The definitions of O-notation and o-notation are similar. The main difference is that in f(n) =O(g(n)), the bound
< f(n) < c*g(n) holds for some constant c>0 but in f(n) =O(g(n)), the bound 0 < f(n) < c *g(n) holds for all consta
> 0.
Little omega Notation (w)

>> w(g(n)) = { f(n) : for any positive constant c>0 , there exists a constant n0 such that 0 < c * g (n) < f(n)

all n > n0 }
>> We use w notation to denote an lower bound that is not asymptotically tight.

You might also like