Вы находитесь на странице: 1из 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.

Вам также может понравиться