Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Master Theorem: in The Following, Denotes Either Given and in The Case of The Ceiling Function, The Initial Condition

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Master Theorem

Theorem 0.1 (Master Theorem) Let a, b, and k be integers satisfying a 1, b 2, and k 0.1 In the following, n denotes either n or n . In the case of the oor function, the initial condition T (0) = u is b b b given; and in the case of the ceiling function, the initial condition T (1) = u is given.

Upper Bound: If T (n) aT (n/b) + f (n) and f (n) = O(nk ), then O(nk ) O(nk log n) T (n) = O(nlogb a ) if a < bk , if a = bk , if a > bk .

Lower Bound: If T (n) aT (n/b) + f (n) and f (n) = (nk ), then (nk ) (nk log n) T (n) = (nlogb a ) if a < bk , if a = bk , if a > bk .

Exact: If T (n) = aT (n/b) + f (n) and f (n) = (nk ), then (nk ) (nk log n) T (n) = (nlogb a ) if a < bk , if a = bk , if a > bk .

1 More general version of this theorem are known. For example, the theorem is correct if a and b are any real numbers satisfying a 1 and b > 1.

You might also like