• Aucun résultat trouvé

Newton iteration and relaxed algorithms ∗

N/A
N/A
Protected

Academic year: 2022

Partager "Newton iteration and relaxed algorithms ∗ "

Copied!
40
0
0

Texte intégral

(1)

Hensel lifting:

Newton iteration and relaxed algorithms

by Romain Lebreton

SCG Lab Meeting October 11th, 2013

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

(2)

Setting

• We want to solve the polynomial equation over Q[[T]]:

P(Y) =Y2−Y +T ∈(Q[[T]])[Y]

• Consider the regular modular root y0= 0 of P(Y), i.e.

P(y0) = 0 modT and P(y0) =/ 0 modT .

• Since P(y0) =/ 0 modT, Hensel’s Lemma ensure that ∃!y ∈Q[[T]] such that P(y) = 0, y =y0 modT .

Example.

The lifted root y from y0 is

y = 1−√1−4T

2 =T +T2+ 2T3+ 5T4+O(T5).

(3)

Our goal

Definition.

Hensel lifting is the process to compute y from y0 and P.

This talk.

We will show how to perform Hensel lifting using 1. Newton’s iteration

2. Relaxed algorithms

(4)

Newton’s iteration

Input:

• A polynomial equation P ∈(Q[[T]])[Y]

• A regular modular root y0∈Q of P

• A precision 2N ∈N Output:

• The unique lifted root y ∈Q[[T]] at precision 2N, i.e. modulo T2N

Algorithm r=y0

for i from 1 to N r=

r − PP(r)(r)

modT2i return r

(5)

Newton’s iteration

Input:

• A polynomial equation P ∈(Q[[T]])[Y]

• A regular modular root y0∈Q of P

• A precision 2N ∈N Output:

• The unique lifted root y ∈Q[[T]] at precision 2N, i.e. modulo T2N

Algorithm r=y0

for i from 1 to N r=

r − PP(r)(r)

modT2i return r

Step 0: r = 0 +O(T)

Step 1: r = 0 +T +O(T2)

Step 2: r = 0 +T +T2+ 2T3+O(T4)

(6)

Newton’s iteration

Input:

• A polynomial equation P ∈(Q[[T]])[Y]

• A regular modular root y0∈Q of P

• A precision 2N ∈N Output:

• The unique lifted root y ∈Q[[T]] at precision 2N, i.e. modulo T2N

Algorithm r=y0

for i from 1 to N r=

r − PP(r)(r)

modT2i return r

Remark.

P(r) is invertible since P (r) =P(y0)modT, which is non-zero.

(7)

Relaxed algorithms

Definition. (on-line or relaxed algorithm) [Hennie ’66]

: reading allowed

(8)

Relaxed algorithms

Definition. (on-line or relaxed algorithm) [Hennie ’66]

: reading allowed

(9)

Relaxed algorithms

Definition. (on-line or relaxed algorithm) [Hennie ’66]

: reading allowed

(10)

Relaxed algorithms

Definition. (on-line or relaxed algorithm) [Hennie ’66]

: reading allowed

Off-line or zealous algorithm : condition not met.

(11)

Example of relaxed algorithms

Relaxed Addition:

Algorithm Add

Input: a, b∈Q[[T]] and n∈N

Output: c∈Q[[T]] such that c= (a+b)modTn 1. c= 0

2. for i from 0 to n−1 a. c=AddStep(a, b, c, i) 3. return c

Algorithm AddStep

Input: a, b, c∈Q[[T]] and i∈N Output: c∈Q[[T]]

1. c=c+ (ai+bi)Ti 2. return c

Remarks.

1. Computations at step i complete those of previous steps to get a result modulo Ti. 2. This addition algorithm is online:

→ it outputs ci using ai and bi.

(12)

Example of relaxed algorithms

Naive Relaxed Multiplication:

Algorithm NaiveMulStep

Input: a, b, c∈Q[[T]] and i∈N Output: c∈Q[[T]]

1. for j from 0 to i a. c=c+ajbijTi 2. return c

Algorithm NaiveMul

Input: a, b∈Q[[T]] and n∈N

Output: c∈Q[[T]] such that c= (a+b)modTn 1. c= 0

2. for i from 0 to n −1

a. c=NaiveMulStep(a, b, c, i) 3. return c

Remarks.

1. This multiplication algorithm is online:

→ it outputs ci using a0, ..., ai and b0, ..., bi. 2. Its complexity is quadratic !

(13)

Fast relaxed multiplications

Problem.

Karatsuba and FFT algorithms are offline.

Challenge.

Find a quasi-optimal on-line multiplication algorithm.

Theorem. [Fischer, Stockmeyer ’74], [Schröder ’97], [van der Hoeven ’97]

[Berthomieu, van der Hoeven, Lecerf ’11], [L., Schost ’13]

Let M(N) be the cost of a×b in Q[[T]] at precision N by an off-line algorithm.

Let R(N) be the cost of a×b in Q[[T]] at precision N by an on-line algorithm.

Then

R(N) =O(M(N)logN) =O˜(N).

(14)

Fast relaxed multiplications

Problem.

Karatsuba and FFT algorithms are offline.

Challenge.

Find a quasi-optimal on-line multiplication algorithm.

Theorem. [Fischer, Stockmeyer ’74], [Schröder ’97], [van der Hoeven ’97]

[Berthomieu, van der Hoeven, Lecerf ’11], [L., Schost ’13]

Let M(N) be the cost of a×b in Q[[T]] at precision N by an off-line algorithm.

Let R(N) be the cost of a×b in Q[[T]] at precision N by an on-line algorithm.

Then

R(N) =O(M(N)logN) =O˜(N).

Theorem. [van der Hoeven ’07, ’12]

R(N) =M(N)log(N)o(1). Seems not to be used yet in practice.

(15)

Recursive power series

Definition. A power series y ∈Q[[T]] is recursive if there exists Φ such that

• y = Φ(y)

• Φ(y)n only depends on y0, ..., yn1

It is possible to compute y from Φ and y0. But how fast?

Example.

The solution y of P(Y) =Y 2−Y +T s.t. y0= 0 is recursive (the other is too).

Proof. Let Φ(Y ) =Y2+T then y = Φ(y).

Moreover,

Φ(y)n= (y2)n+ (T)n = y0yn+y1 yn1+···+ yny01,n

= y1yn−1+···+yn−1 y11,n

since y0= 0. It does not depend on yn.

(16)

Shifted Algorithms

Definition of shifted algorithms.

: reading allowed

(17)

Shifted Algorithms

Definition of shifted algorithms.

: reading allowed

(18)

Shifted Algorithms

Definition of shifted algorithms.

: reading allowed

(19)

Shifted Algorithms

Definition of shifted algorithms.

: reading allowed

Example.

If s >0, then the Algorithm ShiftStep: a7→Ts×a is a shifted algorithm.

Algorithm ShiftStep

Input: a, c∈Rp, s∈Z and i∈N Output: c∈Q[[T]]

1. c=c+aisTi 2. return c

(20)

Example of shifted algorithm

Example.

The online evaluation of Ψ(Y) =T2×(Y /T)2+T is shifted w.r.t. Y.

(Ψ(Y ))i

requires (T2×((Y /T)2))i requires ((Y /T)2)i2

requires (Y/T)0, ...,(Y /T)i−2 using online multiplication requires Y0, ..., Yi−1

(21)

Relaxed recursive power series

Fundamental Theorem. [Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]

Let y∈Q[[T]] such that y= Φ(y). Given y0 and Φ, we can compute y at precision N in the time necessary to evaluate Φ(y) by a shifted algorithm.

Proof. y = Φ(y)⇒ ϕ0=y0

: reading allowed

?

?

(22)

Relaxed recursive power series

Fundamental Theorem. [Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]

Let y∈Q[[T]] such that y= Φ(y). Given y0 and Φ, we can compute y at precision N in the time necessary to evaluate Φ(y) by a shifted algorithm.

Proof. y = Φ(y)⇒ ϕ0=y0

: reading allowed

?

(23)

Relaxed recursive power series

Fundamental Theorem. [Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]

Let y∈Q[[T]] such that y= Φ(y). Given y0 and Φ, we can compute y at precision N in the time necessary to evaluate Φ(y) by a shifted algorithm.

Proof. y = Φ(y)⇒ ϕ0=y0

: reading allowed

?

(24)

Relaxed recursive power series

Fundamental Theorem. [Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]

Let y∈Q[[T]] such that y= Φ(y). Given y0 and Φ, we can compute y at precision N in the time necessary to evaluate Φ(y) by a shifted algorithm.

Proof. y = Φ(y)⇒ ϕ0=y0

: reading allowed

(25)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

(26)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 1st

2nd 3rd 4th 5th

(27)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

2nd 3rd 4th 5th

(28)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 2nd

3rd 4th 5th

(29)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

3rd 4th 5th

(30)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

T 3rd

4th 5th

(31)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

T 1 1 T2 T +T2 3rd

4th 5th

(32)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

T 1 1 T2 T +T2 3rd

T +T2 4th

5th

(33)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

T 1 1 T2 T +T2 3rd

T +T2 1 +T 1 + 2T T2+ 2T3 T +T2+ 2T3 4th 5th

(34)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

T 1 1 T2 T +T2 3rd

T +T2 1 +T 1 + 2T T2+ 2T3 T +T2+ 2T3 4th

T +T2+ 2T3 5th

(35)

Relaxed recursive power series

Algorithm OnlineRecursivePadic

Input: a shifted algorithm Ψ, a modular root y0 and a precision n∈N Output: the lifted root y at precision n

1. a=y0, [c1, ..., cL] = [0, ...,0]

2. for i from 1 to n

a. Perform the ith step of the evaluation of Ψ on input a b. Put the output in a

3. return a

Computations of the lifting of the root y of P(Y ) =Y 2−Y +T from y0= 0:

c0 c1:=c0/T c2:=c12 c3:=T2×c2 c4:=c3+T Step (i−2)th step (i−2)th step ith step ith step ith

0 0 0 0 0 1st

0 0 0 0 T 2nd

T 1 1 T2 T +T2 3rd

T +T2 1 +T 1 + 2T T2+ 2T3 T +T2+ 2T3 4th T +T2+ 2T3 1 +T + 2T2 1 + 2T + 5T2 T2+ 2T3+ 5T4 T +T2+ 2T3+ 5T4 5th

(36)

Conclusion

Two general paradigms:

Newton operator Relaxed algorithms

Solve implicit equations P(y) = 0 Solve recursive equations y= Φ(y) Faster for higher precision

Less on-line multiplications

Implementations:

Relaxed power series (and T-adics) in Mathemagix Beginning of a C++ package based on NTL

(37)

Thank you for your attention ;-)

(38)
(39)

Example of shifted algorithm

(40)

Example.

The evaluation Algorithm of Ψ(Y ) =T2×((Y/T)2) +T is shifted.

S.l.p. Γ1= (_/T; 0),Γ2= (∗; 1,1),Γ3= (T2×; 2),Γ4= (+; 3, T)

Output sequence [c0, ..., c4] on input c0 = y is [y, y/T , (y/T)2, T2 × ((Y /T)2), T2×((Y/T)2) +T]

Algorithm EvaluationStep Input: a∈Q[[T]],h

c1(0), ..., c4(0)i

∈(Q[[T]])4 and i∈N Output: [c1, ..., c4]∈(Q[[T]])4

1. c0=a, [c1, ..., c4] =h

c1(0), ..., c4(0)i 2. Evaluation of Ψ:

a. c1=ShiftStep(a, c1,−1, i−2) b. c2=MulStep(c1, c1, c2, i−2)

c. c3=ShiftStep(c2, c3,2, i) d. c4=AddStep(c3, T , c4, i) 3. return [c1, ..., c4]

EvaluationStep increase the precision by one of the evaluation of Ψ on y.

Références

Documents relatifs

trade secrets and intellectual property rights are but a partial defence against disclosure and may be relied on only to the extent strictly necessary to protect

In doing so, we put to the fore inertial proximal algorithms that converge for general monotone inclusions, and which, in the case of convex minimization, give fast convergence rates

7 Relaxed multiplication in positive characteristic Let us now show that the technique from the previous section actually extends to the case when A is an arbitrary effective ring

Since the semantics of release forces only to order previous accesses with this store and not with every later access, and accesses to the same location are already ordered locally

< r,, > 1' = ( < rys > 1' reveals a one order of magnitude mismatch these authors prospected two ways to explain the discrepancy : a) after

To determine whether these theoretical properties can translate into an improvement in planning performance, two issues must be addressed: how to choose the conjunctions in C so as

:ﺮﻛﺬﻧ ﺕﺎﺳﺍﺭﺪﻟﺍ ﻩﺬﻫ ﻦﻣ،(ﺔﻴﳌﻮﻌﻟﺍ) ﻕﻮﻘﺣ ﻥﺎﺴﻧﻹﺍ ﲔﺑ ﺔﻌﻳﺮﺸﻟﺍ ﺔﻴﻣﻼﺳﻹﺍ ﺮﻜﻔﻟﺍﻭ ﱐﻮﻧﺎﻘﻟﺍ ﰊﺮﻐﻟﺍ ) ﺪﻤﳏ ﻲﺤﺘﻓ .(ﻥﺎﻤﺜﻋ ﺔﻴﺑﺮﻌﻟﺍ ﺔﻴﻣﻼﺳﻹﺍﻭ ﺔﻴﳌﺎﻌﻟﺍ ﺔﻳﺅ ﺮﻟﺍ ﲔﺑ ﻥﺎﺴﻧﻹﺍ ﻕﻮﻘﺣ

Kreinovich , To- wards Fast and Reliable Localization of an Underwater Object:. An Interval Approach, Journal of Uncertain