Fast algorithms for polynomials and matrices Part 2: polynomial multiplication
|
|
- Joy Douglas
- 6 years ago
- Views:
Transcription
1 Fast algorithms for polynomials and matrices Part 2: polynomial multiplication by Grégoire Lecerf Computer Science Laboratory & CNRS École polytechnique Palaiseau Cedex France 1 Notation In this part R is a commutative ring with unity. Let f f 0 + f 1 x + + f n x n,andg g 0 + g 1 x + + g n x n. Let h = h 0 + h 1 x + + h 2n x 2n fg. 2
2 Faster product of two polynomials of degree 1 We want to multiply f = f 0 + f 1 x and g = g 0 + g 1 x. Remark 1. The naive product requires 4 products in R. fˆ ĝ ĥ (f(0),f(1),f( )) (g(0),g(1),g( )) ( fˆ1 ĝ 1,fˆ2 ĝ 2,fˆ3 ĝ 3 ). 1 0 ) 1 1 ( f0 f, ) 1 1 ( g0 g Lemma 2. ĥ =(h(0),h(1),h( )) h0 h 1 h 2, whereh = fg. Proof. h(a)=f(a) g(a) for all a {0, 1, }. Remark 3. The product can thus be done with only 3 multiplications in R. 3 Karatsuba algorithm For any polynomial f, wewritef i j 0 f 2j+i x j,thatis: F 0 f 0 + f 2 x + f 4 x 2 +, F 1 f 1 + f 3 x + f 5 x 2 +, We also introduce F (x, y) F 0 (y) +F 1 (y) x, sothatf(x) =F (x, x 2 ) and can apply the latter trick to multiply F and G of degree 1 when seen in (R[y])[x]. Algorithm 1 Input. f and g in R[x] of degree at most n. Output. h fg. 1. If n =0 then return f 0 g Otherwise, let m n/2 (that is the integer part of n/2), and compute: F 0 (y) f 0 + f 2 y + f 4 y f 2m y m and F 1 f 1 + f 3 y + f 5 y f 2m+1 y m, G 0 (y) g 0 + g 2 y + g 4 y g 2m y m and G 1 g 1 + g 3 y + g 5 y g 2m+1 y m. 3. Compute Fˆ(x, y) =(F 0 (y), F 0 (y) +F 1 (y), F 1 (y)), andĝ(x, y) =(G 0 (y), G 0 (y) +G 1 (y), G 1 (y)). 4. Recursively compute Ĥ = ( Fˆ0(y) Ĝ 0 (y),fˆ1(y) Ĝ 1 (y),fˆ2(y) Ĝ 2 (y) ). 5. Deduce H 0 = Ĥ 0, H 1 = Ĥ 1 Ĥ 0 Ĥ 2, H 2 = Ĥ Return h(x) H 0 (x 2 )+xh 1 (x 2 )+x 2 H 2 (x 2 ). 4
3 Analysis of Karatsuba algorithm Proposition 4. [ Karatsuba, Ofman, 1963]The Karatsuba algorithm is correct and takes O(n log2 3 ) O(n 1.59 ) operations in R. Proof. The correctness is proved easily by strong induction on n. Let K(n) represent the cost in size n. There exists a constant γ such that we have that K(n) 3 K( n/2 )+γ n. We are searching for two positive constants α and β such that K(n) α n log2 3 β n and 3 α n/2 log2 3 3 β n/2 + γ n α n log2 3 β n, hold for n sufficiently large. From n/2 n/2 + 1/2, byconvexitywehavethat (n/2 + 1/2) log2 3 (n/2) log2 3 log2 (3) 1 log 2 (3) (n/2 + 1/2) which can be bounded by ε n, ifn is larger than a suitable value N ε.thereforeitisnowsufficient to get 3 εαn 3 β n/2 + γ n β n, whichrewritesinto0 (β/2 γ 3 εα) n. We can thus take β =2(3εα+ γ), sothatitremainstofixα in order to K(n) α n log2 3 2(3εα+ γ) n holds for n {1,,N ε }. For instance we set ε 1/12. Letn be a fixed value in {1,,N ε }.Sinceαn log2 3 2(3εα+ γ) n tends to infinity when α goes to infinity, and since the derivative of the latter expression in α is n log2 3 1/2 1/2, we can chose a suitable value of α to conclude the proof. 5 Product of two polynomials of degree 2 Suppose we want to multiply f = f 0 + f 1 x + f 2 x 2 and g = g 0 + g 1 x + g 2 x 2. Remark 5. The naive product requires 9 products in R. fˆ ĝ ĥ (f(0),f(1),f( 1),f(2),f( )) (g(0),g(1),g( 1),g(2),g( )) ( fˆ0 ĝ 0,,fˆ4 ĝ 4 ). Lemma 6. ĥ =(h(0),h(1),h( 1),h(2),h( )) f 0 f f g 0 g g , h h h h h 4,whereh = fg. Proof. h(a)=f(a) g(a) for all a {0, 1, 1, 2, }. Remark 7. If 2 is invertible then the latter matrix is invertible. Remark 8. The product can thus be done with only 5 multiplications in R plus several scalar operations. 6
4 The Toom Cook algorithm For any polynomial f, wewritef i j 0 f 3j+i x j,thatis: F 0 f 0 + f 3 x + f 6 x 2 +, F 1 f 1 + f 4 x + f 7 x 2 +, F 2 f 2 + f 5 x + f 8 x 2 +. We also introduce F (x, y) F 0 (y)+f 1 (y) x + F 2 (y) x 2. We have that f(x)=f (x, x 3 ) and can apply the latter trick on F and G seen as polynomials of degree 2 in (R[y])[x]. Algorithm 2 Input. f and g in R[x] of degree at most n. Output. h fg. 1. If n =0 then return f 0 g Otherwise, let m n/3, andcomputef 0, F 1, F 2, G 0, G 1, G Compute Fˆ and Ĝ. 4. Recursively compute Ĥ ( ) Fˆ0 Ĝ 0,,Fˆ4 Ĝ Deduce H from Ĥ and return H(x,x 3 ). 7 Analysis of the Toom Cook algorithm Proposition 9. [ Toom 1963, Cook 1966] If 2 is invertible in R (with given inverse), then the polynomial product in degree n can be done with O(n log3 5 ) O(n 1.47 ) operations in R. Proof. Left as an exercise. Proposition 10. For any ε > 0, ifk is a field with sufficiently many elements then the product in degree n can be done with O(n 1+ε ) operations in K thebig-ohactuallydependsonε. 8
5 Fast Fourier transform From now on we assume that R is a K-algebra, that n =2 k,andthatk has a primitive root of unity ω of order 2 k. The discrete Fourier transform (with respect to ω) off R[x] of degree at most n 1 is: DFT ω,n : f R[x] n 1 (f(1),f(ω),f(ω 2 ),,f(ω n 1 )) =: fˆ. Algorithm 3 Input. f of degree at most n 1, andω of order n. Output. fˆ 1. If n =1 then return (f 0 ). 2. Let m n/2 and compute g(x) m (f i + f i+m ) x i, h(x) i=0 m (f i f i+m ) ω i x i. i=0 3. Recursively compute ĝ DFT ω 2,m(g) and ĥ DFT ω 2,m(h). 4. Return ( ĝ 0,ĥ 0,ĝ 1,ĥ 1,,ĝ m 1,ĥ m 1 ). 9 Analysis of the fast Fourier transform Proposition 11. Algorithm 3 is correct and takes O(n log n) additions in R and O(n log n) scalar multiplications by elements in K. Proof. If l =2j is even then f(ω l )= m i=0 (f i + ω lm f i+m ) ω li = g(ω l )=ĝ j. If l =2j +1 is odd then f(ω l )= m (f i=0 i + ω lm f i+m ) ω li = h(ω 2j )=ĥ j. Let F (n) be the cost function. There exists a positive constant γ 1 such that: F (n) 2 F (n/2) + γ n. We are looking for positive constants α and β such that F (n) α n log 2 n + β n. Itissufficient to obtain α n log 2 (n/2) + γ n α n log 2 n, which is equivalent to α n log 2 (1/2) + γ n 0. We can thus take α = γ, andsetβ to 1 so that F (n) γ n log 2 n + β n holds for n =1. 10
6 Inverse transform Proposition 12. n DFT 1 ω,n (v)=dft ω 1,n(v). Proof. Left as an exercise. Proposition 13. If n =2 k,if 2 is invertible, and if a primitive root ω of order n is given, then the product of two polynomials whose degree sum is at most n 1 can be computed with O(n log n) operations and scalar operations in R. Proof. nfg= DFT ω 1,n(DFT ω,n (f) DFT ω,n (g)) (coordinatewise product). 11 FFT over suitable finite fields Proposition 14. The finite field F q with q elements contains a n-th root of unity if, and only if, n divides q 1. Example 15. The number p is prime. This allows to multiply polynomials in F p [x] up to output degree , whichissufficient in practice according to the usual available memory size of computers. Remark 16. Primitive roots can be chosen at random with a reasonable probability of success. 12
7 Special Chinese remaindering for Z/m Z Let p 1, p 2 and p 3 be three odd prime numbers m, suchthat2 k divides p 1 1, p 2 1, andp 3 1. Let P = p 1 p 2 p 3. Given r 1 {0,,p 1 1}, r 2 {0,,p 2 1}, andr 3 {0,,p 3 1}. There exists a unique integer r {0,,P 1} such that r r 1 mod p 1, r r 2 mod p 2,andr r 3 mod p Three primes FFT for Z/m Z Let f and g be two polynomials in Z/m Z[x] such that the degree of fg is at most 2 k 1. Let F and G be the preimages of f and g in Z[x]. 1. Compute H 1 as the preimage of FG modulo p Compute H 2 as the preimage of FG modulo p Compute H 3 as the preimage of FG modulo p Compute the unique polynomial H with coefficients in {0,,P 1} that equals H i mod p i for all i {1, 2, 3}. Proposition 17. If 2 k (m 1) 2 <P then fg= H mod m. Proof. The coefficients of FH are nonnegative integers that are at most 2 k (m 1) 2. Example 18. With p , p ,andp ,onecanmultiplypolynomials over Z/m Z for all m<2 64 and up to outdegree
8 Introducing virtual roots of unity In order to benefit of the FFT over any ring, Schönhage and Strassen, proposedtointroducevirtual roots of unity as follows: Lemma 19. If 2 is invertible in R and if n is a power of 2 then the class of x in A = R[x]/(x n +1) is a 2 nth primitive root of unity. Proof. It is clear that x is a 2 nth root of unity in R. Ifx were not primitive then x t 1 would be zero for astrictdivisort of 2 n. Thereforet divides n, whencex n =1holds in R, whichisnotpossiblesince2 is assumed to be a unit. 15 Fast universal polynomial product Let R be a ring with unity, where 2 is invertible and whose inverse is given. Algorithm 4 Input. f and g of degrees at most n 1, wheren =2 k. Output. fg. 1. Set d 2 k/2. 2. Rewrite f and g into F (x, y) F 0 (x)+f 1 (x) y + + F d (x) y d 1, G(x, y) G 0 (x)+g 1 (x) y + + G d (x) y d 1, so that the F i and G i have degree at most d 1, and f(x)=f (x, x d ), g(x)=g(x, x d ). 3. Compute H FG in A[y], wherea R[x]/(x 2d +1) via FFT and using the present algorithm recursively to compute products in A. 4. Return H(x, x d ). 16
9 Analysis of the fast universal polynomial product Proposition 20. Algorithm 4 works correctly as specified, and takes O(n log n log log n) operations in R. Proof. (Sketch) Since the class of x in A has order 4 d. TheFFTiny can be used to compute FG seen in A[y]. ThelatterproductcanbeliftedinR[x][y] since the degree in x of F and G is at most 2(d 1). Steps 2 and 4 take O(n) operations. Step 3 performs: O(d log d) additions and subtractions in A, whichreducetoo(d) operations in R, O(d log d) multiplication by a power of ω, whichreducestoo(d) operations in R, O(d) products in A. Let F (n) represent the cost function. It satisfies the recurrence F (n) df(d)+αnlog n for some positive constant α. Letting Φ(k) =F (2 k )/2 k,thelatterinequalityrewritesintoφ(k) Φ( k/2 ) +α k,fork sufficiently large, which concludes the proof. 17 Extension to any characteristic Remark 21. If 2 is not invertible but 3 is invertible then we can do similar computing via a triadic adaptation of the FFT. Remark 22. If neither 2 and 3 are known to be invertible then we compute 2 k times the product by performing the later algorithms without dividing by 2. Wealsocompute3 l times the product. From a Bézout relation u 2 k + v 3 l =1 we deduce the product. Remark 23. The cost of the FFT is essentially constant between two consecutive powers of n. Thiscost can be smoothen thanks to the truncated Fourier tranform, proposed by van der Hoeven. 18
10 The multiplication cost function We denote by M(n) a cost function for multiplying two univariate polynomials of degree n over an arbitrary commutative ring R with unity, in terms of the number of arithmetic operations in R. Naive Karatsuba Schönhage & Strassen & Cantor & Kaltofen O(n 2 ) O(n log23 ) O(n log n log log n) We assume that M(n)/n is increasing and that M(mn) m 2 M(n) holds for all positive integers m and n. This is satisfied by the above cost functions. Exercise 1. Let f R[x] and let a R. Showthatf(a + x) can be computed with O(M(n) log n) operations in R. 19 Multi-product Algorithm 5 Input. Polynomials f 1,,f r in R[x]. Output. f 1 f r. 1. If r =1 then return f Let h = r/2 and compute recursively g 1 f 1 f h and g 2 f h+1 f r. 3. Return g 1 g 2. Proposition 24. Algorithm 5 is correct and takes O(M(n) log 2 r) operations in R, wheren r i=1 deg f i. Proof. f 1 f r f 1 f h f h+1 f r f 1 f h f h +1 f h f h+1 f h f h +1 f r The depth of this tree is in O(log r). The sum of the degree of a given depth is always at most r i=1 f i. 20
11 Similarities with integers (1/3) Definition 25. Let B be a power of 2. Any integer a N can be uniquely represented by its expansion a = i 0 a i B i in base B, witha i {0,,B 1}. Thedense B-adic representation of an integer a<b n is the vector (a 0,,a n ). Remark 26. It is usual to take B =2in theory, but in practice it is better to take large values of B around Proposition 27. a<b n and b<b n then their product can be computed with O(n 2 log 2 B) bit-operations. Exercise 2. Adapt the Karatsuba algorithm for multiplying integers. 21 Similarities with integers (2/3) Suppose we want to multiply two integers a<b n and b<b n given in dense B-adic representation. Let f(x) i 0 a i x i and g(x) i 0 b i x i. Using the Schönhage and Strassen algorithm for computing h in Z/m Z with m n (B 1) fg takes O(n log n loglog n) operations In fact this approach can be improved by adapting the Schönhage and Strassen algorithm directly to N, thusleadingto: Proposition 28. [ Schönhage and Strassen, 1971]The product of two integers of n bits can be done with O(n log n log log n) bit-operations. Proposition 29. [ Fürer, 2007]The product of two integers of n bits can be done with O(n log n log n) bit-operations. Here log represents the iterated logarithm of n. 22
12 Similarities with integers (3/3) Similarly to polynomials, we introduce the const function I(n) for multiplying two integers of bit-size at most n in binary representation. Naive Karatsuba Schönhage & Strassen Fürer O(n 2 ) O(n log23 ) O(n log n log log n) O(n log n 2 log n ) We assume that I(n)/n is increasing and that I(mn) m 2 I(n) holds for all positive integers m and n. This is satisfied by the above cost functions. 23 Dense representation of Multivariate polynomials Any polynomial f in R[z 1,,z n ] is made of a sum of terms, with each term composed of a coefficient and an exponent seen as a vector in N n.foranexponente =(e 1,,e n ) N n e,themonomialz 1 e 1 z n n will be written z e.foranye N n,weletf e denote the coefficient of z e in f. Definition 30. The support of f is defined by supp f = {e N n f e 0}. A block is a subset of N n of the form n j=1 {0, 1,,d j 1}, withd 1,,d n N. Givenapolynomial f R[z 1,,z n ],itsblock support is the smallest block such that: n dsupp(f)= j=1 {0, 1,,d f,j } with supp(f) dsupp(f). Inotherwords,assumingd f 0,wehaved f,j = deg zj f +1 for j =1,,n.We will denote by d f = d f,1 d f,n the cardinality of dsupp(f). Definition 31. The dense block representation of f,isthedataofthed f,j and of the vector of the coefficients corresponding to the monomials of dsupp(f) in lexicographic order. 24
13 The Kronecker substitution For computing h = fg,thekroneckersubstitutionisdefinedasfollows: K dh : R[z 1,,z n ] R[x] f f(x,x dh,1,x dh,1dh,2,,x dh,1 dh,n 1 ). We compute K dh (f) and K dh (g), performtheirproduct,andrecoverh by h = K 1 dh (K dh (f) K dh (g)). Proposition 32. Assuming the block dense representation, the product h = fg can be computed using M(d h ) operations in R. Exercise 3. Multiply f x + y by g x y +1 by using the Kronecker substitution. 25 The Kronecker substitution over the integers (1/2) Over the integers, namely when R = Z, onecanfurtherapplythekroneckersubstitutiontoreduceto the multiplication of two large integers. For any integer a we write l a = log 2 ( a +1) for its bit-size, and denote by l f = max e l fe the maximal bit-length of the coefficients of f (and similarly for g and h). Since max e we have l h η l f + l g + l min(df,d g ). h e min (d f,d g ) max e f e max g e, e The coefficients of h thus have bit-length at most η. Wewillbeabletorecoverthem(withtheirsigns)from an approximation modulo 2 η+1.thesubstitutionworksasfollows: K dh,η: Z[z 1,,z n ] Z f K dh (f)(2 η+1 ). One thus computes K dh,η(f) and K dh,η(g), doestheintegerproduct,andrecovers h = K 1 dh,η(k dh,η(f) K dh,η(g)). Exercise 4. Multiply f x + y by g x y +1 by using tha latter Kronecker substitution. 26
14 The Kronecker substitution over the integers (2/2) Corollary 33. With the above block dense representation, the product h of f times g in Z[z 1, O(I(η d h )+ni(log d h )+(d f +d g ) log d h ) bit-operations.,z n ] takes Proof. The evaluation at 2 η+1 takes linear time thanks to the binary representation of the integers being used. Remark 34. In a similar way, we may use the Kronecker substitution for the multiplication of polynomials with modular coefficients in R = Z/p Z, p {2, 3, }. Indeed,wefirstmapf,g R[z 1, z n ] to polynomials in {0,,p 1}[z 1,,z n ] Z[z 1,,z n ],multiplythemasintegerpolynomials,andfinallyreducemodulo p. 27
Elliptic Curves Spring 2013 Lecture #3 02/12/2013
18.783 Elliptic Curves Spring 2013 Lecture #3 02/12/2013 3.1 Arithmetic in finite fields To make explicit computations with elliptic curves over finite fields, we need to know how to perform arithmetic
More informationFaster integer multiplication using short lattice vectors
Faster integer multiplication using short lattice vectors David Harvey and Joris van der Hoeven ANTS XIII, University of Wisconsin, Madison, July 2018 University of New South Wales / CNRS, École Polytechnique
More informationCPSC 518 Introduction to Computer Algebra Asymptotically Fast Integer Multiplication
CPSC 518 Introduction to Computer Algebra Asymptotically Fast Integer Multiplication 1 Introduction We have now seen that the Fast Fourier Transform can be applied to perform polynomial multiplication
More informationFast Polynomial Multiplication
Fast Polynomial Multiplication Marc Moreno Maza CS 9652, October 4, 2017 Plan Primitive roots of unity The discrete Fourier transform Convolution of polynomials The fast Fourier transform Fast convolution
More informationEven faster integer multiplication
Even faster integer multiplication DAVID HARVEY School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au JORIS VAN DER HOEVEN a, GRÉGOIRE
More informationInteger multiplication with generalized Fermat primes
Integer multiplication with generalized Fermat primes CARAMEL Team, LORIA, University of Lorraine Supervised by: Emmanuel Thomé and Jérémie Detrey Journées nationales du Calcul Formel 2015 (Cluny) November
More informationOutput-sensitive algorithms for sumset and sparse polynomial multiplication
Output-sensitive algorithms for sumset and sparse polynomial multiplication Andrew Arnold Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, Canada Daniel S. Roche Computer Science
More information3 Finite fields and integer arithmetic
18.783 Elliptic Curves Lecture #3 Spring 2017 02/15/2017 3 Finite fields and integer arithmetic In order to perform explicit computations with elliptic curves over finite fields, we first need to understand
More informationFast integer multiplication
Fast integer multiplication David Harvey, Joris van der Hoeven, Grégoire Lecerf CNRS, École polytechnique Bordeaux, February 2, 2015 http://www.texmacs.org Fundamental complexities I(n): multiplication
More informationCPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication
CPSC 518 Introduction to Computer Algebra Schönhage and Strassen s Algorithm for Integer Multiplication March, 2006 1 Introduction We have now seen that the Fast Fourier Transform can be applied to perform
More informationImplementation of the DKSS Algorithm for Multiplication of Large Numbers
Implementation of the DKSS Algorithm for Multiplication of Large Numbers Christoph Lüders Universität Bonn The International Symposium on Symbolic and Algebraic Computation, July 6 9, 2015, Bath, United
More informationEven faster integer multiplication
Even faster integer multiplication DAVID HARVEY School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au JORIS VAN DER HOEVEN a, GRÉGOIRE
More informationInteger multiplication and the truncated product problem
Integer multiplication and the truncated product problem David Harvey Arithmetic Geometry, Number Theory, and Computation MIT, August 2018 University of New South Wales Political update from Australia
More informationFast reversion of power series
Fast reversion of power series Fredrik Johansson November 2011 Overview Fast power series arithmetic Fast composition and reversion (Brent and Kung, 1978) A new algorithm for reversion Implementation results
More informationChapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn
Chapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn Formulation of the D&C principle Divide-and-conquer method for solving a problem instance of size n: 1. Divide
More informationExact Arithmetic on a Computer
Exact Arithmetic on a Computer Symbolic Computation and Computer Algebra William J. Turner Department of Mathematics & Computer Science Wabash College Crawfordsville, IN 47933 Tuesday 21 September 2010
More informationFaster polynomial multiplication over nite elds
Faster polynomial multiplication over nite elds David Harvey School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au Joris van der Hoeven
More informationFast reversion of formal power series
Fast reversion of formal power series Fredrik Johansson LFANT, INRIA Bordeaux RAIM, 2016-06-29, Banyuls-sur-mer 1 / 30 Reversion of power series F = exp(x) 1 = x + x 2 2! + x 3 3! + x 4 G = log(1 + x)
More informationLiterature Review: Adaptive Polynomial Multiplication
Literature Review: Adaptive Polynomial Multiplication Daniel S. Roche November 27, 2007 While output-sensitive algorithms have gained a fair amount of popularity in the computer algebra community, adaptive
More informationCHAPTER 14. Ideals and Factor Rings
CHAPTER 14 Ideals and Factor Rings Ideals Definition (Ideal). A subring A of a ring R is called a (two-sided) ideal of R if for every r 2 R and every a 2 A, ra 2 A and ar 2 A. Note. (1) A absorbs elements
More informationNOTES ON FINITE FIELDS
NOTES ON FINITE FIELDS AARON LANDESMAN CONTENTS 1. Introduction to finite fields 2 2. Definition and constructions of fields 3 2.1. The definition of a field 3 2.2. Constructing field extensions by adjoining
More informationFast Multivariate Power Series Multiplication in Characteristic Zero
Fast Multivariate Power Series Multiplication in Characteristic Zero Grégoire Lecerf and Éric Schost Laboratoire GAGE, École polytechnique 91128 Palaiseau, France E-mail: lecerf,schost@gage.polytechnique.fr
More informationImplementing Fast Carryless Multiplication
Implementing Fast Carryless Multiplication Joris van der Hoeven, Robin Larrieu and Grégoire Lecerf CNRS & École polytechnique MACIS 2017 Nov. 15, Vienna, Austria van der Hoeven, Larrieu, Lecerf Implementing
More informationChapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples
Chapter 3 Rings Rings are additive abelian groups with a second operation called multiplication. The connection between the two operations is provided by the distributive law. Assuming the results of Chapter
More informationThree Ways to Test Irreducibility
Three Ways to Test Irreducibility Richard P. Brent Australian National University joint work with Paul Zimmermann INRIA, Nancy France 12 Feb 2009 Outline Polynomials over finite fields Irreducibility criteria
More informationPUTTING FÜRER ALGORITHM INTO PRACTICE WITH THE BPAS LIBRARY. (Thesis format: Monograph) Linxiao Wang. Graduate Program in Computer Science
PUTTING FÜRER ALGORITHM INTO PRACTICE WITH THE BPAS LIBRARY. (Thesis format: Monograph) by Linxiao Wang Graduate Program in Computer Science A thesis submitted in partial fulfillment of the requirements
More informationSpace- and Time-Efficient Polynomial Multiplication
Space- and Time-Efficient Polynomial Multiplication Daniel S. Roche Symbolic Computation Group School of Computer Science University of Waterloo ISSAC 2009 Seoul, Korea 30 July 2009 Univariate Polynomial
More information13 More on free abelian groups
13 More on free abelian groups Recall. G is a free abelian group if G = i I Z for some set I. 13.1 Definition. Let G be an abelian group. A set B G is a basis of G if B generates G if for some x 1,...x
More informationFast and Small: Multiplying Polynomials without Extra Space
Fast and Small: Multiplying Polynomials without Extra Space Daniel S. Roche Symbolic Computation Group School of Computer Science University of Waterloo CECM Day SFU, Vancouver, 24 July 2009 Preliminaries
More informationRINGS: SUMMARY OF MATERIAL
RINGS: SUMMARY OF MATERIAL BRIAN OSSERMAN This is a summary of terms used and main results proved in the subject of rings, from Chapters 11-13 of Artin. Definitions not included here may be considered
More informationCS 829 Polynomial systems: geometry and algorithms Lecture 3: Euclid, resultant and 2 2 systems Éric Schost
CS 829 Polynomial systems: geometry and algorithms Lecture 3: Euclid, resultant and 2 2 systems Éric Schost eschost@uwo.ca Summary In this lecture, we start actual computations (as opposed to Lectures
More informationPolynomial evaluation and interpolation on special sets of points
Polynomial evaluation and interpolation on special sets of points Alin Bostan and Éric Schost Laboratoire STIX, École polytechnique, 91128 Palaiseau, France Abstract We give complexity estimates for the
More informationInteger Multiplication
Integer Multiplication in almost linear time Martin Fürer CSE 588 Department of Computer Science and Engineering Pennsylvania State University 1/24/08 Karatsuba algebraic Split each of the two factors
More informationPrime Fields 04/05/2007. Hybrid system simulator for ODE 1. Galois field. The issue. Prime fields: naïve implementation
Galois field The issue Topic: finite fields with word size cardinality Field: 4 arithmetic operators to implement (+, -, *, /) We will focus on axpy: r = a x + y (operation mainly used in linear algebra
More informationThree Ways to Test Irreducibility
Outline Three Ways to Test Irreducibility Richard P. Brent Australian National University joint work with Paul Zimmermann INRIA, Nancy France 8 Dec 2008 Polynomials over finite fields Irreducibility criteria
More informationComputer Vision, Convolutions, Complexity and Algebraic Geometry
Computer Vision, Convolutions, Complexity and Algebraic Geometry D. V. Chudnovsky, G.V. Chudnovsky IMAS Polytechnic Institute of NYU 6 MetroTech Center Brooklyn, NY 11201 December 6, 2012 Fast Multiplication:
More informationChapter 8. P-adic numbers. 8.1 Absolute values
Chapter 8 P-adic numbers Literature: N. Koblitz, p-adic Numbers, p-adic Analysis, and Zeta-Functions, 2nd edition, Graduate Texts in Mathematics 58, Springer Verlag 1984, corrected 2nd printing 1996, Chap.
More informationLocal Fields. Chapter Absolute Values and Discrete Valuations Definitions and Comments
Chapter 9 Local Fields The definition of global field varies in the literature, but all definitions include our primary source of examples, number fields. The other fields that are of interest in algebraic
More informationSets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth
Sets We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth century. Most students have seen sets before. This is intended
More informationEven faster integer multiplication
Even faster integer multiplication David Harvey School of Mathematics and Statistics University of New South Wales Sydney NSW 2052 Australia Email: d.harvey@unsw.edu.au Joris van der Hoeven a, Grégoire
More informationPolynomials. Chapter 4
Chapter 4 Polynomials In this Chapter we shall see that everything we did with integers in the last Chapter we can also do with polynomials. Fix a field F (e.g. F = Q, R, C or Z/(p) for a prime p). Notation
More informationSpeedy Maths. David McQuillan
Speedy Maths David McQuillan Basic Arithmetic What one needs to be able to do Addition and Subtraction Multiplication and Division Comparison For a number of order 2 n n ~ 100 is general multi precision
More informationParallel Integer Polynomial Multiplication Changbo Chen, Svyatoslav Parallel Integer Covanov, Polynomial FarnamMultiplication
Parallel Integer Polynomial Multiplication Parallel Integer Polynomial Multiplication Changbo Chen 1 Svyatoslav Covanov 2,3 Farnam Mansouri 2 Marc Moreno Maza 2 Ning Xie 2 Yuzhen Xie 2 1 Chinese Academy
More informationFast multiplication and its applications
Algorithmic Number Theory MSRI Publications Volume 44, 2008 Fast multiplication and its applications DANIEL J. BERNSTEIN ABSTRACT. This survey explains how some useful arithmetic operations can be sped
More informationSerge Ballif January 18, 2008
ballif@math.psu.edu The Pennsylvania State University January 18, 2008 Outline Rings Division Rings Noncommutative Rings s Roots of Rings Definition A ring R is a set toger with two binary operations +
More information0 Sets and Induction. Sets
0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set
More informationCDM. Finite Fields. Klaus Sutner Carnegie Mellon University. Fall 2018
CDM Finite Fields Klaus Sutner Carnegie Mellon University Fall 2018 1 Ideals The Structure theorem Where Are We? 3 We know that every finite field carries two apparently separate structures: additive and
More informationg(x) = 1 1 x = 1 + x + x2 + x 3 + is not a polynomial, since it doesn t have finite degree. g(x) is an example of a power series.
6 Polynomial Rings We introduce a class of rings called the polynomial rings, describing computation, factorization and divisibility in such rings For the case where the coefficients come from an integral
More information2 The Truncated Fourier Transform and Applications The TFT permits to speed up the multiplication of univariate polynomials with a constant factor bet
The Truncated Fourier Transform and Applications Joris van der Hoeven D pt. de Math matiques (B t. 425) Universit Paris-Sud 91405 Orsay Cedex France Email: joris@texmacs.org January 9, 2004 In this paper,
More informationFast algorithms for polynomials and matrices Part 6: Polynomial factorization
Fast algorithms for polynomials and matrices Part 6: Polynomial factorization by Grégoire Lecerf Computer Science Laboratory & CNRS École polytechnique 91128 Palaiseau Cedex France 1 Classical types of
More informationFinite Fields and Error-Correcting Codes
Lecture Notes in Mathematics Finite Fields and Error-Correcting Codes Karl-Gustav Andersson (Lund University) (version 1.013-16 September 2015) Translated from Swedish by Sigmundur Gudmundsson Contents
More information2 Multi-point evaluation in higher dimensions tion and interpolation problems in several variables; as an application, we improve algorithms for multi
Multi-point evaluation in higher dimensions Joris van der Hoeven Laboratoire d'informatique UMR 7161 CNRS cole polytechnique 91128 Palaiseau Cedex France Email: vdhoeven@lix.polytechnique.fr Web: http://www.lix.polytechnique.fr/~vdhoeven
More informationCS 4424 Matrix multiplication
CS 4424 Matrix multiplication 1 Reminder: matrix multiplication Matrix-matrix product. Starting from a 1,1 a 1,n A =.. and B = a n,1 a n,n b 1,1 b 1,n.., b n,1 b n,n we get AB by multiplying A by all columns
More informationDiscrete Mathematics U. Waterloo ECE 103, Spring 2010 Ashwin Nayak May 17, 2010 Recursion
Discrete Mathematics U. Waterloo ECE 103, Spring 2010 Ashwin Nayak May 17, 2010 Recursion During the past week, we learnt about inductive reasoning, in which we broke down a problem of size n, into one
More informationBasic elements of number theory
Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a
More informationFrequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography
Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography Selçuk Baktır, Berk Sunar {selcuk,sunar}@wpi.edu Department of Electrical & Computer Engineering Worcester Polytechnic Institute
More informationBasic elements of number theory
Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation
More informationChinese Remainder Theorem
Chinese Remainder Theorem Theorem Let R be a Euclidean domain with m 1, m 2,..., m k R. If gcd(m i, m j ) = 1 for 1 i < j k then m = m 1 m 2 m k = lcm(m 1, m 2,..., m k ) and R/m = R/m 1 R/m 2 R/m k ;
More informationPolynomials, Ideals, and Gröbner Bases
Polynomials, Ideals, and Gröbner Bases Notes by Bernd Sturmfels for the lecture on April 10, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra We fix a field K. Some examples of fields
More informationChapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn
Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn Formulation of the D&C principle Divide-and-conquer method for solving a problem instance of size n: 1. Divide n c: Solve the problem
More informationCYCLICITY OF (Z/(p))
CYCLICITY OF (Z/(p)) KEITH CONRAD 1. Introduction For each prime p, the group (Z/(p)) is cyclic. We will give seven proofs of this fundamental result. A common feature of the proofs that (Z/(p)) is cyclic
More informationFast, Parallel Algorithm for Multiplying Polynomials with Integer Coefficients
, July 4-6, 01, London, UK Fast, Parallel Algorithm for Multiplying Polynomials with Integer Coefficients Andrzej Chmielowiec Abstract This paper aims to develop and analyze an effective parallel algorithm
More informationRelax, but Don t be Too Lazy
J. Symbolic Computation (2002) 34, 479 542 doi:10.1006/jsco.2002.0562 Available online at http://www.idealibrary.com on Relax, but Don t be Too Lazy JORIS VAN DER HOEVEN Dept. de Mathématiques (bât. 425),
More information15. Polynomial rings Definition-Lemma Let R be a ring and let x be an indeterminate.
15. Polynomial rings Definition-Lemma 15.1. Let R be a ring and let x be an indeterminate. The polynomial ring R[x] is defined to be the set of all formal sums a n x n + a n 1 x n +... a 1 x + a 0 = a
More informationarxiv: v1 [cs.ds] 28 Jan 2010
An in-place truncated Fourier transform and applications to polynomial multiplication arxiv:1001.5272v1 [cs.ds] 28 Jan 2010 ABSTRACT David Harvey Courant Institute of Mathematical Sciences New York University
More informationLinear recurrences with polynomial coefficients and application to integer factorization and Cartier-Manin operator
Linear recurrences with polynomial coefficients and application to integer factorization and Cartier-Manin operator Alin Bostan, Pierrick Gaudry, Éric Schost September 12, 2006 Abstract We study the complexity
More information1 Structure of Finite Fields
T-79.5501 Cryptology Additional material September 27, 2005 1 Structure of Finite Fields This section contains complementary material to Section 5.2.3 of the text-book. It is not entirely self-contained
More information2WF15 - Discrete Mathematics 2 - Part 1. Algorithmic Number Theory
1 2WF15 - Discrete Mathematics 2 - Part 1 Algorithmic Number Theory Benne de Weger version 0.54, March 6, 2012 version 0.54, March 6, 2012 2WF15 - Discrete Mathematics 2 - Part 1 2 2WF15 - Discrete Mathematics
More informationProfinite Groups. Hendrik Lenstra. 1. Introduction
Profinite Groups Hendrik Lenstra 1. Introduction We begin informally with a motivation, relating profinite groups to the p-adic numbers. Let p be a prime number, and let Z p denote the ring of p-adic integers,
More informationMA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES
MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018 57 5. p-adic Numbers 5.1. Motivating examples. We all know that 2 is irrational, so that 2 is not a square in the rational field Q, but that we can
More informationIntroduction to Abstract Mathematics
Introduction to Abstract Mathematics Notation: Z + or Z >0 denotes the set {1, 2, 3,...} of positive integers, Z 0 is the set {0, 1, 2,...} of nonnegative integers, Z is the set {..., 1, 0, 1, 2,...} of
More informationMulti-point evaluation in higher dimensions
x Multi-point evaluation in higher dimensions Joris van der Hoeven Laboratoire d informatique UMR 7161 CRS École polytechnique 91128 Palaiseau Cedex France Email: vdhoeven@lix.polytechnique.fr Web: http://www.lix.polytechnique.fr/~vdhoeven
More informationCOMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162
COMPUTER ARITHMETIC 13/05/2010 cryptography - math background pp. 1 / 162 RECALL OF COMPUTER ARITHMETIC computers implement some types of arithmetic for instance, addition, subtratction, multiplication
More information1 The Algebraic Normal Form
1 The Algebraic Normal Form Boolean maps can be expressed by polynomials this is the algebraic normal form (ANF). The degree as a polynomial is a first obvious measure of nonlinearity linear (or affine)
More information1. Algebra 1.5. Polynomial Rings
1. ALGEBRA 19 1. Algebra 1.5. Polynomial Rings Lemma 1.5.1 Let R and S be rings with identity element. If R > 1 and S > 1, then R S contains zero divisors. Proof. The two elements (1, 0) and (0, 1) are
More informationCHAPTER 10: POLYNOMIALS (DRAFT)
CHAPTER 10: POLYNOMIALS (DRAFT) LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN The material in this chapter is fairly informal. Unlike earlier chapters, no attempt is made to rigorously
More informationFast Polynomials Multiplication Using FFT
Li Chen lichen.xd at gmail.com Xidian University January 17, 2014 Outline 1 Discrete Fourier Transform (DFT) 2 Discrete Convolution 3 Fast Fourier Transform (FFT) 4 umber Theoretic Transform (TT) 5 More
More informationCongruences and Residue Class Rings
Congruences and Residue Class Rings (Chapter 2 of J. A. Buchmann, Introduction to Cryptography, 2nd Ed., 2004) Shoichi Hirose Faculty of Engineering, University of Fukui S. Hirose (U. Fukui) Congruences
More informationLECTURE NOTES IN CRYPTOGRAPHY
1 LECTURE NOTES IN CRYPTOGRAPHY Thomas Johansson 2005/2006 c Thomas Johansson 2006 2 Chapter 1 Abstract algebra and Number theory Before we start the treatment of cryptography we need to review some basic
More informationAbstract Algebra Part I: Group Theory
Abstract Algebra Part I: Group Theory From last time: Let G be a set. A binary operation on G is a function m : G G G Some examples: Some non-examples Addition and multiplication Dot and scalar products
More information6.S897 Algebra and Computation February 27, Lecture 6
6.S897 Algebra and Computation February 7, 01 Lecture 6 Lecturer: Madhu Sudan Scribe: Mohmammad Bavarian 1 Overview Last lecture we saw how to use FFT to multiply f, g R[x] in nearly linear time. We also
More informationBetween Sparse and Dense Arithmetic
Between Sparse and Dense Arithmetic Daniel S. Roche Computer Science Department United States Naval Academy NARC Seminar November 28, 2012 The Problem People want to compute with really big numbers and
More informationCSE 548: Analysis of Algorithms. Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication )
CSE 548: Analysis of Algorithms Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication ) Rezaul A. Chowdhury Department of Computer Science SUNY Stony Brook Spring 2015 Coefficient Representation
More informationON TESTING THE DIVISIBILITY OF LACUNARY POLYNOMIALS BY CYCLOTOMIC POLYNOMIALS
ON TESTING THE DIVISIBILITY OF LACUNARY POLYNOMIALS BY CYCLOTOMIC POLYNOMIALS Michael Filaseta 1 and Andrzej Schinzel August 30, 2002 1 The first author gratefully acknowledges support from the National
More informationFast polynomial factorization and modular composition
Fast polynomial factorization and modular composition Kiran S. Kedlaya MIT Christopher Umans Caltech June 13, 2011 Abstract We obtain randomized algorithms for factoring degree n univariate polynomials
More informationChapter 1 : The language of mathematics.
MAT 200, Logic, Language and Proof, Fall 2015 Summary Chapter 1 : The language of mathematics. Definition. A proposition is a sentence which is either true or false. Truth table for the connective or :
More informationComputing the Monodromy Group of a Plane Algebraic Curve Using a New Numerical-modular Newton-Puiseux Algorithm
Computing the Monodromy Group of a Plane Algebraic Curve Using a New Numerical-modular Newton-Puiseux Algorithm Poteaux Adrien XLIM-DMI UMR CNRS 6172 Université de Limoges, France SNC'07 University of
More informationNOTES ON DIOPHANTINE APPROXIMATION
NOTES ON DIOPHANTINE APPROXIMATION Jan-Hendrik Evertse January 29, 200 9 p-adic Numbers Literature: N. Koblitz, p-adic Numbers, p-adic Analysis, and Zeta-Functions, 2nd edition, Graduate Texts in Mathematics
More informationKnow the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.
The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring
More informationHMMT February 2018 February 10, 2018
HMMT February 018 February 10, 018 Algebra and Number Theory 1. For some real number c, the graphs of the equation y = x 0 + x + 18 and the line y = x + c intersect at exactly one point. What is c? 18
More informationAlgebra for error control codes
Algebra for error control codes EE 387, Notes 5, Handout #7 EE 387 concentrates on block codes that are linear: Codewords components are linear combinations of message symbols. g 11 g 12 g 1n g 21 g 22
More informationPolynomial Multiplication over Finite Fields using Field Extensions and Interpolation
009 19th IEEE International Symposium on Computer Arithmetic Polynomial Multiplication over Finite Fields using Field Extensions and Interpolation Murat Cenk Department of Mathematics and Computer Science
More informationarxiv: v3 [cs.sc] 19 Sep 2008
Fast Integer Multiplication Using Modular Arithmetic arxiv:0801.1416v3 [cs.sc] 19 Sep 2008 Anindya De, Piyush P Kurur, Chandan Saha Dept. of Computer Science and Engineering Indian Institute of Technology,
More informationFunctions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014
Functions and cardinality (solutions) 21-127 sections A and F TA: Clive Newstead 6 th May 2014 What follows is a somewhat hastily written collection of solutions for my review sheet. I have omitted some
More informationSummary Slides for MATH 342 June 25, 2018
Summary Slides for MATH 342 June 25, 2018 Summary slides based on Elementary Number Theory and its applications by Kenneth Rosen and The Theory of Numbers by Ivan Niven, Herbert Zuckerman, and Hugh Montgomery.
More informationIntroduction to finite fields
Chapter 7 Introduction to finite fields This chapter provides an introduction to several kinds of abstract algebraic structures, particularly groups, fields, and polynomials. Our primary interest is in
More informationComputing Characteristic Polynomials of Matrices of Structured Polynomials
Computing Characteristic Polynomials of Matrices of Structured Polynomials Marshall Law and Michael Monagan Department of Mathematics Simon Fraser University Burnaby, British Columbia, Canada mylaw@sfu.ca
More informationHomework 10 M 373K by Mark Lindberg (mal4549)
Homework 10 M 373K by Mark Lindberg (mal4549) 1. Artin, Chapter 11, Exercise 1.1. Prove that 7 + 3 2 and 3 + 5 are algebraic numbers. To do this, we must provide a polynomial with integer coefficients
More informationOn The Weights of Binary Irreducible Cyclic Codes
On The Weights of Binary Irreducible Cyclic Codes Yves Aubry and Philippe Langevin Université du Sud Toulon-Var, Laboratoire GRIM F-83270 La Garde, France, {langevin,yaubry}@univ-tln.fr, WWW home page:
More informationAn Approach to Hensel s Lemma
Irish Math. Soc. Bulletin 47 (2001), 15 21 15 An Approach to Hensel s Lemma gary mcguire Abstract. Hensel s Lemma is an important tool in many ways. One application is in factoring polynomials over Z.
More information