|
|
Take quiz & check grades |
The Master MethodWorks for recurrences of the form:
What is the idea?Suppose you split the problem of size n into "a" problems of size "n/b" (ideally you want to split them into "a" problems of size "n/a"). Therefore, the running time for the problem of size n is "a" times a problem of size "n/b" plus some function to integrate the subproblems f(n). The method consists in comparing f(n) with the function n lg b a Master Theorem
where n/b is either floor or ceiling of n/b Then, T(n) can be bounded asymptotically as follows:
Notes: factor s, indicates polymomially smaller or larger Examples:
|