Comments from last time Purpose of Master theorem? What does a, b, and d represent Finding a, b, d from pseudocode 1
Div-Conquer Multiplication n: lenth of numbers, input size: 2n 1234 × 5678 12 × 56 12 × 78 34 × 56 34 × 78 1×5 1×6 2×5 2×6 2
O(n) time operations n: lenth of numbers Shift multiply by 10: take array, move all elements Addition / subtraction: add/subtract digits, then carry 3
Comment cards https://goo.gl/RKd8vq 4
= Faster Div-Conquer Multiplication 1234 × 5678 12 × 56 34 × 78 (12 + 56) × (34 + 78) = 68 × 112 5
= Faster Div-Conquer Multiplication 12345678 × 87654321 12345678 × 87654321 (1234 + 5678) × (8765 + 4321) 1234 × 8765 5678 × 4321 = 6912 × 13086 6
Recursion Tree: T(n) = 3T(n / 2) + O(n) n: lenth of numbers, input size: 2n n n/2 n/2 n/2 n/4 n/4 n/4 n/4 n/4 n/4 n/4 n/4 n/4 7
Recursion Tree: T(n) = 2T(n / 3) + O(n) 8
Recursion Tree: T(n) = 3T(n / 3) + O(n) 9