AOA Exp One
AOA Exp One
Program:
Results:
Best Case Analysis:
Analysis:
The Master Theorem states that for a recurrence relation of the form T(n) =
aT(n/b) + f(n), where a ≥ 1, b > 1, and f(n) is a function, the time complexity can
be determined by comparing f(n) to n^(logb(a)) based on three cases:
• Case 1: f(n) = O(n^(logb(a) - ε)) for some ε > 0 - T(n) = Θ(n^(logb(a))).
• Case 2: f(n) = Θ(n^(logb(a))) - T(n) = Θ(n^(logb(a)) * log(n)).
• Case 3: f(n) = Ω(n^(logb(a) + ε)) for some ε > 0, and af(n/b) ≤ cf(n) for
some constant c < 1 and sufficiently large n** - T(n) = Θ(f(n)).
Self-Learning References:
Techmax Book.
www.gatevidyalay.com
Conclusion:
We have Successfully performed the Master theorem and Analysis
the worst case and Best Case.
CO’s Covered: