Professional Documents
Culture Documents
Design and Analysis of Algorithms: 09/03/2015 Dr. Muhammad Umair
Design and Analysis of Algorithms: 09/03/2015 Dr. Muhammad Umair
Analysis of
Algorithms
Lecture 07
09/03/2015
Mathematical Representation
- Notation (Theta)
(g(n)) = { f(n) : such that 0 <= c1 g(n) <= f(n) <= c2 g(n) }
09/03/20
15
Mathematical Representation
09/03/20
15
Mathematical Representation
- Notation (Omega)
09/03/20
15
Example
n 3n
2
09/03/20
15
Example
f(n) = an2 + bn + c
09/03/20
15
Class Exercises
(3/2) n2 - 4n = (n2)
6n3 = (n2)
2n+1 = O(2n)
22n = O(2n)
09/03/20
15