35
Robustness in Numerical Robustness in Numerical Computation I Computation I Root Finding Root Finding Kwanghee Ko Kwanghee Ko School of Mechatronics School of Mechatronics Gwnagju Institute of Science Gwnagju Institute of Science and Technology and Technology

Robustness in Numerical Computation I Root Finding

  • Upload
    halle

  • View
    42

  • Download
    0

Embed Size (px)

DESCRIPTION

Robustness in Numerical Computation I Root Finding. Kwanghee Ko School of Mechatronics Gwnagju Institute of Science and Technology. Motivation. Why do we need a nonlinear polynomial solver? Many geometric problems are formulated as systems of nonlinear polynomial equations - PowerPoint PPT Presentation

Citation preview

Page 1: Robustness in Numerical Computation I Root Finding

Robustness in Numerical Robustness in Numerical Computation IComputation IRoot FindingRoot Finding

Kwanghee KoKwanghee KoSchool of MechatronicsSchool of Mechatronics

Gwnagju Institute of Science and Gwnagju Institute of Science and TechnologyTechnology

Page 2: Robustness in Numerical Computation I Root Finding

MotivationMotivation Why do we need a nonlinear polynomial solver?Why do we need a nonlinear polynomial solver?

• Many geometric problems are formulated as Many geometric problems are formulated as systems of nonlinear polynomial equationssystems of nonlinear polynomial equations

• Distance functionDistance function• IntersectionsIntersections• Curvature extrema, etc.Curvature extrema, etc.

Page 3: Robustness in Numerical Computation I Root Finding

Solution MethodsSolution Methods Local Solution MethodsLocal Solution Methods

• Newton-type methodNewton-type method• good initial approximationgood initial approximation• No assurance that all roots have been foundNo assurance that all roots have been found

Global Solution MethodsGlobal Solution Methods• Algebraic Type MethodsAlgebraic Type Methods• Homotopy (Continuation) MethodsHomotopy (Continuation) Methods• Subdivision MethodsSubdivision Methods

Page 4: Robustness in Numerical Computation I Root Finding

Subdivision MethodsSubdivision Methods AdvantagesAdvantages

• Efficient and stable Efficient and stable • Easy to implementEasy to implement

DisadvantagesDisadvantages• No certainty that each root has been isolatedNo certainty that each root has been isolated• No explicit information about root multiplicitiesNo explicit information about root multiplicities

Example AlgorithmExample Algorithm• Projected Polyhedron AlgorithmProjected Polyhedron Algorithm

Page 5: Robustness in Numerical Computation I Root Finding

Projected Polyhedron Projected Polyhedron AlgorithmAlgorithm

Transform algebraic problems (finding roots) to Transform algebraic problems (finding roots) to geometric problems (computing intersections).geometric problems (computing intersections).• Use a powerful geometric property, the Use a powerful geometric property, the convex hullconvex hull

propertyproperty in the algorithm. in the algorithm. Input : a system of polynomial equations in Input : a system of polynomial equations in

Bernstein form.Bernstein form. Output : intervals (regions) which contain roots.Output : intervals (regions) which contain roots.Note : Conversion from power basis to Bernstein basis is Note : Conversion from power basis to Bernstein basis is

unstable. So we need to use Bernstein polynomials unstable. So we need to use Bernstein polynomials from the beginning to formulate a problem.from the beginning to formulate a problem.

Page 6: Robustness in Numerical Computation I Root Finding

Projected Polyhedron Projected Polyhedron AlgorithmAlgorithm

(Univariate Polynomial Case)(Univariate Polynomial Case)

1.1. Make an Make an transformatitransformation such that on such that the range the range tt of a function of a function f(t)f(t) is from 0 is from 0 to 1.to 1.

2.2. Construct a Construct a graph (graph (t,f(t)t,f(t)))

0 t1t1 t2

f(t)

Page 7: Robustness in Numerical Computation I Root Finding

Projected Polyhedron Projected Polyhedron Algorithm Algorithm (Univariate Polynomial Case)(Univariate Polynomial Case)

Construct the Construct the convex hull of convex hull of the Bezier the Bezier curvecurve

Page 8: Robustness in Numerical Computation I Root Finding

Projected Polyhedron Projected Polyhedron Algorithm Algorithm (Univariate Polynomial Case)(Univariate Polynomial Case)

Intersect the Intersect the convex hull convex hull with the with the parameter axisparameter axis

Page 9: Robustness in Numerical Computation I Root Finding

Projected Polyhedron Projected Polyhedron Algorithm Algorithm (Univariate Polynomial Case)(Univariate Polynomial Case)

Discard the Discard the regions which regions which do not contain do not contain roots after roots after applying the applying the de Casteljau de Casteljau subdivision subdivision algorithmalgorithm Eliminate

Page 10: Robustness in Numerical Computation I Root Finding

Projected Polyhedron Projected Polyhedron Algorithm Algorithm (Multivariate Polynomial Case)(Multivariate Polynomial Case)

xx = (x = (x11,x,x22,…,x,…,xmm)) independent variables independent variables ff11((xx)=f)=f22((xx)=…=f)=…=fnn((xx)=0)=0 AlgorithmAlgorithm

1.1. Affine Transformation : Affine Transformation : 0 0 x xii 1, i=1,…,m 1, i=1,…,m2.2. Construct a graph for each Construct a graph for each ffjj, j=1,…,n, j=1,…,n..3.3. Project the control polygonProject the control polygon of each of each ffjj onto onto mm different different

coordinate (2D) plane, i.e. coordinate (2D) plane, i.e. (x(x11,x,xm+1m+1)-)-plane, …, plane, …, (x(xmm,x,xm+1m+1))-plane. -plane. 4.4. Construct Construct nn two dimensional convex hulls in each plane. two dimensional convex hulls in each plane.5.5. Intersect each convex hull with the horizontal axis : Intersect each convex hull with the horizontal axis : xx11,…,,…,xxmm..6.6. Compute intersection of all the intervals obtained at step 5.Compute intersection of all the intervals obtained at step 5.7.7. If empty, no solution. If non-empty, discard the portions that If empty, no solution. If non-empty, discard the portions that

do not contain roots.do not contain roots.8.8. RepeatRepeat..

Page 11: Robustness in Numerical Computation I Root Finding

Robustness IssuesRobustness Issues Floating Point ArithmeticFloating Point Arithmetic

• Limited precision / errors due to rounding : Limited precision / errors due to rounding : possibility of missing rootspossibility of missing roots Number of roots = 17Number of roots = 17

Root 1: 1Root 1: 1Root 2: 0.95Root 2: 0.95Root 3: 0.899999999995996Root 3: 0.899999999995996Root 4: 0.849999999999972Root 4: 0.849999999999972Root 5: 0.80000000000028Root 5: 0.80000000000028Root 6: 0.70000000000294Root 6: 0.70000000000294Root 7: 0.650000000006303Root 7: 0.650000000006303Root 8: 0.599999999966461Root 8: 0.599999999966461Root 9: 0.499999999996737Root 9: 0.499999999996737Root 10: 0.449999999994588Root 10: 0.449999999994588Root 11: 0.350000000000347Root 11: 0.350000000000347Root 12: 0.300000000019175Root 12: 0.300000000019175Root 13: 0.249999999996938Root 13: 0.249999999996938Root 14: 0.20000000000004Root 14: 0.20000000000004Root 15: 0.150000000000388Root 15: 0.150000000000388Root 16: 0.100000000000162Root 16: 0.100000000000162Root 17: 0.0500000000000002Root 17: 0.0500000000000002

0)20

()(20

1

ittf

i

Page 12: Robustness in Numerical Computation I Root Finding

Robustness IssuesRobustness IssuesHow to Guarantee Robustness?How to Guarantee Robustness?

Rational / Exact ArithmeticRational / Exact Arithmetic• Memory intensive and time consumingMemory intensive and time consuming

Interval ArithmeticInterval Arithmetic• Inexpensive and robustInexpensive and robust

Page 13: Robustness in Numerical Computation I Root Finding

Robustness IssuesRobustness Issues

Number of roots = 20Number of roots = 20Root 1: [0.0499999999499999, 0.0500000000499999]Root 1: [0.0499999999499999, 0.0500000000499999]Root 2: [0.0999999999501635, 0.100000000050164]Root 2: [0.0999999999501635, 0.100000000050164]Root 3: [0.149999999950384, 0.150000000050384]Root 3: [0.149999999950384, 0.150000000050384]Root 4: [0.199999999950106, 0.200000000050106]Root 4: [0.199999999950106, 0.200000000050106]Root 5: [0.249999999950677, 0.250000000050677]Root 5: [0.249999999950677, 0.250000000050677]Root 6: [0.299999999942791, 0.300000000100442]Root 6: [0.299999999942791, 0.300000000100442]Root 7: [0.349999999902533, 0.350000000186656]Root 7: [0.349999999902533, 0.350000000186656]Root 8: [0.399999999763889, 0.400000000220964]Root 8: [0.399999999763889, 0.400000000220964]Root 9: [0.449999999713928, 0.450000000330666]Root 9: [0.449999999713928, 0.450000000330666]Root 10: [0.499999999608116, 0.500000000334665]Root 10: [0.499999999608116, 0.500000000334665]Root 11: [0.549999999752196, 0.550000000340326]Root 11: [0.549999999752196, 0.550000000340326]Root 12: [0.599999999761494, 0.600000000180693]Root 12: [0.599999999761494, 0.600000000180693]Root 13: [0.649999999906409, 0.650000000124028]Root 13: [0.649999999906409, 0.650000000124028]Root 14: [0.699999999948099, 0.700000000048099]Root 14: [0.699999999948099, 0.700000000048099]Root 15: [0.749999999928722, 0.750000000028722]Root 15: [0.749999999928722, 0.750000000028722]Root 16: [0.799999999949892, 0.800000000049892]Root 16: [0.799999999949892, 0.800000000049892]Root 17: [0.849999999949933, 0.850000000049934]Root 17: [0.849999999949933, 0.850000000049934]Root 18: [0.899999999945992, 0.900000000045992]Root 18: [0.899999999945992, 0.900000000045992]Root 19: [0.949999999949999, 0.95000000005]Root 19: [0.949999999949999, 0.95000000005]Root 20: [0.99999999995, 1]Root 20: [0.99999999995, 1]

Results in Rounded Interval ArithmeticResults in Rounded Interval Arithmetic

Page 14: Robustness in Numerical Computation I Root Finding

Polynomials with Multiple Polynomials with Multiple RootsRoots

Loss of accuracy as a result of high Loss of accuracy as a result of high multiplicity multiplicity mm..

y = (x-0.1)m

Page 15: Robustness in Numerical Computation I Root Finding

Computing Multiplicity using Computing Multiplicity using Topological Degree MethodTopological Degree Method

Let Let p(x,y), q(x,y)p(x,y), q(x,y) be polynomials with rational be polynomials with rational coefficients without common factors, of degrees coefficients without common factors, of degrees nn11 and and nn22, and let , and let F=(p, q).F=(p, q).

Let Let AA be a rectangle in the plane defined by be a rectangle in the plane defined by so that no zero of so that no zero of FF lies lies

its boundary , and does not vanish at its its boundary , and does not vanish at its vertices.vertices.

Gauss map where Gauss map where SS11 is the unit circle. is the unit circle. GG is continuous ( ). is continuous ( ). and and SS11 carry the counterclockwise orientation carry the counterclockwise orientation

Degree Degree dd of of GG : an integer indicating how many times : an integer indicating how many times is wrapped around is wrapped around SS11 by by GG..

Page 16: Robustness in Numerical Computation I Root Finding

Illustration of the Gauss Illustration of the Gauss MapMap

a1x

S1

y

a3

a4

a2

z=(x0,y0)

(0,0)

p(x,y)

q(x,y)

(0,0)

G=F/||F||

F1

X

Y

F=(p(x,y),q(x,y))

F1 / | F1|

Gauss Map

Page 17: Robustness in Numerical Computation I Root Finding

ExampleExample

-5

-4

-3

-2

-1

0

1

2

3

4

5

-6 -4 -2 0 2 4 6

f(x,y)

g(x,

y)

IR3 (f(x,a3)=0)IR2 (f(a2,y)=0)IR4 (f(x,a4)=0)IR1 (f(a1,y)=0)

•p(x) = (x-1/2)5 = 0 ->

Page 18: Robustness in Numerical Computation I Root Finding

Computing Multiplicity using Computing Multiplicity using Topological Degree MethodTopological Degree Method

Two approaches for computing the Two approaches for computing the topological degreetopological degree

Cauchy index computation methodCauchy index computation method

Winding number computation methodWinding number computation method

Page 19: Robustness in Numerical Computation I Root Finding

The Cauchy IndexThe Cauchy Index PreliminariesPreliminaries

R(x)R(x) : a rational function : a rational function q(x)/p(x),q(x)/p(x), where where p, qp, q are are polynomials.polynomials.

[[a,ba,b] : a closed interval, ] : a closed interval, a < ba < b. . RR does not become does not become infinite at the end points.infinite at the end points.

Definition of the Definition of the Cauchy indexCauchy index By the By the Cauchy indexCauchy index, of , of RR over [ over [a,ba,b]],, we we

mean mean where where denotes the denotes the number of points in (number of points in (a,ba,b) at which ) at which R(x)R(x) jumps jumps fromfrom , respectively, as , respectively, as xx is moving from is moving from aa to to bb. . Notice that Notice that from the definition. from the definition.

Page 20: Robustness in Numerical Computation I Root Finding

Cauchy Index (continued)Cauchy Index (continued) PreliminariesPreliminaries

AA : a rectangle defined by [ : a rectangle defined by [ a a11,a,a22 ]] x x [[ a a33,a,a44] ] which encloses a zerowhich encloses a zero..

FF = (p,q)= (p,q) does not vanish on the boundary of does not vanish on the boundary of AA, , is not zero at each vertex of is not zero at each vertex of AA.. LetLet Then, we set (for counterclockwise traversal of Then, we set (for counterclockwise traversal of

) )

Proposition*Proposition*IIAAFF is an even integer and the multiplicity is an even integer and the multiplicity * T. Sakkalis, “The Euclidean Algorithm and the Degree of the Gauss Map”, SIAM J. Computing. Vol. 19, No. 3,

1990.

Page 21: Robustness in Numerical Computation I Root Finding

Illustrative Example for Illustrative Example for Multiplicity ComputationMultiplicity Computation

p(x) = (x-1/2)p(x) = (x-1/2)5 5 = 0= 0 A root of A root of p(x), p(x), [[ a a ]] = = [[0.49,0.510.49,0.51]].. P(z); (z = x+iy)P(z); (z = x+iy) CreateCreate

Calculate the Cauchy indexCalculate the Cauchy index Roots of Roots of f(x,af(x,a33) = 0) = 0 Calculation of Calculation of

Roots No. 2, 3, and 4 are selected since they Roots No. 2, 3, and 4 are selected since they lie within the interval [ a ].lie within the interval [ a ].

[0.530776834861365, [0.530776834861365, 0.530776835861365]0.530776835861365]55[0.507265424645288, [0.507265424645288, 0.507265426808589]0.507265426808589]44[0.499999997363532, [0.499999997363532, 0.500000001889623]0.500000001889623]33

[0.49273457408967, 0.492734576204823][0.49273457408967, 0.492734576204823]22[0.46922316412099, [0.46922316412099, 0.46922316512099]0.46922316512099] 11

Roots of Roots of f(x,af(x,a33) = 0) = 0 in [0,1] (from the in [0,1] (from the IPP)IPP)

No.No.

Page 22: Robustness in Numerical Computation I Root Finding

Similarly,Similarly,

Calculate Calculate

The multiplicity The multiplicity mm of the root is of the root is

Illustrative Example Illustrative Example (continued)(continued)

Page 23: Robustness in Numerical Computation I Root Finding

Winding number Winding number Computation MethodComputation Method

Page 24: Robustness in Numerical Computation I Root Finding

Polynomials with Multiple Polynomials with Multiple RootsRoots

Interval Projected Interval Projected Polyhedron AlgorithmPolyhedron Algorithm

After verifying the existence of roots using the After verifying the existence of roots using the degree of Gauss mapdegree of Gauss map

Intersection between f(x) and y=0Intersection between f(x) and y=0

Page 25: Robustness in Numerical Computation I Root Finding

Univariate Polynomial Univariate Polynomial EquationEquation

Assume that we have a univariate polynomial Assume that we have a univariate polynomial equation equation f(t) = 0f(t) = 0..

Substitute Substitute t t with with z = x + iyz = x + iy. Then we have . Then we have f(z) = p(x,y) + iq(x,y).f(z) = p(x,y) + iq(x,y).

Solve Solve f(z)=0f(z)=0 in the complex domain based on in the complex domain based on the topological degree algorithm.the topological degree algorithm. F(x,y) = (p(x,y),q(x,y)).F(x,y) = (p(x,y),q(x,y)). We can find not only real but also complex roots We can find not only real but also complex roots

of of f(t)=0f(t)=0 at the same time using the bisection at the same time using the bisection algorithm.algorithm.

Page 26: Robustness in Numerical Computation I Root Finding

Topological Degree Bisection Topological Degree Bisection AlgorithmAlgorithm

x

y

Page 27: Robustness in Numerical Computation I Root Finding

Topological Degree Bisection Topological Degree Bisection AlgorithmAlgorithm

x

y

Page 28: Robustness in Numerical Computation I Root Finding

Topological Degree Bisection Topological Degree Bisection AlgorithmAlgorithm

x

y

Page 29: Robustness in Numerical Computation I Root Finding

Topological Degree Bisection Topological Degree Bisection AlgorithmAlgorithm

x

y

Page 30: Robustness in Numerical Computation I Root Finding

ExampleExample

Page 31: Robustness in Numerical Computation I Root Finding

Bivariate Polynomial Bivariate Polynomial EquationsEquations

Topological Degree MethodTopological Degree Method• Useful for a polynomial equation of one variableUseful for a polynomial equation of one variable

Procedure for bivariate polynomial Procedure for bivariate polynomial equationsequations• Compute the resultants of the system for each Compute the resultants of the system for each

variable.variable.• Solve the resultant equations using the Solve the resultant equations using the

topological degree method.topological degree method.• Select tuples which satisfy the system of Select tuples which satisfy the system of

equation.equation.

Page 32: Robustness in Numerical Computation I Root Finding

Bivariate Polynomial Bivariate Polynomial EquationsEquations

Resultant of a system of polynomial Resultant of a system of polynomial equationsequations Let f and g be two polynomials in one variable.Let f and g be two polynomials in one variable. When f and g have a nontrivial common factor When f and g have a nontrivial common factor

h, say f = fh, say f = f11h and g=gh and g=g11h, and the equation h, and the equation uf+vg = 0 has the solution u=guf+vg = 0 has the solution u=g11 and v=-f and v=-f11..

Conversely, the existence of nonzero solutions Conversely, the existence of nonzero solutions to this equation implies the fact that the to this equation implies the fact that the polynomials f and g admit a common non-polynomials f and g admit a common non-trivial divisor h.trivial divisor h.

Page 33: Robustness in Numerical Computation I Root Finding

Bivariate Polynomial Bivariate Polynomial EquationsEquations

Resultant of a system of polynomial Resultant of a system of polynomial equationsequations GivenGiven

= 0

Then there exists a common non-trivial divisor h of f and g, which is a common solution of the equations f=0 and g=0.

Page 34: Robustness in Numerical Computation I Root Finding

Bivariate Polynomial Bivariate Polynomial EquationsEquations

Resultant of a system of bivariate Resultant of a system of bivariate polynomial equations polynomial equations Given f(x,y) = 0 and g(x,y) = 0.Given f(x,y) = 0 and g(x,y) = 0. h(x) = Resh(x) = Resyy(f,g), l(y) = Res(f,g), l(y) = Resxx(f,g).(f,g). Find the solutions of h(x) = 0 and l(y) = 0 Find the solutions of h(x) = 0 and l(y) = 0

to make the resultants be zero.to make the resultants be zero. It implies that both equations have the It implies that both equations have the

common factors, namely, common roots.common factors, namely, common roots. Find pairs of (x,y) to satisfy f(x,y) = g(x,y) Find pairs of (x,y) to satisfy f(x,y) = g(x,y)

= 0 at the same time.= 0 at the same time.

Page 35: Robustness in Numerical Computation I Root Finding

Bivariate Polynomial Bivariate Polynomial EquationsEquations

ExampleExample