19.07.2014 Views

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

B.4. STRASSEN’S METHOD 227<br />

answers to the next two questions are given by the Fast Fourier Trans<strong>for</strong>m (FFT)<br />

[SS71], and we can compute ˜f from f (or h from ˜h) in time O(k2 k ) = O(n log n)<br />

(note that we are still assuming n is a power <strong>of</strong> 2). Putting these together gives<br />

O(n log n) + O(n log n)<br />

} {{ } } {{ }<br />

˜f from f ˜g from g<br />

+ O(n)<br />

} {{ }<br />

˜h from ˜f, ˜g<br />

+ O(n log n) = O(n log n). (B.8)<br />

} {{ }<br />

h from ˜h<br />

While this method works fine <strong>for</strong> multiplying polynomials over a finite field K<br />

with an appropriate root <strong>of</strong> unity, or over C, it requires substantial attention to<br />

detail to make it work over the integers. Nevertheless it is practicable, and the<br />

point at which this FFT-based method is faster than ones based on Theorem<br />

38 depends greatly on the coefficient domain.<br />

TO BE COMPLETED<br />

Notation 31 We will denote M Z (n) the asymptotic O(M Z (n)) time taken to<br />

multiply two integers <strong>of</strong> length n, and M K[x] (n) the number <strong>of</strong> operations in K<br />

or its associated structures needed to multiply two polynomials with n terms (or<br />

<strong>of</strong> degree n, since in O-speak the two are the same). Most authors omit the<br />

subscripts, and speak <strong>of</strong> M(n), when the context is clear.<br />

For integers, the point at which this FFT-based method is faster than ones<br />

based on Theorem 38 is tyically when the integers are <strong>of</strong> length a few thousand<br />

words.<br />

B.3.5<br />

Faster division<br />

TO BE COMPLETED<br />

B.3.6<br />

Faster g.c.d. computation<br />

TO BE COMPLETED<br />

B.4 Strassen’s method<br />

Just as Karatsuba’s method (Excursus B.4) lets us multiply dense polynomials<br />

<strong>of</strong> degree n − 1 (n terms) in O(n log 2 3 ≈ n 1.585 ) operations rather than O(n 2 ),<br />

so Strassen’s method, introduced in [Str69], allows us to multiply dense n × n<br />

matrices in O(n log 2 7 ≈ n 2.807 ) operations rather than O(n 3 ) operations. Again<br />

like Karatsuba’s method, it is based on “divide and conquer” and an ingenious<br />

base case <strong>for</strong> n = 2, analogous to (B.4).<br />

is usually computed as<br />

( )<br />

c1,1 c 1,2<br />

=<br />

c 2,1 c 2,2<br />

( )<br />

c1,1 c 1,2<br />

=<br />

c 2,1 c 2,2<br />

( ) ( )<br />

a1,1 a 1,2 b1,1 b 1,2<br />

a 2,1 a 2,2 b 2,1 b 2,2<br />

( )<br />

a1,1 b 1,1 + a 1,2 b 2,1 a 1,1 b 1,2 + a 1,2 b 2,2<br />

a 2,1 b 1,1 + a 2,2 b 2,1 a 2,1 b 1,2 + a 2,2 b 2,2<br />

(B.9)<br />

(B.10)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!