3
What is the master theorem (master Theorem)? What is its importance in the complexity analysis of algorithms?
3
What is the master theorem (master Theorem)? What is its importance in the complexity analysis of algorithms?
6
The structure of many efficient algorithms follows the paradigm of division and conquest. This paradigm (or algorithm design strategy) consists of the following:
It is a mathematical technique that allows defining sequences, sets, operations or even algorithms from particular problems to generic problems. That is, by means of a rule any term can be calculated according to the immediate predecessor(s) (s)).
Many of the recurrences that occur in the analysis of division and conquest have the form:
F(n) = a F(n/2) + cn^k
The following Master theorem gives the solution (in asymptotic terms) of all these recurrences.
Theorem: Be it a non-zero natural number, k a natural number, and c a positive real number. Let F be a function that takes natural numbers in positive real numbers and satisfies the recurrence (*) for n = 21, 22, 23, ... Suppose that F is asymptotically nondecreasing, i.e., that there is n1 such that F(n) F(n+1) for all n n1. Under these conditions,
- if lg a > k then F is in Θ(n lg a) ,
- if lg a = k then F is in Θ(n k lg n) ,
- if lg a < k then F is in Θ(n k) .
The Master theorem can be generalized as follows to treat recurrences such as
F(n) = a F(n/b) + cn^k.
The Master Theorem allows you a way around this problem by comparing a recursive algorithm with other algorithms, which allows you to estimate the upper and lower limits for the solution.
In other words, Master theorem calculates the resources needed to run a recursive algorithm, such as running time on a computer. The master method uses what is known as notation Big O to describe the asymptotic behavior of functions, i.e., how quickly they grow towards their limit.
Research sources:
Browser other questions tagged algorithm
You are not signed in. Login or sign up in order to post.
"A recursive form algorithm has no solution, which is evident in algebraic manipulation." - Pedro, that phrase is strange, recursive algorithms have solution, just see the solutions of the recurrence of the link itself that you passed!
– Carlos Cinelli
@Carloscinelli I took that part out. Thank you
– Pedro Rangel