Download presentation
Presentation is loading. Please wait.
1
Comments from last time
Purpose of Master theorem? What does a, b, and d represent Finding a, b, d from pseudocode 1
2
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
3
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
4
Comment cards 4
5
= Faster Div-Conquer Multiplication 1234 × 5678 12 × 56 34 × 78
( ) × ( ) = 68 × 112 5
6
= Faster Div-Conquer Multiplication 12345678 × 87654321
× ( ) × ( ) 1234 × 8765 5678 × 4321 = 6912 × 13086 6
7
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
8
Recursion Tree: T(n) = 2T(n / 3) + O(n)
8
9
Recursion Tree: T(n) = 3T(n / 3) + O(n)
9
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.