Академический Документы
Профессиональный Документы
Культура Документы
Asymptotic Notation | Asymptotic Notation in Data Structure FreeFeast.info : Interview Questions ,Awesome Gadgets,Personality Motivation Guide, F
We Are Hiring
Awesome Gadgets
Difference Between
Personality Motivation
Quiz
IT Stuff
Tutorials
Asymptotic Notation |
Asymptotic Notation in
Data Structure
Poonam Dhanvani
Search
Advertisement
IT Stuff
freefeast.info
6,311 likes
Asymptotic Notation
Asymptotic notation is a way of expressing the cost of an
Like Page
Be the first of your friends to like this
http://freefeast.info/general-it-articles/asymptotic-notation-asymptotic-notation-in-data-structure/
1/5
9/20/2015
Asymptotic Notation | Asymptotic Notation in Data Structure FreeFeast.info : Interview Questions ,Awesome Gadgets,Personality Motivation Guide, F
>> 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 > n0 }
>> 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.
http://freefeast.info/general-it-articles/asymptotic-notation-asymptotic-notation-in-data-structure/
2/5
9/20/2015
Asymptotic Notation | Asymptotic Notation in Data Structure FreeFeast.info : Interview Questions ,Awesome Gadgets,Personality Motivation Guide, F
>> 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(n) 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(n) 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).
http://freefeast.info/general-it-articles/asymptotic-notation-asymptotic-notation-in-data-structure/
3/5
9/20/2015
Asymptotic Notation | Asymptotic Notation in Data Structure FreeFeast.info : Interview Questions ,Awesome Gadgets,Personality Motivation Guide, F
http://freefeast.info/general-it-articles/asymptotic-notation-asymptotic-notation-in-data-structure/
4/5
9/20/2015
Asymptotic Notation | Asymptotic Notation in Data Structure FreeFeast.info : Interview Questions ,Awesome Gadgets,Personality Motivation Guide, F
Related Post
Insertion Sort |
Pseudo Code of
Insertion Sort | I...
What is an
algorithm? | Define
algorithm |
Explain...
Difference between
Calloc and Malloc |
Calloc() vs...
Difference between
Tree and Binary Tree
| General ...
Data Structure
http://freefeast.info/general-it-articles/asymptotic-notation-asymptotic-notation-in-data-structure/
5/5