Computing Real Roots of Real Polynomials … … and now For Real! Alexander Kobel • Max-Planck-Institute for Informatics, Saarbrücken, Germany Fabrice Rouillier • INRIA & Université Pierre et Marie Curie, Paris, France Michael Sagraloff • Max-Planck-Institute for Informatics, Saarbrücken, Germany
66
Embed
Computing Real Roots of Real Polynomials and now …people.mpi-inf.mpg.de/~akobel/talks/ANewDsc-ISSAC2016...#roots/treewidth: n min.rootseparation: 2O (nt) subdivisionruleand subdivision
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Computing Real Roots of Real Polynomials …… and now For Real!
Alexander Kobel • Max-Planck-Institute for Informatics, Saarbrücken, GermanyFabrice Rouillier • INRIA & Université Pierre et Marie Curie, Paris, FranceMichael Sagraloff • Max-Planck-Institute for Informatics, Saarbrücken, Germany
Computing Real Roots …
A classical approach
Computing Real Roots of Real Polynomials
Given a square-free polynomial
P(x) = pnxn + pn−1xn−1 + · · ·+ p1x + p0 ∈ R[x]
and an open interval I = (a0, b0) ⊂ R,
find isolating intervals I1, . . . , Ir ⊂ I such that
• each Ij contains exactly one real root of P,
• the Ij are pairwise disjoint, and
•⋃
j Ij covers all real roots of P in I .
1
Subdivision approach
• Queue← {I}Isol← ∅
• while Queue is not empty:
• pop I = (a, b) from Queue• if I contains no root: (exclusion predicate)
discard I• else if I contains exactly one root: (inclusion-and-isolation predicate)
add I to Isol• otherwise (or we-don’t-know):
• split I at m = a+b2 (or some other point)
• if P(m) = 0: add {m} to Isol• add (a,m) and (m, b) to Queue
2
Subdivision approach
• Queue← {I}Isol← ∅
• while Queue is not empty:
• pop I = (a, b) from Queue• if I contains no root: (exclusion predicate)
discard I• else if I contains exactly one root: (inclusion-and-isolation predicate)
add I to Isol• otherwise (or we-don’t-know):
• split I at m = a+b2 (or some other point)
• if P(m) = 0: add {m} to Isol• add (a,m) and (m, b) to Queue
2
Descartes method
Descartes’ Rule of Signsr = # positive real roots of Pv = # sign changes in coeffs of P
r ≤ v and r ≡ v (mod 2)
localized versionrI = # real roots of P in I = (a, b)vI = # sign changes of (x + 1)nP
( ax+bx+1
)rI ≤ vI and rI ≡ vI (mod 2)
exclusion predicatevI = 0 ⇒ I contains no root of P
inclusion-and-isolation predicatevI = 1 ⇒ I contains exactly one root of P
rI = vI ∈ {0, 1} if other (complex) roots well-separated from I
3
Descartes method
Descartes’ Rule of Signsr = # positive real roots of Pv = # sign changes in coeffs of P
r ≤ v and r ≡ v (mod 2)
localized versionrI = # real roots of P in I = (a, b)vI = # sign changes of (x + 1)nP
( ax+bx+1
)rI ≤ vI and rI ≡ vI (mod 2)
exclusion predicatevI = 0 ⇒ I contains no root of P
inclusion-and-isolation predicatevI = 1 ⇒ I contains exactly one root of P
rI = vI ∈ {0, 1} if other (complex) roots well-separated from I
3
Descartes method
Descartes’ Rule of Signsr = # positive real roots of Pv = # sign changes in coeffs of P
r ≤ v and r ≡ v (mod 2)
localized versionrI = # real roots of P in I = (a, b)vI = # sign changes of (x + 1)nP
( ax+bx+1
)rI ≤ vI and rI ≡ vI (mod 2)
exclusion predicatevI = 0 ⇒ I contains no root of P
inclusion-and-isolation predicatevI = 1 ⇒ I contains exactly one root of P
rI = vI ∈ {0, 1} if other (complex) roots well-separated from I
3
Descartes method
Descartes’ Rule of Signsr = # positive real roots of Pv = # sign changes in coeffs of P
r ≤ v and r ≡ v (mod 2)
localized versionrI = # real roots of P in I = (a, b)vI = # sign changes of (x + 1)nP
( ax+bx+1
)rI ≤ vI and rI ≡ vI (mod 2)
exclusion predicatevI = 0 ⇒ I contains no root of P
inclusion-and-isolation predicatevI = 1 ⇒ I contains exactly one root of P
rI = vI ∈ {0, 1} if other (complex) roots well-separated from I
3
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Descartes method
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
4
Complexity (“benchmark problem”)
isolate all roots of an integer polynomial of degree n and coefficient bitsize τ
# roots / tree width: ≤ n min. root separation: ≥ 2−O(nτ)
subdivision rule and subdivision precision overall bitmodel of computation tree size demand complexity
bisection, exact over Z / Q O(nτ) O(n2τ) O(n4τ2)1
bisection, approximate O(nτ) O(nτ) O(n3τ2)
Newton, exact over Z / Q O(n) O(n2τ)∗ O(n3τ)
Newton, approximate O(n) O(nτ)† O(n3 + n2τ)
∗amortized over entire tree: O(nτ) †amortized over entire tree: O(n + τ)
5
Complexity (“benchmark problem”)
isolate all roots of an integer polynomial of degree n and coefficient bitsize τ
# roots / tree width: ≤ n min. root separation: ≥ 2−O(nτ)
subdivision rule and subdivision precision overall bitmodel of computation tree size demand complexity
bisection, exact over Z / Q O(nτ)1 O(n2τ) O(n4τ2)1
bisection, approximate O(nτ) O(nτ) O(n3τ2)
Newton, exact over Z / Q O(n) O(n2τ)∗ O(n3τ)
Newton, approximate O(n) O(nτ)† O(n3 + n2τ)
∗amortized over entire tree: O(nτ) †amortized over entire tree: O(n + τ)
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Beyond the RealRAM-model
P(x) = 2πx2 − (π + 4√
2)x + 2√
2 = (πx− 2√
2)(2x− 1) ∈ R[x]≈ 6.…x2 − 9.…x + 3.…
12
2√
2π
1
v =?2
? ?
P( 12 ) = 0?
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Beyond the RealRAM-model
P(x) = 2πx2 − (π + 4√
2)x + 2√
2 = (πx− 2√
2)(2x− 1) ∈ R[x]≈ 6.3…x2 − 8.8…x + 2.8…
12
2√
2π
1
v =?2
? ?
P( 12 ) = 0?
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Beyond the RealRAM-model
P(x) = 2πx2 − (π + 4√
2)x + 2√
2 = (πx− 2√
2)(2x− 1) ∈ R[x]≈ 6.28…x2 − 8.79…x + 2.83…
12
2√
2π
1
v =?2
? ?
P( 12 ) = 0?
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Beyond the RealRAM-model
P(x) = 2πx2 − (π + 4√
2)x + 2√
2 = (πx− 2√
2)(2x− 1) ∈ R[x]≈ 6.283…x2 − 8.7984…x + 2.828…
12
2√
2π
1
v =?2
? ?
P( 12 ) = 0?
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Beyond the RealRAM-model
P(x) = 2πx2 − (π + 4√
2)x + 2√
2 = (πx− 2√
2)(2x− 1) ∈ R[x]≈ 6.2832…x2 − 8.79845…x + 2.8284…
12
2√
2π
1
v =?2
? ?
P( 12 ) = 0?
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Beyond the RealRAM-model
P(x) = 2πx2 − (π + 4√
2)x + 2√
2 = (πx− 2√
2)(2x− 1) ∈ R[x]≈ 6.2832…x2 − 8.79845…x + 2.8284…
12
2√
2π
1
v =?2
? ?
P( 12 ) = 0?
problems with arbitrarily approximable (“bitstream”) coefficients
• no termination on subdivision on an exact root
• precision demand for processing I = (a, b) depends on |P(a)| and |P(b)|
6
Admissible points
ADsc (Approximate Descartes)Instead of subdivision at m ∈ I:
• sample suitable points near m,
• choose an admissible point m∗ with large value |P(m∗)| among the samples
• and subdivide at m∗.
In particular: |P(m∗)| 6= 0!
⇒ guaranteed termination for arbitrary (square-free) inputs
⇒ keeps precision demand near theoretical optimum
7
Admissible points
ADsc (Approximate Descartes)Instead of subdivision at m ∈ I:
• sample suitable points near m,
• choose an admissible point m∗ with large value |P(m∗)| among the samples
• and subdivide at m∗.
In particular: |P(m∗)| 6= 0!
⇒ guaranteed termination for arbitrary (square-free) inputs
⇒ keeps precision demand near theoretical optimum
7
Complexity (“benchmark problem”)
isolate all roots of an integer polynomial of degree n and coefficient bitsize τ
# roots / tree width: ≤ n min. root separation: ≥ 2−O(nτ)
subdivision rule and subdivision precision overall bitmodel of computation tree size demand complexity
bisection, exact over Z / Q O(nτ) O(n2τ) O(n4τ2)
bisection, approximate O(nτ) O(nτ)1 O(n3τ2)1
Newton, exact over Z / Q O(n) O(n2τ)∗ O(n3τ)
Newton, approximate O(n) O(nτ)† O(n3 + n2τ)
∗amortized over entire tree: O(nτ) †amortized over entire tree: O(n + τ)
1[Sagraloff: JSC 2014]
8
Clustered roots
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
9
Clustered roots
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
9
Clustered roots
v = 9
9
5 2
5 2
2 1 0 2
2 1 0 2
1 1 0 2
1 1 0 2
2 0
2 0
2 0
2 0
0 2
0 2
1 1
1 1
9
5
2
1 1
1
2
0 2
0 2
2
2
0 2
1 1
0
0
up toO(nτ)
steps
9
Combining Newton’s and Descartes method
• inspired by (Approximate) Quadratic Interval Refinement2
and the Brent-Dekker method3
• certified trial-and-error approach:
• multiplicity-agnostic variant of Newton iteration• determine candidate subinterval of I containing a cluster• verify using Descartes tests; on failure, resort to bisection
• successful in almost all steps;reduces chains of subdivisions around a cluster to poly-logarithmic length
• similar techniques in complex domain: upcoming talk by Juan Xu
• inspired by (Approximate) Quadratic Interval Refinement2
and the Brent-Dekker method3
• certified trial-and-error approach:
• multiplicity-agnostic variant of Newton iteration• determine candidate subinterval of I containing a cluster• verify using Descartes tests; on failure, resort to bisection
• successful in almost all steps;reduces chains of subdivisions around a cluster to poly-logarithmic length
• similar techniques in complex domain: upcoming talk by Juan Xu
• inspired by (Approximate) Quadratic Interval Refinement2
and the Brent-Dekker method3
• certified trial-and-error approach:
• multiplicity-agnostic variant of Newton iteration• determine candidate subinterval of I containing a cluster• verify using Descartes tests; on failure, resort to bisection
• successful in almost all steps;reduces chains of subdivisions around a cluster to poly-logarithmic length
• similar techniques in complex domain: upcoming talk by Juan Xu
• inspired by (Approximate) Quadratic Interval Refinement2
and the Brent-Dekker method3
• certified trial-and-error approach:
• multiplicity-agnostic variant of Newton iteration• determine candidate subinterval of I containing a cluster• verify using Descartes tests; on failure, resort to bisection
• successful in almost all steps;reduces chains of subdivisions around a cluster to poly-logarithmic length
• similar techniques in complex domain: upcoming talk by Juan Xu