@MISC{05karatsubaalgorithm, author = {}, title = {KARATSUBA ALGORITHM}, year = {2005} }

Share

OpenURL

Abstract

The Karatsuba algorithm (KA) for multiplying two polynomials was introduced in 1962 [3]. It saves coefficient multiplications at the cost of extra additions compared to the schoolbook or ordinary multiplication method. The basic KA is performed as follows. Consider two degree-1 polynomials A(x) and B(x) with n = 2 coefficients: A(x) = a1x + a0 B(x) = b1x + b0. Let D0, D1, D0,1 be auxiliary variables with D0 = a0b0 D1 = a1b1 D0,1 = (a0 + a1)(b0 + b1). Then the polynomial C(x) = A(x)B(x) can be calculated in the following way: C(x) = D1x 2 + (D0,1 − D0 − D1)x + D0. This method requires three multiplications and four additions. The schoolbook method requires n 2 multiplications and (n − 1) 2 additions, i.e., four multiplications and one addition. Clearly, the KA can also be used to multiply integer numbers. The KA can be generalized for polynomials of arbitrary degree [6]. The following algorithm describes a method to multiply two arbitrary polynomials with n coefficients using the one-iteration KA. ALGORITHM 1. Generalized One-Iteration KA Consider two degree-d polynomials with n = d + 1 coefficients A(x) = d� aix i, B(x) = i=0 Compute for each i = 0,...,n − 1 Di: = aibi. d� bix i. i=0 Calculate for each i = 1,...,2n − 3 and for all s and t with s + t = i and t> s ≥ 0 Ds,t: = (as + at)(bs + bt).