Module 1
Module 1
By ~ Tapaswini Dash
Asymptotic Notation
• Asymptotic Notation: Is the mathematical notation used to
describe the running time of an algorithm when i/p tends
towards a particular value.
• They are 3 asymptotic notations are mostly used to represent
time complexity of algorithm.
i. Big oh (O)notation
ii. Big omega (Ω) notation
iii. Theta(Θ) notation
iv. Little oh notation
v. Little omega(Ω) notation
Growth Rate
• Growth Rate of various algorithm: the growth rate of an
algorithm is the arte at which the running time (cost) of an
algorithm grows as the size of the i/p grow.
• An algorithm’s proportional time requirement is known as
growth rate.
• We can compare the efficiency by comparing their growth
rate.
Growth rate graph
Classification of growth
• Growing with the same rate
• Growing with he slower rate
• Growing with the faster rate
Extra Question –
• Lets assume
• is eq 2
• Now substitute eq 2 in eq 1
Q.6
For example
1.
• Here c – order of n
• Cn –> cost required to solve T(n) = 2T(n/2)
Let’s assume n = 16
= n/bk=1
= Solving for k:
= k=logbn
So, we will get (logn)
we use log n because we need to know how many
times we can divide n before reaching 1.
• So the solution for this is O(n log n)
• Case1 :
• Case2:
• Case3 :
Q.1
Q.2