120 likes | 337 Views
A General Method of Solving Divide-and-Conquer. 計算方法設計 Chapter05 重要補充 唐傳義 老師. given. rewrite it into template. given. ,. Deduction-1. (1). (1). Example1-(1). Example 1 : Solution :. iteration and cancellation. 又. log n terms. ,. Deduction-2. 而. Deduction-3.
E N D
A General Method of Solving Divide-and-Conquer 計算方法設計 Chapter05重要補充 唐傳義老師
given rewrite it into template given , Deduction-1
(1) (1) Example1-(1) • Example 1 : Solution:
iteration and cancellation 又 log n terms , Deduction-2 • 而
Deduction-3 • Ο:upper bound ex: • Ω:lower bound ex: • Θ:exactly ex: • ο:exactly,even constant ex: 不同的 g(n)對應不同的
Example1-(2) • Example 1 : Solution: From (1)
, Example2 • Example 2 : Solution:
given , , 仍然是 只差 的constant If g(n) is monotone General Representation • In general
Example3-- Pan’s Matrix • Example 3 : Solution:
More General Representation • More general given ,
Example4 • Example 4 : Solution: ,
Reference • Bentley, Haken & Saxe “A General Method of Solving Divide-and-Conquer Recurrences”, SIGACT News Fall 1980,page36-44