Asymptotic lower/upper bounds for T(n) [Master Theorem?]

In summary, when solving for the upper and lower bounds of T(n), the Akra–Bazzi theorem can be used when T(n) is of the form aT(n/b)+f(n) and f(n)=O(nlogbn).
  • #1
Shaitan00
18
0
I am trying to find out how to solve the lower/upper bounds for a given T(n) - the book I have been reading refers to using the Master Theorem which I seem to be able to apply in the standard case, however when the T(n) is non-standard I am at a loss to see how to solve the problem.

For example, with T(n) = 3T(n/2) + n^1/2 I know that a=3, b=2, k=1/2 so T(n) = O (n^log1.58) (using the standard Master Theorem approach).

But now I am looking into solving the following problem:
T(n) = 5T(n/5) + nlogn

In this case f(n) = n*log(n) (not of the form n^k) and I am not sure how to evaluate this using either the Master Theorem (or any other valid method) - somehow I need to determine if
Anyone have any clues?

Any help would be much appreciated.
Thanks,
 
Physics news on Phys.org
  • #2
In this case, you can use the Akra–Bazzi theorem to find the upper and lower bounds. The Akra–Bazzi theorem states that if T(n) is of the form aT(n/b)+f(n), where a and b are constants and f(n) is a function such that f(n)=O(nlogbn) for all sufficiently large n, then T(n)=Θ(nlogbn). Therefore, in your example, since f(n)=nlogn, we can conclude that T(n)=Θ(nlog5n).
 

1. What is the Master Theorem?

The Master Theorem is a mathematical tool used to determine the asymptotic behavior of certain types of recurrence relations. It provides a quick and easy way to find upper and lower bounds for the running time of algorithms.

2. How does the Master Theorem work?

The Master Theorem is based on the idea of dividing and conquering. It uses the form of a recurrence relation, specifically T(n) = aT(n/b) + f(n), where a is the number of subproblems, b is the size of each subproblem, and f(n) is the cost of combining the subproblem solutions. By comparing the values of a, b, and the asymptotic behavior of f(n), the Master Theorem can determine the overall asymptotic behavior of T(n).

3. What are asymptotic lower and upper bounds?

Asymptotic lower and upper bounds refer to the best possible estimate of the running time of an algorithm as n (the input size) approaches infinity. The lower bound is the smallest possible running time, while the upper bound is the largest possible running time. They are denoted by Ω(f(n)) and O(f(n)), respectively, where f(n) is a function that represents the growth rate of the algorithm.

4. When should the Master Theorem be used?

The Master Theorem is most useful when dealing with divide and conquer algorithms, such as merge sort or binary search. It is also helpful when analyzing algorithms with recursive calls. However, it may not be applicable to all types of recurrence relations, so it is important to understand its limitations.

5. What are some common mistakes when using the Master Theorem?

One common mistake is using the Master Theorem without verifying that the recurrence relation follows the required form. Another mistake is not considering the actual cost of combining subproblem solutions, which may not always be constant. Additionally, the Master Theorem may not provide the most precise asymptotic bounds, so it is important to also consider other methods for analyzing the running time of algorithms.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
207
  • Calculus and Beyond Homework Help
Replies
6
Views
349
  • Calculus and Beyond Homework Help
Replies
6
Views
461
  • Calculus and Beyond Homework Help
Replies
1
Views
687
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
537
  • Calculus and Beyond Homework Help
2
Replies
43
Views
3K
  • Calculus and Beyond Homework Help
Replies
6
Views
758
  • Calculus and Beyond Homework Help
Replies
5
Views
471
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
Back
Top