
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

(a) * Definitions (b) * Three Rules (c) Asymptotically “tight” bounds
(a) * Recursion (e.g., fib(N)) (b) * Relation notation (c) Bounding methods: i. * Iteration Method ii. * Substitution Method iii. * Recursion Tree (not usable formally) iv. Master Method/Theorem
(a) Maximum Subsequence Sum (pp. 24, 26, 27, 29) Algorithm 1-4 Notes: i. Algorithm 1: Three nested loops: N^3 +3N 6 2 +2N= O(N 3 ) ii. Algorithm 1 - 2: Inner loop elimination iii. Algorithm 2: O(N 2 ) iv. Algorithm 2 - 3: Recursify. Divide and Conquer! v. Algorithm 3: Cute vi. Algorithm 4: Lean and mean (b) Binary Search (p. 31) i. Like guessing numbers ii. Searching good: O(log N). Update not so good: O(N) iii. We will see better data structures for searching (c) Pow (p. 33) (another cute recursion example)