Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.42 MB, 12 trang )
Design and Analysis
of Algorithms I
Master Method
The Precise
Statement
THE MASTER METHOD
Cool Feature : a “black box” for solving
recurrences.
AssumpFon : all subproblems have
equal size.
Nextcore AI Gopal
Shangari
RECURRENCE FORMAT
1. Base Case : T(nti <= a constant for all sufficiently small n
2. For all larger n :
where
a = number of recursive calls (>= 1ti
b = input size shrinkage factor ( >
1ti
d = exponent in running Fme of “combine step” (>=0ti
Nextcore AI Gopal
[a,b,d independent of n ]
Shangari