0% found this document useful (0 votes)
7 views4 pages

AOA Exp One

The document discusses the Master Theorem for analyzing the time complexity of recurrence relations of the form T(n) = aT(n/b) + f(n). It outlines three cases for determining T(n) based on the relationship between f(n) and n^(logb(a)). The conclusion states that the analysis of both worst and best cases has been successfully performed.

Uploaded by

sayedzubia2211
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)
7 views4 pages

AOA Exp One

The document discusses the Master Theorem for analyzing the time complexity of recurrence relations of the form T(n) = aT(n/b) + f(n). It outlines three cases for determining T(n) based on the relationship between f(n) and n^(logb(a)). The conclusion states that the analysis of both worst and best cases has been successfully performed.

Uploaded by

sayedzubia2211
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/ 4

Prelab:

Program:
Results:
Best Case Analysis:

Worst 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:

You might also like