Professional Documents
Culture Documents
Lecture # 2
MS(Artificial Intelligence)
Semester 1
Advance Analysis of Algorithms
• Brute force
• Divide and conquer
• Decrease and conquer
• Transform and conquer
• Greedy approach
• Dynamic programming
• Backtracking and branch-and-bound
• Space and time tradeoffs
Time Complexcity
Time Complexcity
Time Complexcity
Time Complexcity
Time Complexcity
Asymptotic Notations Properties
Limitations
• not always useful for analysis on fixed-size inputs.
• All results are for sufficiently large inputs.
Time Complexity of Algorithm
• Rate of Growth
– Rate of growth is the rate at which running time
increases as a function of input.
• Lower Order Term
– When given an approximation of the rate of
growth of a function, we tends to drop the lower
order terms as they are less significant to higher
order terms.
e.g f(n) = n2 + n
Lower order term n will be dropped and
O(n2)
The growth rate of f(n) is less than or equal to the growth rate of g(n),
so g(n) is called an upper bound on f(n)
Thanx for Listening