Relaxed algorithm s, p -adic lifting and p olynom ial system solving ∗
by Romain Lebreton ARITH Team, LIRMM Université Montpellier II
BIPOP-CASYS Seminar
Laboratoire Jean Kuntzmann, Grenoble March 7, 2013
∗. This document has been written using the GNU TEXMACS text editor (see www.texmacs.org).
Computer algebra
1. Why is p-adic lifting interesting?
2. Relaxed p-adic lifting a. On-line algorithms b. Recursive p-adic
c. Application to:
i. Linear systems
ii. Linear q-differential systems iii. Polynomial root lifting
iv. Univariate representation lifting 3. Conclusion
Why modular computation?
P1 = x5 y8+ (−x8+ 4x6)y7−x7y6 +(x10−4x8)y5+ y −x3+ 4x
P2 = −x2y8+ (x5−4x3)y7+x4y4 +(−x7+ 4x5)y3+ y −x3+ 4x
Solutions of P1= 0 Solutions of P2= 0
Do they have a curve in common?
Why modular computation?
P1 = x5 y8+ (−x8+ 4x6)y7−x7y6 +(x10−4x8)y5+ y −x3+ 4x
P2 = −x2y8+ (x5−4x3)y7+x4y4 +(−x7+ 4x5)y3+ y −x3+ 4x
Solutions of P1= 0 Solutions of P2= 0
Do they have a curve in common?
YES !
Why modular computation?
P1 = x5y8+ (−x8+ 4x6)y7−x7y6 +(x10−4x8)y5+ y −x3+ 4x
P2 = −x2y8+ (x5−4x3)y7+x4y4 +(−x7+ 4x5)y3+ y −x3+ 4x
,
Euclid’s algorithm (in Q(x)[y])
,
R= y −x3+x Solutions of R= 0
Why modular computation?
P1 = x5y8+ (−x8+ 4x6)y7−x7y6 +(x10−4x8)y5+ y −x3+ 4x
P2 = −x2y8+ (x5−4x3)y7+x4y4 +(−x7+ 4x5)y3+ y −x3+ 4x
,
Euclid’s algorithm (in Q(x)[y])
,
R1 = y2+ (−x34+x33+ 5x32−5x31−5x30+ 5x29+x28−x27
−4x23+ 4x22+ 4x21−13x20+10x19+12x18−18x17+ 2x16 +15x15−13x14−11x13+11x12−5x11−11x10+ 8x9+ 2x8
−6x7+ 6x6+ 4x5−4x4+ 4x3+x2−x+ 1)/(x31−x30−x29 +x28−x22+x21+x20−3x19+ 2x18+ 3x17−4x16+ 3x14
−3x13−3x12+ 2x11−2x10−2x9+x8−x7) y+ (x32−x31
−5x30+ 5x29+ 4x28−3x27−x26−5x25+ 7x24+ 2x23
−14x22+10x21+ 8x20−9x19+x18+ 4x17−5x16+x15+ 3x14
−8x13+ 8x12+12x11−22x10+22x9+18x8−28x7+
R= y −x3+x Solutions of R= 0
High precision modular computation
Two different approaches:
multi-modular lifting Hensel lifting
Precision 1 Precision 1
High precision modular computation
Two different approaches:
multi-modular lifting Hensel lifting
Precision 2 Precision 2
High precision modular computation
Two different approaches:
multi-modular lifting Hensel lifting
Precision 3 Precision 3
High precision modular computation
Two different approaches:
multi-modular lifting Hensel lifting
Precision 4 Precision 4
Plan
1. Why is p-adic lifting interesting?
2. Relaxed p-adic lifting a. On-line algorithms b. Recursive p-adic
c. Application to:
i. Linear systems
ii. Linear q-differential systems iii. Polynomial root lifting
iv. Univariate representation lifting 3. Conclusion
Relaxed algorithms
Definition. (on-line or relaxed algorithm) [Hennie ’66]
: reading allowed
Relaxed algorithms
Definition. (on-line or relaxed algorithm) [Hennie ’66]
: reading allowed
Relaxed algorithms
Definition. (on-line or relaxed algorithm) [Hennie ’66]
: reading allowed
Relaxed algorithms
Definition. (on-line or relaxed algorithm) [Hennie ’66]
: reading allowed
Half-line or semi-relaxed algorithm : condition on one input.
Off-line or zealous algorithm : condition not met.
Relaxed algorithms
Definition. (on-line or relaxed algorithm) [Hennie ’66]
: reading allowed
Half-line or semi-relaxed algorithm : condition on one input.
Off-line or zealous algorithm : condition not met.
Example.
• The naive addition algorithm is on-line:
for i from 0 to N do ci8 ai+bi
• The naive multiplication algorithm is on-line:
for i from 0 to N do ci8 aib0+ai−1b1+ +a0bi Challenge. Find a quasi-optimal on-line multiplication algorithm
Relaxed multiplication c = a × b - step 0
b0
b1
b2
a0 a1 a2 a
b
Figure. What we must compute
b0
b1
b2
a0 a1 a2 a
b
Figure. Minimum knowledge on the input
0
Figure. What we compute
step 0: c = a0b0
Relaxed multiplication c = a × b - step 1
0 b
a b0
b1
a0 a1
Figure. What we must compute
0 b
a
Figure. Minimum knowledge on the input
0 1
1
Figure. What we compute
step 0: c = a0b0
step 1: c9 z (a0b1+a1b0)
Relaxed multiplication c = a × b - step 2
0 1
1
Figure. What we must compute
0 1
1
Figure. Minimum knowledge on the input
0 1
1 2
2 2
Figure. What we compute
step 0: c = a0b0
step 1: c9 z (a0b1+a1b0)
step 2: c9 z2(a0b2+a2b0+ (a1+a2z) (b1+b2z))
Relaxed multiplication c = a × b - step 3
0 1
1 2 2
2
Figure. What we must compute
0 1
1 2
2 2
Figure. Minimum knowledge on the input
0 1
1 2
2 2
3
3
Figure. What we compute
step 0: c = a0b0
step 1: c9 z (a0b1+a1b0)
step 2: c9 z2(a0b2+a2b0+ (a1+a2z) (b1+b2z)) step 3: c9 z3(a0b3+a3b0)
Relaxed multiplication c = a × b - step 4
0 1
1 2
2 2
3
3
Figure. What we must compute
0 1
1 2
2 2
3
3
Figure. Minimum knowledge on the input
0 1
1 2
2 2
3
3
4 4
4 4
Figure. What we compute
step 0: c = a0b0
step 1: c9 z (a0b1+a1b0)
step 2: c9 z2(a0b2+a2b0+ (a1+a2z) (b1+b2z)) step 3: c9 z3(a0b3+a3b0)
step 4: c9 z4(a0b4+a4b0+ (a1+a2z) (b3+b4z) +(a3+a4z) (b1+b2z))
Relaxed multiplication c = a × b - step 5
0 1
1 2
2 2
3
3
4 4
4 4
Figure. What we must compute
0 1
1 2
2 2
3
3
4 4
4 4
Figure. Minimum knowledge on the input
0 1
1 2
2 2
3
3
4 4
4 4 5
5
Figure. What we compute
step 0: c = a0b0
step 1: c9 z (a0b1+a1b0)
step 2: c9 z2(a0b2+a2b0+ (a1+a2z) (b1+b2z)) step 3: c9 z3(a0b3+a3b0)
step 4: c9 z4(a0b4+a4b0+ (a1+a2z) (b3+b4z) +(a3+a4z) (b1+b2z))
step 5: c9 z5(a0b5+a5b0)
Relaxed multiplication c = a × b - step 6
0 1
1 2
2 2
3
3
4 4
4 4 5
5
Figure. What we must compute
0 1
1 2
2 2
3
3
4 4
4 4 5
5
Figure. Minimum knowledge on the input
0 1
1 2
2 2
3
3
4 4
4 4 5
5 6
6 6
6
6
Figure. What we compute
step 0: c = a0b0
step 1: c9 z (a0b1+a1b0)
step 2: c9 z2(a0b2+a2b0+ (a1+a2z) (b1+b2z)) step 3: c9 z3(a0b3+a3b0)
step 4: c9 z4(a0b4+a4b0+ (a1+a2z) (b3+b4z) +(a3+a4z) (b1+b2z))
step 5: c9 z5(a0b5+a5b0)
step 6: c9 z6(a0b6+a6b0+ (a1+a2z) (b5+b6z) +(a5+a6z) (b1+b2z)
+(a3+ +a6z3) (b3+ +b6z3))
Relaxed multiplications
Theorem. [Fischer, Stockmeyer ’74], [Schröder ’97], [van der Hoeven ’97], [Berthomieu, van der Hoeven, Lecerf ’11], [L., Schost ’12]
M(N): cost of a×b in k[[x]] at precision N by an off-line algorithm.
R(N): cost of a×b in k[[x]] at precision N by an on-line algorithm. Then R(N) =O(M(N)logN) =O˜(N).
Relaxed multiplications
Theorem. [Fischer, Stockmeyer ’74], [Schröder ’97], [van der Hoeven ’97], [Berthomieu, van der Hoeven, Lecerf ’11], [L., Schost ’12]
M(N): cost of a×b in k[[x]] at precision N by an off-line algorithm.
R(N): cost of a×b in k[[x]] 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.
Relaxed multiplications
Relaxed multiplication [Fischer, Stockmeyer ’74]
Relaxed multiplications
Semi-relaxed multiplication [Fischer, Stockmeyer ’74] Relaxed multiplication [Fischer, Stockmeyer ’74]
Relaxed multiplications
Semi-relaxed multiplication [Fischer, Stockmeyer ’74] Relaxed multiplication [Fischer, Stockmeyer ’74]
?
Semi-relaxed multiplication [van der Hoeven ’03]
Relaxed multiplications
Semi-relaxed multiplication [Fischer, Stockmeyer ’74] Relaxed multiplication [Fischer, Stockmeyer ’74]
Semi-relaxed multiplication [van der Hoeven ’03] Relaxed multiplication [L., Schost ’12]
Timings of relaxed multiplications
0 2 4 6 8 10 12
20 22 24 26 28 210 212 214 216 218
Ratio
precision N [Fischer, Stockmeyer ’74]
[L., Schost ’12]
Figure. Ratio R(N)/M(N) for different relaxed multiplication algorithms over F268435459[[x]].
Plan
1. Why is p-adic lifting interesting?
2. Relaxed p-adic lifting a. On-line algorithms b. Recursive p-adic
c. Application to:
i. Linear systems
ii. Linear q-differential systems iii. Polynomial root lifting
iv. Univariate representation lifting 3. Conclusion
Relaxed recursive power series
Definition. A power series y∈k[[x]] is recursive if there exists Φ such that
• y= Φ(y)
• Φ(y)n only depends on y0,, yn−1
Relaxed recursive power series
Definition. A power series y∈k[[x]] is recursive if there exists Φ such that
• y= Φ(y)
• Φ(y)n only depends on y0,, yn−1
Definition. (Shifted algorithm)
: reading allowed
Relaxed recursive power series
Definition. A power series y∈k[[x]] is recursive if there exists Φ such that
• y= Φ(y)
• Φ(y)n only depends on y0,, yn−1
Definition. (Shifted algorithm)
: reading allowed
Relaxed recursive power series
Definition. A power series y∈k[[x]] is recursive if there exists Φ such that
• y= Φ(y)
• Φ(y)n only depends on y0,, yn−1
Definition. (Shifted algorithm)
: reading allowed
Relaxed recursive power series
Definition. A power series y∈k[[x]] is recursive if there exists Φ such that
• y= Φ(y)
• Φ(y)n only depends on y0,, yn−1
Definition. (Shifted algorithm)
: reading allowed
Theorem. [Watt ’88], [van der Hoeven ’02]
Let y∈k[[x]] such that y= Φ(y). Given y0 and Φ, we can compute y at precision N in the time necessary to evaluate Φ(y).
Relaxed recursive power series
Definition. A power series y∈k[[x]] is recursive if there exists Φ such that
• y= Φ(y)
• Φ(y)n only depends on y0,, yn−1
Definition. (Shifted algorithm)
: reading allowed
Theorem. [Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]
Let y∈k[[x]] 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.
Relaxed recursive power series
Theorem. (Fundamental theorem)
[Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]
Let y∈k[[x]] 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)
: reading allowed
?
?
Relaxed recursive power series
Theorem. (Fundamental theorem)
[Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]
Let y∈k[[x]] 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)⇒ ϕ1= y1
: reading allowed
?
Relaxed recursive power series
Theorem. (Fundamental theorem)
[Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]
Let y∈k[[x]] 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)
: reading allowed
?
Relaxed recursive power series
Theorem. (Fundamental theorem)
[Watt ’88], [van der Hoeven ’02], [Berthomieu, L. ISSAC ’12]
Let y∈k[[x]] 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)⇒ ϕ2= y2
: reading allowed
Plan
1. Why is p-adic lifting interesting?
2. Relaxed p-adic lifting a. On-line algorithms b. Recursive p-adic
c. Application to:
i. Linear systems
ii. Linear q-differential systems iii. Polynomial root lifting
iv. Univariate representation lifting 3. Conclusion
Two paradigms
Lifting solutions methods:
Zealous algorithms Relaxed algorithms
Newton operator Fundamental theorem
implicit equations P(Y ) = 0 recursive equations Y =Φ(Y )
To do:
• Transform an implicit equations into recursive equations (+ shifted algorithm) P(Y ) =0 Y =Ψ(Y )
Linear systems
Zealous algorithms Relaxed algorithms
Linear systems
dense O˜(rωd+rω−1N) structured O˜(α2r d+α r N)
Example. Find a(x), b(x), c(x)∈k[[x]] such that
(1 +x)a(x) + (3−x2)b(x) + 2c(x) = 1 (x−x3)a(x) + (1 +x)b(x) + (3−x2)c(x) = x (4−2x)a(x) + (x−x3)b(x) + (1 +x)c(x) = x2
r number of unknowns
d degree of polynomials in input N precision of the output
α parameter associated to structured matrices α≪r ω exponent of matrix multiplication 26ω 63
Linear systems: [Moenck, Carter ’79], [Storjohann ’03]
Ideas
Example of system
A·Y =B⇔
(1 +x) (3−x2) 2 (x−x3) (1 +x) (3−x2) (4−2x) (x−x3) (1 +x)
·
a(x) b(x) c(x)
=
1 x x2
Transformation of equation
Implicit equation 0 = f(Y )8 A·Y −B
Recursive equation Y = Φ(Y )8 A0−1·(B −(A−A0)·Y )
Shifted algorithm
Ψ(Y )
8A
0−1·
B − x ×
h
A−A0
x
·
onlineY i
Linear systems
Zealous algorithms Relaxed algorithms
Linear systems
dense O˜(rωd+rω−1N) O˜(rω+r2N)
structured O˜(α2rd+α r N) O˜(α2r+α r N)
[Berthomieu, L., ISSAC ’12], [L., Schost ’12]
Example. Find a(x), b(x), c(x)∈k[[x]] such that
(1 +x)a(x) + (3−x2)b(x) + 2c(x) = 1 (x−x3)a(x) + (1 +x)b(x) + (3−x2)c(x) = x (4−2x)a(x) + (x−x3)b(x) + (1 +x)c(x) = x2
r number of unknowns
d degree of polynomials in input N precision of the output
α parameter associated to structured matrices α≪r ω exponent of matrix multiplication 26ω 63
Linear systems: [Moenck, Carter ’79], [Storjohann ’03]
Plan
1. Why is p-adic lifting interesting?
2. Relaxed p-adic lifting a. On-line algorithms b. Recursive p-adic
c. Application to:
i. Linear systems
ii. Linear q-differential systems iii. Polynomial root lifting
iv. Univariate representation lifting 3. Conclusion
Differential systems
Zealous algorithms Relaxed algorithms
Regular differential
systems O(rω)M(N)+ON→ ∞(N) O(r2)R(N)+ON→∞(N) (q)-differential
singular systems
Example. Find a(x)∈k[[x]] such that
(1 +x)a(x) + (3−x2) (a(2x)−a(x)) = x
Applications:
• List-decoding of folded Reed-Solomon codes: solve Q(x, f(x), f (q x)) = 0
• Composition of power series f(g) with g(0) = 0 when f solution of a singular differential equation.
Differential systems: [Brent, Kung ’78], [van der Hoeven ’02 ’11], [Bostan, Chyzak et al. ’07]
Differential systems
Zealous algorithms Relaxed algorithms
Regular differential
systems O(rω)M(N)+ON→ ∞(N) O(r2)R(N)+ON→∞(N) (q)-differential
singular systems O(rω)M(N)+ON→ ∞(N) O(r2)R(N)+ON→∞(N)
[Bostan, Chowdhury, L., Salvy, Schost, ISSAC ’12]
Example. Find a(x)∈k[[x]] such that
(1 +x)a(x) + (3−x2) (a(2x)−a(x)) = x
r number of unknowns N precision of the output
Differential systems: [Brent, Kung ’78], [van der Hoeven ’02 ’11], [Bostan, Chyzak et al. ’07]
Polynomial systems
Zealous algorithms Relaxed algorithms
Polynomial
systems O(r L+rω)M(N)+ON→ ∞(N) Univariate
representations O(r L+rω)M(N)M(d)+ON→ ∞(N)
Example. Find a(x), b(x), c(x)∈k[[x]] such that
(1 +x) + (4−2x)a(x)2c(x)4+ 2b(x) = 0 (x−x3) +(3−x2)a(x)b(x)2+ (1 +x+x2)c(x) = 0 1 +b(x)4c(x)5+x a(x)3 = 0
r number of unknowns, N precision of the output, L complexity of evaluation
Polynomial systems: [Newton 1736], [Hensel 1918], [Lipson ’76]
[Berthomieu, van der Hoeven, Lecerf ’11], [van der Hoeven ’11]
Univariate representations: [Giusti, Lecerf, Salvy ’01], [Heintz, Matera, Waissbein ’01]
Polynomial systems
Zealous algorithms Relaxed algorithms
Polynomial
systems O(rL+rω)M(N)+ON→ ∞(N) O(L)R(N)+ON→ ∞(N) Univariate
representations O(rL+rω)M(N)M(d)+ON→ ∞(N) O(L)R(N)M(d)+ON→∞(N)
[Berthomieu, L., ISSAC ’12], [L. ’12]
Example. Find a(x), b(x), c(x)∈k[[x]] such that
(1 +x) + (4−2x)a(x)2c(x)4+ 2b(x) = 0 (x−x3) +(3−x2)a(x)b(x)2+ (1 +x+x2)c(x) = 0 1 +b(x)4c(x)5+x a(x)3 = 0
r number of unknowns, N precision of the output, L complexity of evaluation
Polynomial systems: [Newton 1736], [Hensel 1918], [Lipson ’76]
[Berthomieu, van der Hoeven, Lecerf ’11], [van der Hoeven ’11]
Univariate representations: [Giusti, Lecerf, Salvy ’01], [Heintz, Matera, Waissbein ’01]
Timings
1
2
3
4 0 200 400 600 800 1000 0.1
0.2 0.3 0.4 0.5 0.6 0.7 0.8
time Newton
Relaxed
r
N time
Figure. Timings with systems of singular (q)-differential equations
Timings
0 0.005 0.01 0.015 0.02
0 100 200 300 400 500 600 700 800 900 1000
time
N
Newton DAC Naive
Figure. Timings with a singular (q)-differential equation
Timings
1
2
3
4 0 200 400 600 800 1000 0.1
0.2 0.3 0.4 0.5 0.6 0.7 0.8
time Newton
Relaxed
r
N time
Figure. Timings with systems of singular (q)-differential equations
Timings
Katsura -3 Katsura -4 Katsura -5 Katsura -6 N zealous relaxed zealous relaxed zealous relaxed zealous relaxed
2 0.02 0.007 0.08 0.02 0.25 0.06 0.8 0.17
4 0.03 0.01 0.10 0.03 0.35 0.08 1.1 0.22
8 0.05 0.02 0.17 0.05 0.55 0.13 1.7 0.36
16 0.08 0.04 0.29 0.09 0.9 0.24 1.9 0.70
32 0.14 0.07 0.51 0.20 1.7 0.53 5.2 1.5
64 0.26 0.16 1.0 0.44 3.3 1.2 10 3.6
128 0.51 0.36 1.9 1 6.6 2.8 21 8.6
Table. Timings in seconds of lifting of univariate representations over F16411[[x]] for Katsura-n.
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:
Contributions to algebramix and geomsolvex packages of Mathemagix;
Perspectives:
• Lift a polynomial root under more general hypotheses (multiplicities);
• Link between relaxed and divide-and-conquer algorithms
• New horizons : Relaxed Gröbner bases?