Wednesday, 24 October 2012

Master Theorem

Today I learned Master Theorem. However, there are not many explanations on the course slides. I was still confused after I read the course notes because it doesn't mention what "d" is in the definition. So I found the clearer (for me, and hope helpful for others too ) version of Master Theorem here:

For the definition of T we have, we can easily use Master Theorem to find the bounds of T without unwinding.

In summary, when we have a definition of T and want to use Master Theorem, we do the following steps:

1. calculate n^logba

2. compare if f(n) either greater, less than or equal to n^logba
        if f(n) = n^logba , then T(n) = θ ( n^logba lg n)
        if f(n) < n^logba , then T(n) = θ ( n^logba)
        if f(n) > n^logba , then T(n) = θ ( f(n) )

The summary above just for general case, and understanding. For preciseness, please refer to the Theorem 4.1. =]


No comments:

Post a Comment