Fast reversion of power series

Size: px
Start display at page:

Download "Fast reversion of power series"

Transcription

1 Fast reversion of power series Fredrik Johansson November 2011

2 Overview Fast power series arithmetic Fast composition and reversion (Brent and Kung, 1978) A new algorithm for reversion Implementation results

3 Operations on power series Let R be a commutative ring (with 1). We consider arithmetic in the ring of truncated formal power series P = R[[x]]/ x n. n 1 a = a(x) = a k x k, a k = [x k ]a(x) R. k=0 Addition h(x) = f(x)+g(x) = n 1 k=0 (f k +g k )x k Multiplication h(x) = f(x)g(x) = ( n 1 k ) k=0 i=0 f ig k i x k Reciprocal If f 0 is a unit, h(x) such that f(x)h(x) = 1 Composition Reversion If g 0 = 0, h(x) = f(g(x)) = n 1 k=0 f k(g(x)) k If f 0 = 0 and f 1 is a unit, h(x) s.t. f(h(x)) = x

4 Computational complexity We measure complexity (as a function of n) for an operation in P by counting the number of ring operations in R. M(n): multiplying two length-n polynomials Classical M(n) = O(n 2 ) Karatsuba M(n) = O(n log 2 (3) ) = O(n 1.59 ) Fast Fourier Transform M(n) = O(nlog 1+o(1) n) = O(n 1+o(1) n) MM(n) = O(n ω ): multiplying two n n matrices Classical MM(n) = O(n 3 ) Strassen MM(n) = O(n log 2 (7) ) = O(n 2.81 ) Coppersmith-Winograd MM(n) = O(n 2.38 )

5 Newton iteration Let g k P and ϕ P[t] be such that ϕ (g k ) is invertible and ϕ(g k ) 0 mod x m. If g k+1 P is a solution of g k+1 g k ϕ(g k) ϕ (g k ) mod x2m, then ϕ(g k+1 ) 0 mod x 2m, g k+1 g k mod x m, and ϕ (g k+1 ) is invertible. O(M(n)) computation of 1/f: take ϕ(g) = 1 g iteration g k+1 = 2g k fgk 2. f, giving the

6 Reversion using Newton iteration Let f P with [x 0 ]f = 0 and [x 1 ]f invertible in R. Define ϕ by ϕ(g(x)) = f(g(x)) x. Then ϕ(f 1 (x)) = 0, so the compositional inverse (reversion) f 1 is a root of ϕ. Quadratically convergent iteration: g k+1 = g k f(g k) x f. (g k ) Up to constant factors, composition reversion (Brent and Kung, 1978).

7 Fast composition Can we reduce composition to multiplication?

8 Composition by elementary functions Assume that 1,2,...,n 1 are invertible in R. n 2 f (x) = (k +1)f k+1 x k k=0 log(1+f(x)) = f (x) 1+f(x) n 1 ( ) 1 f(x) = f k 1 x k k k=1 atan(f(x)) = f (x) 1+(f(x)) 2 Newton iteration: log exp, atan tan. sin, cos, sinh, cosh, asin... using algebraic transformations. Cost: O(M(n)) = O(n 1+o(1) ). Generalization: differential equations (hypergeometric,...)

9 Composition of general power series Horner s rule f(g(x)) = f 0 +g(f 1 +g(f 2 + +g(f n 2 +f n 1 x) )) Complexity: O(nM(n)) Brent-Kung 2.1: baby-step, giant-step version of Horner s rule Complexity: O(n 1/2 M(n)+n 1/2 MM(n 1/2 )) Brent-Kung 2.2: divide-and-conquer Taylor expansion Complexity: O((nlogn) 1/2 M(n))

10 Brent-Kung algorithm 2.1 Example with n = 9, m = n = 3 Computing f(g(x)) where f(x) = f 0 +f 1 x +...+f 8 x 8 (f 0 +f 1 g +f 2 g 2 )+(f 3 +f 4 g +f 5 g 2 )g 3 +(f 6 +f 7 g +f 8 g 2 )g 6 (m m) (m m 2 ) matrix multiplication: f 0 f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 1 g g 2 Final combination using block Horner s rule.

11 Complexity of composition algorithms Horner s rule: O(nM(n)) BK 2.1: O(n 1/2 M(n)+n 1/2 MM(n 1/2 )) BK 2.2: O((nlogn) 1/2 M(n)) = O(n 3/2+o(1) ) M(n) MM(n) Horner BK 2.1 BK 2.2 n 2 n 3 n 3 n 2.5 n 2.5 log 0.5 n n 1.59 n 3 n 2.59 n 2.09 n 2.09 log 0.5 n nlogn n 3 n 2 logn n 2 n 1.5 log 1.5 n nlogn n 2.38 n 2 logn n 1.69 n 1.5 log 1.5 n (nlogn) (n 2 ) (n 2 logn) (n 1.5 logn) (n 1.5 log 1.5 n) BK 2.1 wins for small n, BK 2.2 wins for large n BK 2.1 wins with hypothetical O(n 2 ) matrix multiplication

12 The Lagrange inversion theorem If f(x) = x/h(x) then the compositional inverse or reversion f 1 (x) satisfying f(f 1 (x)) = f 1 (f(x)) = x exists and its coefficients are given by [x k ]f 1 (x) = 1 k [xk 1 ]h(x) k. O(nM(n)) algorithm: compute x/h(x) using Newton iteration for the reciprocal, then compute h,h 2,h 3,... using successive multiplications Better than classical algorithms (O(n 3 )) Equivalent to Newton iteration + Horner s rule Worse than Newton iteration + BK2.1 or BK2.2

13 Fast Lagrange inversion For 0 < k < n, write k = im+j. Using the definition of the Cauchy product, we can extract a single coefficient in O(n) operations: [x k ]h k = k r=0 ( ) ([x r ])h im [x k r ] h j We only need to compute h j where j = 1,2,...,m 1 and h im where i = 1,2,...,n/m. Choose m n only O( n) polynomial multiplications. We replace O(n) full polynomial multiplications with O(n 2 ) coefficient operations.

14 Fast Lagrange inversion, first version 1: m n 2: h x/f mod x n 1 3: for 1 i < m do 4: h i+1 h i h mod x n 1 5: b i 1 i [xi 1 ]h i 6: end for 7: t h m 8: for i = m,2m,3m,...,lm < n do 9: b i 1 i [xi 1 ]t 10: for 1 j < m while i +j < n do 11: b i+j 1 i+j i+j 1 k=0 ([xk ]t) ([x i+j k 1 ]h j ) 12: end for 13: t t h m mod x n 1 14: end for 15: return b 1 +b 2 x +...+b n 1 x n 1

15 Using matrix multiplication Take n = 8, m = 8 1 = 3. We need the coefficients b 1,b 2,...,b 7 of 1,x,...,x 6 in powers of h. If hi k [x i ]h k : h2 0 h1 0 h A = h5 3 h4 3 h3 3 h2 3 h1 3 h (h8 6) (h6 7 ) h6 6 h5 6 h4 6 h3 6 h2 6 h1 6 h h0 1 h1 1 h2 1 h3 1 h4 1 h5 1 h 1 6 B = 0 h0 2 h1 2 h2 2 h3 2 h4 2 h5 2 h6 2 (h7 2) h0 3 h1 3 h2 3 h3 3 h4 3 h5 3 h6 3 (h7 3) (h3 8 ) b 1 b 2 b 3 AB T = b 4 b 5 b 6 b 7 Example: b 5 = h 3 4 h2 0 +h3 3 h2 1 +h3 2 h2 2 +h3 1 h2 3 +h3 0 h2 4

16 Fast Lagrange inversion, matrix version 1: m n 1 2: h x/f mod x n 1 3: {Assemble m m 2 matrices B and A from h,h 2,...,h m and h m,h 2m,h 3m,...} 4: for 1 i m, 1 j m 2 do 5: B i,j [x i+j m 1 ] h i 6: A i,j [x im j ] h (i 1)m 7: end for 8: C AB T 9: for 1 i < n do 10: b i C i /i (C i is the ith entry of C read rowwise) 11: end for 12: return b 1 +b 2 x +...+b n 1 x n 1

17 Comparison with BK 2.1 Let m = n. Fast Lagrange inversion for reversion: 1. 2m + O(1) polynomial multiplications 2. One (m m 2 ) times (m 2 m) matrix multiplication 3. O(n) additional operations Fast Horner s rule (BK 2.1) for composition: 1. m polynomial multiplications, each with cost M(n) 2. One (m m) times (m m 2 ) matrix multiplication 3. m polynomial multiplications and additions Both O(n 1/2 (M(n)+MM(n 1/2 ))), same constant factor.

18 Speedup by avoiding Newton iteration Suppose composition has cost C(n) cn r. Overhead of reversion using Newton iteration: C(n)+C(n/2)+C(n/4)+... = cn r ( 2 r 2 r 1 Classical polynomial multiplication: 4 31 (8+ 2) FFT polynomial multiplication, classical matrix multiplication: 4/3 )

19 Newton iteration speedup, visually speedup r

20 Faster matrix multiplication The matrices in BK 2.1 are full, whereas the matrix A in fast Lagrange inversion is half empty. Can we exploit this structure while using fast matrix multiplication (ω < 3)?

21 Faster matrix multiplication, first algorithm Decompose each m m block A i into blocks of size (m/k) (m/k) such that only the bottom row in is nonempty. Asymptotic speedup s: s = m ω+1 / k=1 ( m k m ) k 2( m ) ω k +1 k s > ( k=0 ) 1 2 k 1 2 kω = ω > 1

22 Faster matrix multiplication, second algorithm Write AB T = (AP)(P 1 B T ) where P is a permutation matrix that makes each m m block in A lower triangular. Recursive triangular multiplication: R(k) = 4R(k/2)+2(k/2) ω +O(k 2 ), s = 2 ω 1 2. s > 1 when ω > log , and better than the first method when ω > 1+log 2 (2+ 2) Optimal factor-two speedup with classical multiplication, and 3/2 speedup with Strassen.

23 Matrix multiplication speedup 2.0 s Ω

24 Fast rectangular matrix multiplication MM(x,y,z): (x y) by (y z) matrix multiplication Huang and Pan (1998): MM(m,m,m 2 ) = O(n ) < mmm(m,m,m) = O(n ) The exponents of MM(m,m 2,m) and MM(m,m,m 2 ) are the same, but could we lose a constant factor? Conjecture: MM(m,m 2,m) = (1+o(1))MM(m,m,m 2 )

25 Total speedup Theoretical speedup of fast Lagrange inversion over BK 2.1 by both avoiding Newton iteration and speeding up matrix multiplication. Dominant operation Complexity Newton Matrix Total Polynomial, classical O(n 5/2 ) Polynomial, Karatsuba O(n 1/2+log 2 3 ) Matrix, classical O(n 2 ) Matrix, Strassen O(n (1+log 2 7)/2 ) Matrix, Cop.-Win. O(n ) Matrix, Huang-Pan O(n ) ? 1.458? (Polynomial, FFT) O(n 3/2 log 1+o(1) n)

26 Implementation Fast composition and reversion implemented in FLINT ( Rings: Z, Z/pZ, Q

27 Reversion over (Z/pZ)[[x]] Input is a a power series with random coefficients, p = n Lagrange BK 2.1 Fast Lagrange µs 21 µs 7.0 µs ms 1.3 ms 0.76 ms ms 100 ms 62 ms s 5.1 s 3.3 s h 260 s 160 s Observed speedup: 1.6 Predicted speedup with O(n 1+o(1) ) multiplication and O(n 2 ) matrix multiplication: 1.54 Matrix multiplication negligible (< 10% of running time)

28 Reversion over Z[[x]] f 1 (x) = k 1k!x k f 2 (x) = x 1 4x f 3 (x) = x +x2 1+x +x 2 n Lagrange BK 2.1 Fast Lagrange f 1 f 2 f 3 f 1 f 2 f 3 f 1 f 2 f µs ms ms s s s Fast Lagrange inversion can lose its advantage (but usually does not get significantly slower than BK 2.1) It can also be much faster (if x/f(x) is small) Matrix multiplication is negligible (< 10% of running time)

29 Reversion over Q[[x]] f 4 (x) = exp(x) 1 f 5 (x) = x exp(x) f 6 (x) = 3x(1 x2 ) 2(1 x +x 2 ) 2 n Lagrange BK 2.1 Fast Lagrange f 4 f 5 f 6 f 4 f 5 f 6 f 4 f 5 f µs ms ms s s Matrix multiplication is negligible (< 20% of running time), but 10 times more costly if not implemented carefully (clearing denominators)!

30 Conclusions Reversion can be done using an algorithm analogous to BK 2.1, but directly (without Newton iteration) Faster than classical algorithms (no overhead), faster than BK 2.1 Faster than BK 2.2 up to fairly large n (since matrix multiplication is cheap in practice) But memory consumption can be a problem (BK 2.2 asymptotically better)

Fast reversion of formal power series

Fast 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 information

CS 4424 Matrix multiplication

CS 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 information

Fast Polynomial Multiplication

Fast 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 information

Fast algorithms for polynomials and matrices Part 2: polynomial multiplication

Fast algorithms for polynomials and matrices Part 2: polynomial multiplication Fast algorithms for polynomials and matrices Part 2: polynomial multiplication by Grégoire Lecerf Computer Science Laboratory & CNRS École polytechnique 91128 Palaiseau Cedex France 1 Notation In this

More information

Between Sparse and Dense Arithmetic

Between 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 information

Section 5.1 Composite Functions

Section 5.1 Composite Functions Section 5. Composite Functions Objective #: Form a Composite Function. In many cases, we can create a new function by taking the composition of two functions. For example, suppose f(x) x and g(x) x +.

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

How to find good starting tensors for matrix multiplication

How to find good starting tensors for matrix multiplication How to find good starting tensors for matrix multiplication Markus Bläser Saarland University Matrix multiplication z,... z,n..... z n,... z n,n = x,... x,n..... x n,... x n,n y,... y,n..... y n,... y

More information

Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201

Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201 Divide and Conquer: Polynomial Multiplication Version of October 7, 2014 Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201 Outline Outline: Introduction The polynomial multiplication

More information

L. Vandenberghe EE133A (Spring 2017) 3. Matrices. notation and terminology. matrix operations. linear and affine functions.

L. Vandenberghe EE133A (Spring 2017) 3. Matrices. notation and terminology. matrix operations. linear and affine functions. L Vandenberghe EE133A (Spring 2017) 3 Matrices notation and terminology matrix operations linear and affine functions complexity 3-1 Matrix a rectangular array of numbers, for example A = 0 1 23 01 13

More information

Polynomial evaluation and interpolation on special sets of points

Polynomial 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 information

CS 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 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 information

Introduction to Algorithms

Introduction to Algorithms Lecture 1 Introduction to Algorithms 1.1 Overview The purpose of this lecture is to give a brief overview of the topic of Algorithms and the kind of thinking it involves: why we focus on the subjects that

More information

Chapter 2. Divide-and-conquer. 2.1 Strassen s algorithm

Chapter 2. Divide-and-conquer. 2.1 Strassen s algorithm Chapter 2 Divide-and-conquer This chapter revisits the divide-and-conquer paradigms and explains how to solve recurrences, in particular, with the use of the master theorem. We first illustrate the concept

More information

Elliptic Curves Spring 2013 Lecture #3 02/12/2013

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 information

Mathematics for Business and Economics - I. Chapter 5. Functions (Lecture 9)

Mathematics for Business and Economics - I. Chapter 5. Functions (Lecture 9) Mathematics for Business and Economics - I Chapter 5. Functions (Lecture 9) Functions The idea of a function is this: a correspondence between two sets D and R such that to each element of the first set,

More information

Applications. More Counting Problems. Complexity of Algorithms

Applications. More Counting Problems. Complexity of Algorithms Recurrences Applications More Counting Problems Complexity of Algorithms Part I Recurrences and Binomial Coefficients Paths in a Triangle P(0, 0) P(1, 0) P(1,1) P(2, 0) P(2,1) P(2, 2) P(3, 0) P(3,1) P(3,

More information

Exact Arithmetic on a Computer

Exact 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 information

SOLVED PROBLEMS ON TAYLOR AND MACLAURIN SERIES

SOLVED PROBLEMS ON TAYLOR AND MACLAURIN SERIES SOLVED PROBLEMS ON TAYLOR AND MACLAURIN SERIES TAYLOR AND MACLAURIN SERIES Taylor Series of a function f at x = a is ( f k )( a) ( x a) k k! It is a Power Series centered at a. Maclaurin Series of a function

More information

2a 2 4ac), provided there is an element r in our

2a 2 4ac), provided there is an element r in our MTH 310002 Test II Review Spring 2012 Absractions versus examples The purpose of abstraction is to reduce ideas to their essentials, uncluttered by the details of a specific situation Our lectures built

More information

Matrix Multiplication

Matrix Multiplication Matrix Multiplication Matrix Multiplication Matrix multiplication. Given two n-by-n matrices A and B, compute C = AB. n c ij = a ik b kj k=1 c 11 c 12 c 1n c 21 c 22 c 2n c n1 c n2 c nn = a 11 a 12 a 1n

More information

Three Ways to Test Irreducibility

Three 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 information

Fast Convolution; Strassen s Method

Fast Convolution; Strassen s Method Fast Convolution; Strassen s Method 1 Fast Convolution reduction to subquadratic time polynomial evaluation at complex roots of unity interpolation via evaluation at complex roots of unity 2 The Master

More information

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences CSE 421 Algorithms Richard Anderson Lecture 13 Divide and Conquer What you really need to know about recurrences Work per level changes geometrically with the level Geometrically increasing (x > 1) The

More information

Mathematical Olympiad Training Polynomials

Mathematical Olympiad Training Polynomials Mathematical Olympiad Training Polynomials Definition A polynomial over a ring R(Z, Q, R, C) in x is an expression of the form p(x) = a n x n + a n 1 x n 1 + + a 1 x + a 0, a i R, for 0 i n. If a n 0,

More information

Algebraic structures I

Algebraic structures I MTH5100 Assignment 1-10 Algebraic structures I For handing in on various dates January March 2011 1 FUNCTIONS. Say which of the following rules successfully define functions, giving reasons. For each one

More information

) = nlog b ( m) ( m) log b ( ) ( ) = log a b ( ) Algebra 2 (1) Semester 2. Exponents and Logarithmic Functions

) = nlog b ( m) ( m) log b ( ) ( ) = log a b ( ) Algebra 2 (1) Semester 2. Exponents and Logarithmic Functions Exponents and Logarithmic Functions Algebra 2 (1) Semester 2! a. Graph exponential growth functions!!!!!! [7.1]!! - y = ab x for b > 0!! - y = ab x h + k for b > 0!! - exponential growth models:! y = a(

More information

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b) Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography

Frequency 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 information

Chapter 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 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 information

Original citation: Hart, William B. and Novocin, Andrew (2011) Practical divide-and-conquer algorithms for polynomial arithmetic. In: CASC'11 Proceedings of the 13th international conference on Computer

More information

Three Ways to Test Irreducibility

Three 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 information

Fast Computation of Power Series Solutions of Systems of Differential Equations

Fast Computation of Power Series Solutions of Systems of Differential Equations Fast Computation of Power Series Solutions of Systems of Differential Equations Bruno.Salvy@inria.fr Algorithms Project, Inria Joint work with A. Bostan, F. Chyzak, F. Ollivier, É. Schost, A. Sedoglavic

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

φ(xy) = (xy) n = x n y n = φ(x)φ(y)

φ(xy) = (xy) n = x n y n = φ(x)φ(y) Groups 1. (Algebra Comp S03) Let A, B and C be normal subgroups of a group G with A B. If A C = B C and AC = BC then prove that A = B. Let b B. Since b = b1 BC = AC, there are a A and c C such that b =

More information

Complexity of Matrix Multiplication and Bilinear Problems

Complexity of Matrix Multiplication and Bilinear Problems Complexity of Matrix Multiplication and Bilinear Problems François Le Gall Graduate School of Informatics Kyoto University ADFOCS17 - Lecture 3 24 August 2017 Overview of the Lectures Fundamental techniques

More information

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R. Rings 10-26-2008 A ring is an abelian group R with binary operation + ( addition ), together with a second binary operation ( multiplication ). Multiplication must be associative, and must distribute over

More information

6.S897 Algebra and Computation February 27, Lecture 6

6.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 information

CPSC 518 Introduction to Computer Algebra Asymptotically Fast Integer Multiplication

CPSC 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 information

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents. Math120 - Precalculus. Final Review. Fall, 2011 Prepared by Dr. P. Babaali 1 Algebra 1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

More information

Examples 2: Composite Functions, Piecewise Functions, Partial Fractions

Examples 2: Composite Functions, Piecewise Functions, Partial Fractions Examples 2: Composite Functions, Piecewise Functions, Partial Fractions September 26, 206 The following are a set of examples to designed to complement a first-year calculus course. objectives are listed

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

Chapter 2: Functions, Limits and Continuity

Chapter 2: Functions, Limits and Continuity Chapter 2: Functions, Limits and Continuity Functions Limits Continuity Chapter 2: Functions, Limits and Continuity 1 Functions Functions are the major tools for describing the real world in mathematical

More information

Algebra Exam Fall Alexander J. Wertheim Last Updated: October 26, Groups Problem Problem Problem 3...

Algebra Exam Fall Alexander J. Wertheim Last Updated: October 26, Groups Problem Problem Problem 3... Algebra Exam Fall 2006 Alexander J. Wertheim Last Updated: October 26, 2017 Contents 1 Groups 2 1.1 Problem 1..................................... 2 1.2 Problem 2..................................... 2

More information

Introduction to finite fields

Introduction 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 information

Speedy Maths. David McQuillan

Speedy 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 information

Semester Review Packet

Semester Review Packet MATH 110: College Algebra Instructor: Reyes Semester Review Packet Remarks: This semester we have made a very detailed study of four classes of functions: Polynomial functions Linear Quadratic Higher degree

More information

CPSC 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 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 information

ax 2 + bx + c = 0 where

ax 2 + bx + c = 0 where Chapter P Prerequisites Section P.1 Real Numbers Real numbers The set of numbers formed by joining the set of rational numbers and the set of irrational numbers. Real number line A line used to graphically

More information

Algorithms and Data Structures

Algorithms and Data Structures Charles A. Wuethrich Bauhaus-University Weimar - CogVis/MMC June 1, 2017 1/44 Space reduction mechanisms Range searching Elementary Algorithms (2D) Raster Methods Shell sort Divide and conquer Quicksort

More information

Partitions in the quintillions or Billions of congruences

Partitions in the quintillions or Billions of congruences Partitions in the quintillions or Billions of congruences Fredrik Johansson November 2011 The partition function p(n) counts the number of ways n can be written as the sum of positive integers without

More information

CS 4424 GCD, XGCD

CS 4424 GCD, XGCD CS 4424 GCD, XGCD eschost@uwo.ca GCD of polynomials First definition Let A and B be in k[x]. k[x] is the ring of polynomials with coefficients in k A Greatest Common Divisor of A and B is a polynomial

More information

Mathematics 136 Calculus 2 Everything You Need Or Want To Know About Partial Fractions (and maybe more!) October 19 and 21, 2016

Mathematics 136 Calculus 2 Everything You Need Or Want To Know About Partial Fractions (and maybe more!) October 19 and 21, 2016 Mathematics 36 Calculus 2 Everything You Need Or Want To Know About Partial Fractions (and maybe more!) October 9 and 2, 206 Every rational function (quotient of polynomials) can be written as a polynomial

More information

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

More information

ACM106a - Homework 2 Solutions

ACM106a - Homework 2 Solutions ACM06a - Homework 2 Solutions prepared by Svitlana Vyetrenko October 7, 2006. Chapter 2, problem 2.2 (solution adapted from Golub, Van Loan, pp.52-54): For the proof we will use the fact that if A C m

More information

CSL361 Problem set 4: Basic linear algebra

CSL361 Problem set 4: Basic linear algebra CSL361 Problem set 4: Basic linear algebra February 21, 2017 [Note:] If the numerical matrix computations turn out to be tedious, you may use the function rref in Matlab. 1 Row-reduced echelon matrices

More information

Chapter Generating Functions

Chapter Generating Functions Chapter 8.1.1-8.1.2. Generating Functions Prof. Tesler Math 184A Fall 2017 Prof. Tesler Ch. 8. Generating Functions Math 184A / Fall 2017 1 / 63 Ordinary Generating Functions (OGF) Let a n (n = 0, 1,...)

More information

CSE 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 ) 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 information

6.1 Matrices. Definition: A Matrix A is a rectangular array of the form. A 11 A 12 A 1n A 21. A 2n. A m1 A m2 A mn A 22.

6.1 Matrices. Definition: A Matrix A is a rectangular array of the form. A 11 A 12 A 1n A 21. A 2n. A m1 A m2 A mn A 22. 61 Matrices Definition: A Matrix A is a rectangular array of the form A 11 A 12 A 1n A 21 A 22 A 2n A m1 A m2 A mn The size of A is m n, where m is the number of rows and n is the number of columns The

More information

Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn

Chapter 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 information

1 Lecture 8: Interpolating polynomials.

1 Lecture 8: Interpolating polynomials. 1 Lecture 8: Interpolating polynomials. 1.1 Horner s method Before turning to the main idea of this part of the course, we consider how to evaluate a polynomial. Recall that a polynomial is an expression

More information

Chapter 22 Fast Matrix Multiplication

Chapter 22 Fast Matrix Multiplication Chapter 22 Fast Matrix Multiplication A simple but extremely valuable bit of equipment in matrix multiplication consists of two plain cards, with a re-entrant right angle cut out of one or both of them

More information

Course Summary Math 211

Course Summary Math 211 Course Summary Math 211 table of contents I. Functions of several variables. II. R n. III. Derivatives. IV. Taylor s Theorem. V. Differential Geometry. VI. Applications. 1. Best affine approximations.

More information

Resultants. Chapter Elimination Theory. Resultants

Resultants. Chapter Elimination Theory. Resultants Chapter 9 Resultants 9.1 Elimination Theory We know that a line and a curve of degree n intersect in exactly n points if we work in the projective plane over some algebraically closed field K. Using the

More information

A Divide-and-Conquer Algorithm for Functions of Triangular Matrices

A Divide-and-Conquer Algorithm for Functions of Triangular Matrices A Divide-and-Conquer Algorithm for Functions of Triangular Matrices Ç. K. Koç Electrical & Computer Engineering Oregon State University Corvallis, Oregon 97331 Technical Report, June 1996 Abstract We propose

More information

Fast, Parallel Algorithm for Multiplying Polynomials with Integer Coefficients

Fast, 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 information

PUTTING 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) 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 information

An Introduction to Differential Algebra

An Introduction to Differential Algebra An Introduction to Differential Algebra Alexander Wittig1, P. Di Lizia, R. Armellin, et al. 1 ESA Advanced Concepts Team (TEC-SF) SRL, Milan Dinamica Outline 1 Overview Five Views of Differential Algebra

More information

Powers of Tensors and Fast Matrix Multiplication

Powers of Tensors and Fast Matrix Multiplication Powers of Tensors and Fast Matrix Multiplication François Le Gall Department of Computer Science Graduate School of Information Science and Technology The University of Tokyo Simons Institute, 12 November

More information

REDUNDANT TRINOMIALS FOR FINITE FIELDS OF CHARACTERISTIC 2

REDUNDANT TRINOMIALS FOR FINITE FIELDS OF CHARACTERISTIC 2 REDUNDANT TRINOMIALS FOR FINITE FIELDS OF CHARACTERISTIC 2 CHRISTOPHE DOCHE Abstract. In this paper we introduce so-called redundant trinomials to represent elements of nite elds of characteristic 2. The

More information

Part A Simulation and Statistical Programming HT15. Lecturer: Geoff Nicholls. University of Oxford. Lecture 10: Recursion, Efficiency and Runtime.

Part A Simulation and Statistical Programming HT15. Lecturer: Geoff Nicholls. University of Oxford. Lecture 10: Recursion, Efficiency and Runtime. Part A Simulation and Statistical Programming HT15 Lecturer: Geoff Nicholls University of Oxford Lecture 10: Recursion, Efficiency and Runtime. Overview for lecture 10 1. Recursive evaluation 2. Extended

More information

University of Toronto Mississauga

University of Toronto Mississauga Surname: First Name: Student Number: Tutorial: University of Toronto Mississauga Mathematical and Computational Sciences MAT33Y5Y Term Test 2 Duration - 0 minutes No Aids Permitted This exam contains pages

More information

MATRICES. a m,1 a m,n A =

MATRICES. a m,1 a m,n A = MATRICES Matrices are rectangular arrays of real or complex numbers With them, we define arithmetic operations that are generalizations of those for real and complex numbers The general form a matrix of

More information

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents. Math120 - Precalculus. Final Review Prepared by Dr. P. Babaali 1 Algebra 1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents. (a) 5

More information

U + V = (U V ) (V U), UV = U V.

U + V = (U V ) (V U), UV = U V. Solution of Some Homework Problems (3.1) Prove that a commutative ring R has a unique 1. Proof: Let 1 R and 1 R be two multiplicative identities of R. Then since 1 R is an identity, 1 R = 1 R 1 R. Since

More information

How large can a finite group of matrices be? Blundon Lecture UNB Fredericton 10/13/2007

How large can a finite group of matrices be? Blundon Lecture UNB Fredericton 10/13/2007 GoBack How large can a finite group of matrices be? Blundon Lecture UNB Fredericton 10/13/2007 Martin Lorenz Temple University, Philadelphia Overview Groups... and some of their uses Martin Lorenz How

More information

Fast Polynomial Factorization Over High Algebraic Extensions of Finite Fields

Fast Polynomial Factorization Over High Algebraic Extensions of Finite Fields Fast Polynomial Factorization Over High Algebraic Extensions of Finite Fields Erich Kaltofen Department of Mathematics North Carolina State University Raleigh, North Carolina 27695-8205, USA kaltofen@eos.ncsu.edu

More information

Computing L-series of geometrically hyperelliptic curves of genus three. David Harvey, Maike Massierer, Andrew V. Sutherland

Computing L-series of geometrically hyperelliptic curves of genus three. David Harvey, Maike Massierer, Andrew V. Sutherland Computing L-series of geometrically hyperelliptic curves of genus three David Harvey, Maike Massierer, Andrew V. Sutherland The zeta function Let C/Q be a smooth projective curve of genus 3 p be a prime

More information

Divide and Conquer. Andreas Klappenecker. [based on slides by Prof. Welch]

Divide and Conquer. Andreas Klappenecker. [based on slides by Prof. Welch] Divide and Conquer Andreas Klappenecker [based on slides by Prof. Welch] Divide and Conquer Paradigm An important general technique for designing algorithms: divide problem into subproblems recursively

More information

Divide and conquer. Philip II of Macedon

Divide and conquer. Philip II of Macedon Divide and conquer Philip II of Macedon Divide and conquer 1) Divide your problem into subproblems 2) Solve the subproblems recursively, that is, run the same algorithm on the subproblems (when the subproblems

More information

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002 Background on Groups, Rings, and Finite Fields Andreas Klappenecker September 12, 2002 A thorough understanding of the Agrawal, Kayal, and Saxena primality test requires some tools from algebra and elementary

More information

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B Chapter 8 - S&B Algebraic operations Matrix: The size of a matrix is indicated by the number of its rows and the number of its columns. A matrix with k rows and n columns is called a k n matrix. The number

More information

Addition sequences and numerical evaluation of modular forms

Addition sequences and numerical evaluation of modular forms Addition sequences and numerical evaluation of modular forms Fredrik Johansson (INRIA Bordeaux) Joint work with Andreas Enge (INRIA Bordeaux) William Hart (TU Kaiserslautern) DK Statusseminar in Strobl,

More information

* 8 Groups, with Appendix containing Rings and Fields.

* 8 Groups, with Appendix containing Rings and Fields. * 8 Groups, with Appendix containing Rings and Fields Binary Operations Definition We say that is a binary operation on a set S if, and only if, a, b, a b S Implicit in this definition is the idea that

More information

THE COMPLEXITY OF MULTIPLE-PRECISION ARITHMETIC 1. Richard P Brent. Computer Centre, Australian National University

THE COMPLEXITY OF MULTIPLE-PRECISION ARITHMETIC 1. Richard P Brent. Computer Centre, Australian National University THE COMPLEXITY OF MULTIPLE-PRECISION ARITHMETIC 1 Richard P Brent Computer Centre, Australian National University In studying the complexity of iterative processes it is usually assumed that the arithmetic

More information

Integer multiplication with generalized Fermat primes

Integer 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 information

Fast Matrix Multiplication Over GF3

Fast Matrix Multiplication Over GF3 Fast Matrix Multiplication Over GF3 Matthew Lambert Advised by Dr. B. David Saunders & Dr. Stephen Siegel February 13, 2015 Matrix Multiplication Outline Fast Matrix Multiplication Outline Fast Matrix

More information

Group-theoretic approach to Fast Matrix Multiplication

Group-theoretic approach to Fast Matrix Multiplication Jenya Kirshtein 1 Group-theoretic approach to Fast Matrix Multiplication Jenya Kirshtein Department of Mathematics University of Denver Jenya Kirshtein 2 References 1. H. Cohn, C. Umans. Group-theoretic

More information

Counting points on hyperelliptic curves

Counting points on hyperelliptic curves University of New South Wales 9th November 202, CARMA, University of Newcastle Elliptic curves Let p be a prime. Let X be an elliptic curve over F p. Want to compute #X (F p ), the number of F p -rational

More information

Math 304 (Spring 2010) - Lecture 2

Math 304 (Spring 2010) - Lecture 2 Math 304 (Spring 010) - Lecture Emre Mengi Department of Mathematics Koç University emengi@ku.edu.tr Lecture - Floating Point Operation Count p.1/10 Efficiency of an algorithm is determined by the total

More information

Linear Algebra I Lecture 8

Linear Algebra I Lecture 8 Linear Algebra I Lecture 8 Xi Chen 1 1 University of Alberta January 25, 2019 Outline 1 2 Gauss-Jordan Elimination Given a system of linear equations f 1 (x 1, x 2,..., x n ) = 0 f 2 (x 1, x 2,..., x n

More information

Linear Algebra March 16, 2019

Linear Algebra March 16, 2019 Linear Algebra March 16, 2019 2 Contents 0.1 Notation................................ 4 1 Systems of linear equations, and matrices 5 1.1 Systems of linear equations..................... 5 1.2 Augmented

More information

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi.

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi. How to ultiply Slides by Kevin Wayne. Copyright 5 Pearson-Addison Wesley. All rights reserved. integers, matrices, and polynomials Complex ultiplication Complex multiplication. a + bi) c + di) = x + yi.

More information

B553 Lecture 1: Calculus Review

B553 Lecture 1: Calculus Review B553 Lecture 1: Calculus Review Kris Hauser January 10, 2012 This course requires a familiarity with basic calculus, some multivariate calculus, linear algebra, and some basic notions of metric topology.

More information

On the computational complexity of mathematical functions

On the computational complexity of mathematical functions On the computational complexity of mathematical functions Jean-Pierre Demailly Institut Fourier, Université de Grenoble I & Académie des Sciences, Paris (France) November 26, 2011 KVPY conference at Vijyoshi

More information

+ 1 3 x2 2x x3 + 3x 2 + 0x x x2 2x + 3 4

+ 1 3 x2 2x x3 + 3x 2 + 0x x x2 2x + 3 4 Math 4030-001/Foundations of Algebra/Fall 2017 Polynomials at the Foundations: Rational Coefficients The rational numbers are our first field, meaning that all the laws of arithmetic hold, every number

More information

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2 Week 22 Equations, Matrices and Transformations Coefficient Matrix and Vector Forms of a Linear System Suppose we have a system of m linear equations in n unknowns a 11 x 1 + a 12 x 2 + + a 1n x n b 1

More information

CSE 421 Algorithms: Divide and Conquer

CSE 421 Algorithms: Divide and Conquer CSE 42 Algorithms: Divide and Conquer Larry Ruzzo Thanks to Richard Anderson, Paul Beame, Kevin Wayne for some slides Outline: General Idea algorithm design paradigms: divide and conquer Review of Merge

More information