This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 Q 2 + P 2 Q 1 ) + x 2m (P 2 Q 2 ) Let F = (P 1 + P 2 )(Q 1 + Q 2 ) G = P 1 Q 2 H = P 2 Q 1 => AB = G + (F  G  H)x m + Hx 2m 3 poly m * poly m 2 poly m + poly m 2 poly n poly n Let f(d) = running time to mult. 2 polynomials of degree d  1. f(2m) = 3f(m) + 2m + 4m = 3f(m) + 6m m = 2 k 2 k1 92 Basic Recursions: f(2n) = f(n) + O(1) > f = O(logn) f(2n) = 2f(n) + O(1) > f = O(n) f(2n) = f(n) + O(n) > f = O(n) f(2n) = 2f(n) + O(n) > f = O(nlogn) Integer Multiplication You can also use Karatsuba as a O(n 1.585 ) algorithm for multiplying nbit ints A = 10110101 P 1 = 1001 Q 1 = 11 P 2 = 0101 To multiply nbit integers, takes g(n) = 3g(n/2) + O(n) => g(n) = O(n 1.585 ) 93...
View
Full
Document
This note was uploaded on 10/02/2008 for the course CS 482 taught by Professor Kleinberg during the Spring '08 term at Cornell University (Engineering School).
 Spring '08
 KLEINBERG
 Algorithms, Binary Search, Sort

Click to edit the document details