110 likes | 211 Views
Fast Multiplication of Large Numbers Using Fourier Techniques. Henry Skiba Advisor: Dr. Marcus Pendergrass. What is Multiplication?. Multiplication of small numbers This can also be represented in the following way: where x is equal to 10. Multiplication of small numbers.
E N D
Fast Multiplication of Large Numbers Using Fourier Techniques Henry Skiba Advisor: Dr. Marcus Pendergrass
What is Multiplication? • Multiplication of small numbers • This can also be represented in the following way: • where x is equal to 10 • Multiplication of small numbers
Multiplication in a New Way • Represent basic numbers as polynomials when x equals 10 • Multiply two polynomials together
General Polynomial Multiplication • General Polynomials • General Polynomial Multiplication • Even More General Form • where • Convolution
What is Convolution? • This opens the door for use of the Fast Fourier Transform (FFT) for multiplication
Using the FFT to Convolve • Convolution in the time domain is point wise multiplication in the frequency domain • But
Using the FFT to Convolve (cont.) • Arrays are zero padded to make and equivalent • p = [p0,p1,p2,…,pn-1,pn,0,0,0,0,0…] vs. with zero padding without zero padding
Algorithm • Starts with two arrays, p and q • Zero pads p and q • carry
Testing vs. Regular Convolution in Time Domain • Timed how long it took to multiply to random numbers of a certain length • 10,000 to 100,000 with digit stepping of 10,000 • Repeated iteration 5 times • Used theoretical times to plot “fit” based on average of 10,000 digit time values • FFT Multiplication: nlog10n • Convolution: n2