online advertising
Loading [MathJax]/jax/output/HTML-CSS/jax.js

Saturday, October 24, 2015

Algorithms: Design and Analysis, Part 1 - Problem Set 2 - Question 1

Problem:

This question will give you further practice with the Master Method. Suppose the running time of an algorithm is governed by the recurrence T(n)=5T(n/3)+4n. What's the overall asymptotic running time (i.e., the value of T(n))?

Solution:

Using the master theorem terminologies, a=5, b=3, d=1.

Notice 5=a>bd=3, therefore, the answer is Θ(nlog35).

No comments:

Post a Comment