0% found this document useful (0 votes)
23 views22 pages

L03 AsymptoticAnalysis II

Uploaded by

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

L03 AsymptoticAnalysis II

Uploaded by

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

Asymtotic Analysis - II

Instructor: Ashok Singh Sairam


Lecture Plan
• Properties of asymptotic comparisons
§ Transitivity
§ Reflexivity
§ Symmetry
§ Transpose symmetry
• Standard notations and common functions
• Practice exercises

MA512: Data Structures and Algorithms


2
Review of last lecture

MA512: Data Structures and Algorithms


3
Growth of functions – revisited (1)

MA512: Data Structures and Algorithms


4
Growth of functions – revisited (2)

MA512: Data Structures and Algorithms


5
Properties : Transitivity

MA512: Data Structures and Algorithms


6
• Transitivity true for all notations

f(n) = (g(n)) & g(n) = (h(n))  f(n) = (h(n))


f(n) = O(g(n)) & g(n) = O(h(n))  f(n) = O(h(n))
f(n) = (g(n)) & g(n) = (h(n))  f(n) = (h(n))
f(n) = o (g(n)) & g(n) = o (h(n))  f(n) = o (h(n))
f(n) = w(g(n)) & g(n) = w(h(n))  f(n) = w(h(n))

MA512: Data Structures and Algorithms


7
Properties : Reflexivity

MA512: Data Structures and Algorithms


8
Properties : Symmetry

MA512: Data Structures and Algorithms


9
Properties : Transpose Symmetry

MA512: Data Structures and Algorithms


10
Asymptotic Analysis and Limits
______

______

does it imply ?

If does it imply ?

If does it imply ?

11
Asymptotic Analysis and Limits

MA512: Data Structures and Algorithms


12
Standard notations and functions (1)
• Monotonicity
A function f(n) is monotonically increasing if m  n
implies f(m)  f(n) .
A function f(n) is monotonically decreasing if m  n
implies f(m)  f(n) .
A function f(n) is strictly increasing if m < n implies
f(m) < f(n) .
A function f(n) is strictly decreasing if m < n implies
f(m) > f(n) .

MA512: Data Structures and Algorithms


13
Standard notations and functions (2)
• Exponentials
For all n and a1, the function an is the exponential function
with base a and is monotonically increasing.
• Logarithms
We adopt the following convention
lg n = log2n (binary logarithm),
ln n = logen (natural logarithm),
lgk n = (lg n)k (exponentiation),
lg lg n = lg(lg n) (composition),
lg n + k = (lg n)+k (precedence of lg).

MA512: Data Structures and Algorithms


14
Standard notations and functions (3)

MA512: Data Structures and Algorithms


15
Standard notations and functions (4)
• Iterated logarithmic function
The notation lg* n which reads “log star of n” is defined as
lg* n = min {i0 : lg(i) n  1 }
Example:
lg* 2 = 1
lg* 4 = 2
lg* 16 = 3
lg* 65536 = 4
lg* 265536 = 5

MA512: Data Structures and Algorithms


16
Practice Exercise (1)

• By definition, we need to prove

• As the functions are asymptotically nonnegative, for some


n0>0, f(n)≥0 and g(n)≥0. Means for n > n0

• By choosing c1=0.5 and c2=2, the inequality will be satisfied

MA512: Data Structures and Algorithms


17
Practice Exercise (2)

MA512: Data Structures and Algorithms


18
Practice Exercise (3)

MA512: Data Structures and Algorithms


19
Practice Exercise (3)

MA512: Data Structures and Algorithms


20
Exercise

MA512: Data Structures and Algorithms


21
MA512: Data Structures and Algorithms
22

You might also like