• Aucun résultat trouvé

Online Hensel Lifting for Dense, Sparse and Structured Linear System Solving

N/A
N/A
Protected

Academic year: 2022

Partager "Online Hensel Lifting for Dense, Sparse and Structured Linear System Solving"

Copied!
23
0
0

Texte intégral

(1)

Online Hensel Lifting for Dense, Sparse and Structured Linear System Solving

by Romain Lebreton Université Montpellier II

Joint work in progress with

J. Berthomieu, Université Pierre et Marie Curie É. Schost, University of Western Ontario

SIAM AG'13 Fort Collins August 3, 2013

. This document has been written using the GNU TEXMACS text editor (see www.texmacs.org).

(2)

Problem statement

(Simplied) Problem.

Given A2 Mr1(k[x]<d) and B 2 Mrr(k[x]<d) invertible over k[[x]],

solve the linear system A=B C for C 2 Mr1(k[[x]]) at precision N >d.

Application.

Power series linear system solving (N =d)

Polynomial linear system solving with C 2 Mr1(k(x)) (N = 2r d)

(3)

Outline of the talk

1. Overview of general linear system solver over k[[x]]

a. Dixon's algorithm

b. Moenck-Carter algorithm

c. Our contribution : Online algorithm d. Newton's iteration

2. Application to dierent matrix representations a. Dense matrices

b. Structured matrices c. Sparse matrices

(4)

Dixon's algorithm

Notations.

Let C =P

i2N Cixi

Algorithm - [Dixon, '82]

Input: A2 Mr1(k[[x]]), B 2 Mrr(k[[x]]) and N 2N Output: C 2 Mr1(k[[x]]) such that A=B C modxN

1. ¡ =B¡1modx 2. C0:= (¡A)modx 3. for i from 1 to N ¡1

a. A:= (A¡B Ci¡1)quox (Update the system) b. Ci:= (¡A)modx (Find one term of C) 4. return C :=P

i=0 N¡1

Cixi

(5)

Dixon's algorithm - Cost

Focus on polynomial arithmetic:

At step i, we compute among other thing

B Ci¡1= (B0Ci¡1++Bd¡1Ci¡1xd¡1) Arrived at precision N, we have computed P

06j <d 06k<N

BjCk'B C modxN

Cons. Naive polynomial arithmetic

Pros. Requires the inverse matrix B¡1 at precision 1

(6)

Moenck-Carter's algorithm

Let Ci:::j =Ci+Ci+1x++Cj¡1xj¡i¡1

Moenck-Carter's algorithm is an xd-adic version of Dixon's algorithm.

Algorithm - [Moenck, Carter, '79]

Input: A2 Mr1(k[[x]]), B 2 Mrr(k[[x]]) and N 2N Output: C 2 Mr1(k[[x]]) such that A=B C modxN

1. ¡ =B¡1modxd

2. C0:::d:= (¡A)modxd 3. for i from 1 to N/1

a. A:= (A¡BC(i¡1)d:::id)quoxd (Update the system) b. Cid:::(i+1)d:= (¡A)modxd (Find d terms of C) 4. return C :=P

i=0 N/d¡1

Cid:::(i+1)d(xd)i

(7)

Moenck-Carter's algorithm Cost

Focus on polynomial arithmetic:

At step i, we compute among other thing B0:::dC(i¡1)d:::id Arrived at precision N, we have computed

X

06k<N/d

B0:::dC(i¡1)d:::id'B C modxN

Pros. Fast polynomial arithmetic

Cons. Requires the inverse matrix B¡1 at precision d

(8)

Dixon's algorithm revisited

Dixon's algorithm revisited.

Compute iteratively the power series coecients Ci using Formula (?) B C = A

, B0C = (B ¡B0)C , C = B0¡1

A¡xB

¡B0 x

C

(1)

i.e.

1. C1=B0¡1

A1¡B

¡B0 x

C

0

=B0¡1(A1¡B1C0),

2. C2=B0¡1

A2¡B

¡B0 x

C

1

=B0¡1(A2¡(B2C0+B1C1)),

3. C3=B0¡1

A3¡B

¡B0 x

C

2

=B0¡1(A3¡(B3C0+B2C1+B1C2)),

4. :::

(9)

Focus on the problematic product

In Dixon's, the matrix-vector product D =B

¡B0

x

C

over k[[x]] must satisfy:

1. coecients Di must be computed iteratively, one coecient at a time 2. when computing Di, we should only require C0; :::; Ci

(10)

Focus on the problematic product

In Dixon's, the matrix-vector product D =B

¡B0

x

C

over k[[x]] must satisfy:

1. coecients Di must be computed iteratively, one coecient at a time 2. when computing Di, we should only require C0; :::; Ci

This is an online algorithm

(11)

Online multiplication

Theorem. [Fischer, Stockmeyer '74], [Schröder '97], [Hoeven '97], [Berthomieu, Hoeven, Lecerf '11], [L., Schost '13]

Multiply BC over R[[x]] at precision N by an online algorithm takes R(N) =O~(N).

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

0 100 200 300 400 500 600 700 800 900 1000

Timings in milliseconds

Precision HvdH

M

Figure. Timings of [Hoeven '03] online multiplication in k[[x]]

(12)

Online solver for linear system

Online linear solver. [Berthomieu, L. '12], [Berthomieu, L., Schost '13]

Compute the coecients Ci iteratively using

C =B0¡1

A ¡xB

¡B0

x

C

and a fast online multiplication for B

¡B0 x

C.

Pros. Fast online polynomial arithmetic

Pros. Requires the invert matrix B¡1 at precision 1

(13)

Newton iteration

Algorithm Newton

1. Compute (B¡1)0:::N/2 using Newton iteration 2. for i from 1 to dlog2(N)e

i. C0:::2i=C0:::2i¡1¡(B¡1)0:::2i¡1(B0:::2iC0:::2i¡1¡A0:::2i) modx2i 3. return C

Pros. Fast polynomial arithmetic

Cons. Requires the inverse matrix B¡1 at precision N/2

(14)

Outline of the talk

1. Overview of general linear system solver over k[[x]]

a. Dixon's algorithm

b. Moenck-Carter algorithm

c. Our contribution : Online algorithm d. Newton's iteration

2. Application to dierent matrix representations a. Dense matrices

b. Structured matrices c. Sparse matrices

(15)

Dense matrices

Algorithm N =d N =r d

[Dixon '82] O~(r! +r2d2

) O~(r3 d2)

[Moenck, Carter '79] O~(r! d

) O~(r3 d)

Newton iteration O~(r! d

) O~(r!+1 d)

Our online algorithm O~(r! +r2d) O~(r3 d) [Storjohann '03] O~(r! d

) O~(r! d)

Table. Costs of solving A=BC for dense matrices over k[[X]]

(16)

Timings

¡ p-adic integers linear system solving (N =d) with p=536871001

¡ Timings in milliseconds

¡ Online algorithms implemented inside Mathemagix

N 4 16 64 256 1024 4096 Linbox 1.4 3.6 25 310 4700 77000

Online 0.24 0.58 2.1 14 110 760

Table. Integer linear system of size r= 4

N 4 16 64 2256 1024 Linbox 25 170 1900 27000 480000 Online 150 360 2000 14000 90000

Table. Integer linear system of size r=32

(17)

Structured matrices - Minicourse

Notation: Let L(v) = 0

BB

@

v0 0 0 v1 v0

0 vr¡1 v1 v0

1

CC

A, U(v) =tL(v) where v= (v0; :::; vr¡1).

Denition.

The matrix B 2 Mrr(k[[x]]) is structured of displacement rank if 9vi;wi 2k[[x]]r s.t. B =P

i=1

L(vi)U(wi).

Here we consider quasi-Toeplitz matrices i.e. close to

0 BB

@

br ::: b2r¡2 b2r¡1 br b2r¡2

b2

b1 b2 ::: br 1 CC A.

(18)

Structured matrices - Minicourse

Notation: Let L(v) = 0

BB

@

v0 0 0 v1 v0

0 vr¡1 v1 v0

1

CC

A, U(v) =tL(v) where v= (v0; :::; vr¡1).

Denition.

The matrix B 2 Mrr(k[[x]]) is structured of displacement rank if 9vi;wi 2k[[x]]r s.t. B =P

i=1

L(vi)U(wi).

Cost of basic matrix operations.

Matrix-vector product B C O~( r)

Cost of precomputation of B¡1 O~(2r)

Cost of matrix-vector product B¡1C O~( r)

(19)

Structured matrices

Let d0 such that xi; yi 2k[x]<d0 in the decomposition B =P

i=1

L(xi)U(yi).

Algorithm N =d0 N =r d0

[Dixon '82] O

2r+ rd02

O

r2d02 [Moenck, Carter '79] O~(2r d0) O~( r2d0)

Newton iteration O~(2r d0) O~(2r2d0) Our online algorithm O~(2r + r d0) O~( r2d0)

Table. Costs of solving A=BC for structured matrices over k[[X]]

Question: Is B

¡B0 x

structured ?

(20)

Sparse matrices

Let B be a sparse matrix with O~(r) non-zero elements State of the art.

1. [Wiedemann '86] + [Dixon, '82]

Wiedemann's algorithm to solve A= B C over k.

Cost of B¡1 A over k: O(r2) (+ Precomputation)

2. [Eberly, Giesbrecht, Giorgi, Storjohann, Villard '07] + [Dixon, '82]

Cost of B¡1 A over k: O~(r1.5) (+ Precomputation) Our candidate algorithm.

[Eberly, Giesbrecht, Giorgi, Storjohann, Villard '07] + Online linear solver

(21)

Conclusion and Perspectives

Conclusion.

Online algorithm brings the best of Dixon's and Moenck-Carter algorithms

Work in progress.

Sparse / blackbox matrices Implementation

Perspectives.

Hybrid Newton / online algorithm High-order lifting in online algorithms

(22)

Thank you

for your attention

(23)

Question: Is B

¡B0 x

structured ?

YES since L(v)U(w) =L(v0)U(w0)

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

| |{z}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} }

B0

+x 0

@L(v)U¡w¡w0

x

+L¡v¡v0

x

U(w0)

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

| |{z}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} }

(B¡B0)/x

1

A.

Références

Documents relatifs

The use of a block-Krylov-like algorithm allows us to link the problem of solving sparse integer linear systems to poly- nomial linear algebra, where we can benefit from both

BLAS-based matrix multiplication and matrix-vector product polynomial matrix arithmetic (block Hankel inversion). FFT, Karatsuba,

BLAS-based matrix multiplication and matrix-vector product polynomial matrix arithmetic (block Hankel inversion). FFT, Karatsuba,

In this section, we present experiments on natural images and genomic data to demonstrate the efficiency of our method for dictionary learning, non-negative matrix factorization,

A great advantage of our algorithm is that it replaces the usual univariate factor- ization in degree d = deg(f ) by the factorization of the exterior facet polynomials of f :

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

Feature selection based on L 1 regularizer The motivation for sparse lin- ear models in aircraft dynamics identification problems has been presented in [Rommel et al., 2017].. Since

This is a generic C++ library which offers both high performance and the flexibility to use highly tuned libraries for critical components. The use of hybrid dense linear