<<

MCS 563 Spring 2014 Analytic Symbolic Computation Friday 21 February

Mixed Volumes

Via the Cayley trick we will introduce mixed volumes. The mixed volume gives a sharp root count for the design of an RPS serial chain passing through 10 points. Following [1], we link to . The geometry of the Cayley trick provides intuition for Minkowski’s theorem. We end suggesting an for the mixed of two polygons.

1 Resultants are Discriminants

We have defined a of a f as the of f and its derivative(s). At the same time, we can define a resultant as a discriminant.

The vanishing of the A-resultant RA(f) of the system f(x) = 0 happens whenever the coefficients ca, ∗ ∗ a ∈ A, of f allow a zero x : f(x ) = 0. The A-discriminant ∆A(p) of a polynomial p(x) vanishes when p ∂p i , ,...,n (x) = 0 and ∂xi = 0, =1 2 . Following [1, Proposition 1.7, page 274], we state:

Proposition 1.1 (The Cayley trick) For a system f(x)= 0, f = (f1,f2,...,fn), x = (x1, x2, . . ., xn−1), the A-resultant RA(f) equals a certain A-discriminant: n

RA(f1,f2,...,fn) = ∆A f1 + yi−1fi . (1) i=2 ! X n

Proof. Denote p(x, y)= f1 + yi−1fi . We prove the = via two inclusions: ⊆ and ⊇. i=2 ! ∗ ∗ X ∗ ∂p ⊆ If there is a x : f(x ) = 0, then obviously p(x, y) = 0, as fi(x ) = 0, for any y, and also ∂yi = 0, as ∂p f ∗ ∗ ∂p ∂yi = i+1 for x = x . When x is fixed to x , the conditions ∂xi = 0 translate into a linear system in y. ∂p ∗ ∗ Solving then this linear system ∂xi = 0, for x = x leads to values of y which is then y . So we have shown that whenever the A-resultant RA vanishes, the corresponding discriminant ∆A also vanishes. ∗ ∗ ∗ ∗ ∂p ∗ ∗ ∂p ∗ ∗ ⊇ If there exists a (x , y ) such that p(x , y ) = 0 and ∂x (x , y )=0= ∂y (x , y ), then for i =2, 3,...,n: f ∗ ∂p ∗ f ∗ p ∗, ∗ f ∗ i , ,...,n i(x ) = ∂yi−1 (x ) = 0. Finally, 1(x ) = 0 follows from (x y ) = 0 and i(x ) = 0, for = 2 3 . This shows that whenever this special A-discriminant ∆A vanishes, we have a zero of the system f(x)= 0. 

To verify Proposition 1.1 on an example, consider: (x )x3 + (x2)x +(1)=0 f(x , x )= 2 1 2 1 (2) 1 2 (1)x4 + (x )x +(1)=0  1 2 1 We view the (f1,f2) of f as two polynomials in x1 where the coefficients are polynomials in x2. In Maple we execute the following commands: [> f := [x[1]^3*x[2] + x[1]*x[2]^2 + 1, x[1]^4 + x[1]*x[2] + 1]: [> factor(resultant(f[1],f[2],x[2])); [> p := f[1]+y[1]*f[2]: [> px := diff(p,x[1]): py := diff(p,x[2]): [> r1 := resultant(p,px,y[1]): r2 := resultant(p,py,y[1]): [> factor(resultant(r1,r2,x[2])); Then the resultant and discriminant are factors of the polynomials 7 3 8 4 x1(x1 − x1 − x1 + x1 +2x1 + 1) and (3) 2 7 3 8 4 12 11 8 7 6 5 4 3 2 x1(x1 − x1 − x1 + x1 +2x1 + 1)(3x1 − 4x1 + 14x1 + 44x1 − 34x1 +4x1 − 5x1 − 16x1 +6x1 − 1). (4)

JanVerschelde UIC,DeptofMath,Stat&CS Lecture17,page1 MCS 563 Spring 2014 Analytic Symbolic Computation Friday 21 February

2 RPS Serial Chains

The application is taken from [4]. The authors of [4] examine the design of a robot with five degrees of freedom. The links are connected by a Revolute, Prismatic, and Spherical joint, forming a so-called RPS serial chain. The workspace for the robot is a right circular that defines a constraint equation with 10 parameters. Evaluation of the equation at 10 arbitrary spatial positions gives 10 polynomial equations in 10 variables. The RPS chain is defined by lines along the revolute and prismatic joints and a point at the center of the spherical joint. Denote this point by P and let G and B be the direction of and a point on the revolute joint axis respectively. The constraint equation for the RPS chain is of the form

2 q0P · P + Q · P − (P · G) − ζ =0, (5)

where the parameters q0, Q and ζ are defined by G · G q = , Q = 2(B · G)G − 2q B, and ζ = (B · G)2 − q B · B + q a2. (6) 0 1 + tan2(α) 0 0 0 The length and twist parameters a and α are computed from the formulas

q ζ − (B · G)2 + q B · B α = arccos 0 and a = 0 . (7) G · G q r  s 0

The variables in the constraint equation (5) are the scalars q0 and ζ, and the 3-vectors B, G, and P. To design a general chain, we assume we are given 10 goal positions defined by the transformations Ti, i =1, 2,..., 10. We then seek a point p in the moving body so that P = Tip satisfies (5), so we have 10 equations:

2 q0Pi · Pi + Q · Pi − (Pi · G) − ζ =0, i =1, 2,..., 10. (8)

Because the length of G is fixed, we may eliminate one of the coordinates of G, so the equation in (8) defines a system of 10 equations in 10 unknowns. All equations have the same support. The volume of the Newton polytope equals 1,024 and gives an exact root count for generic instances of the problem data. Smaller instances of this problem were solved via an elimination procedure which yielded eigenvalue problems, see [4].

3 The Geometry of the Cayley Trick

The Cayley trick has a geometrical interpretation [3] which leads to the definition mixed volumes and an intuitive understanding of Minkowski’s theorem. The example in this section is copied from [2]. Consider the following system:

f = (f1,f2) A = (A1, A2) x3x + x x2 +1=0 A = {(3, 1), (1, 2), (0, 0)} (9) = 1 2 1 2 1 x4 + x x +1=0 A = {(4, 0), (1, 1), (0, 0)}  1 1 2 2

The sparse structure of f is modeled by the tuple A = (A1, A2), where A1 and A2 are the supports of f1 and f2 respectively. The Newton polytopes are the convex hulls of the supports. The Cayley polytope of r polytopes is the convex hull of the polytopes placed at the vertices of an (r − 1)-dimensional unit simplex. Figure 1 illustrates this construction for our example. For our example, the Cayley polytope is so simple that a triangulation is obvious (see Figure 2). As every simplex has four vertices, either the simplex has three vertices from the same polygon (and the fourth one of the other polygon), or the simplex has two vertices of each polygon. A simplex of the first type is called

JanVerschelde UIC,DeptofMath,Stat&CS Lecture17,page2 MCS 563 Spring 2014 Analytic Symbolic Computation Friday 21 February

(0,0,1) (0,0,1)

(4,0,1) (1,1,1) (4,0,1) (1,1,1)

(0,0,0) (0,0,0)

(3,1,0) (1,2,0) (3,1,0) (1,2,0)

Figure 1: The Cayley polytope of two polygons. The first polygon is placed at the vertex (0, 0, 0), the second polygon is placed at (0, 0, 1).

(4,0,1) (0,0,1) (0,0,1)

(4,0,1) (4,0,1) (1,1,1)

(0,0,0)

(0,0,0)

(3,1,0) (1,2,0) (1,2,0) (1,2,0)

Figure 2: A triangulation of the Cayley polytope. The middle simplex is mixed, the other two simplices are unmixed.

unmixed, a simplex of the second type is mixed. Imagine taking slices parallel to the base of the Cayley polytope. These slices produce scaled copies of the original polygons in the unmixed simplices. In the mixed simplex we find one scaled edge from the first and another scaled edge from the second polygon, see Figure 2. On Figure 3 we see in the cross section of the Cayley polytope a mixed subdivision of the convex combi- nation λ1P1 + λ2P2, λ1 + λ2 = 1, λ1 ≥ 0 and λ2 ≥ 0, where P1 defines the base and P2 is at the top of the 2 2 polytope. The of the triangles in the cross section are λ1 × area(P1) and λ2 × area(P2), as each side of the triangle is scaled by λ1 and λ2 respectively. The area of the cell in the subdivision spanned by one edge of P1 (scaled by λ1) and the other edge of P2 (scaled by λ2) is scaled by λ1 × λ2, as we move the cross section.

In Figure 4 we show the Minkowski sum of the two polygons P1 and P2, with their mixed subdivision corresponding to the triangulation of the Cayley polytope. For this example, Minkowski’s theorem becomes

2 2 area(λ1P1 + λ2P2) = V (P1, P1)λ1 + V (P1, P2)λ1λ2 + V (P2, P2)λ2 2 2 (10) = 3λ1 +8λ1λ2 +2λ2.

The coefficients in the polynomial (10) are mixed volumes (or areas in our example): V (P1, P1) and V (P2, P2) are the respective areas of P1 and P2, while V (P1, P2) is the mixed area.

JanVerschelde UIC,DeptofMath,Stat&CS Lecture17,page3 MCS 563 Spring 2014 Analytic Symbolic Computation Friday 21 February

(0,0,1)

(4,0,1) (1,1,1)

(0,0,0) (0,0,0)

(1,2,0) (3,1,0) (1,2,0) (3,1,0)

Figure 3: A mixed subdivision induced by a triangulation of the Cayley polytope.

(1,2)+(1,1) Ps 2 P (1,2) λ P (1,2)+(4,0) sqq (0,0)+(1,2) s 2 PPqsq qq qqqq qq qq qqqq qq qqq (1,1) qq qq 2 qqq q P1 qqqs , s q q λ qqqs qq q q q q (3 1) P qq λ1λ2 qq 1 q q q q q q q q PP q q q q q (3,1)+(4,0) sqqq q q q s P2 PPs sqq qsqq q q q (0,0) (0,0) (4,0) (0,0)+(0,0) (0,0)+(4,0)

Figure 4: A subdivision of the sum of two polygons P1 and P2. The sum is the convex hull of all sums of the vertices of the polygons. The cells in the subdivision are labeled by the multipliers for the area of λ1P1 + λ2P2.

4 Minkowski’s Theorem

Figure 4 and the corresponding formula (10) are special instances of Minkowski’s theorem, often used to define mixed volumes. We call the expression in (11) below the Minkowski polynomial.

n Theorem 4.1 (Minkowski) Let P1, P2, . . ., Pn be polytopes in R . For a corresponding sequence of real numbers λ1, λ2, . . ., λn, the volume of λ1P1 + λ2P2 + · · · + λnPn is a in λ1, λ2, . . ., λn of degree n. In particular:

n n n

vol λiPi = · · · λi1 λi2 · · · λin V (Pi1 , Pi2 ,...,Pin ). (11) i=1 ! i1=1 i2=1 in=1 X X X X

The coefficient V (Pi1 , Pi2 ,...,Pin ) is the mixed volume of the tuple (Pi1 , Pi2 ,...,Pin ).

Figure 5 illustrates the computation of the mixed area of two polygons P1 and P2 with their edges oriented from the top (the highest right vertex) to the bottom (the lowest left vertex). The supports A1 and A2 spanning respectively P1 and P2 are

A1 = {(2, 2), (1, 2), (2, 1), (0, 1), (1, 0), (0, 0)} (12)

A2 = {(2, 3), (1, 3), (3, 2), (0, 2), (3, 1), (0, 1), (2, 0), (1, 0)}. (13)

In Figure 5, we make the sum of P1 with P2 placing the bottom of P2 at the top of P1. Every polygon has a unique top, rightmost vertex and a unique bottom, leftmost vertex. The edges from top to bottom are defined by two chains of ordered vertices, so we have two edge paths from top to bottom. Following the edge paths from top to bottom, we merge the edges into cells that contribute to the mixed area.

JanVerschelde UIC,DeptofMath,Stat&CS Lecture17,page4 MCS 563 Spring 2014 Analytic Symbolic Computation Friday 21 February

r r r r r @ @ r © @R r r © r © @Rr

r? P2 r? r © r? r? P2 ?r @ @ @ r r + @Rr ©r = ? ©r @Rr@Rr r © r? @ © ? ? © ? ? r P1 r r@R r P1 r ©r @ r? © r @Rr? r © r ©

Figure 5: Mixed area computation for two polygons P1 and P2.

5 Exercises

1. Use Maple or Sage to encode the formulas in (5), (6) and (7) to arrive at the system defined by (8). Solve this system for random choices of the parameters. 2. Verify that the system in (1) has indeed 8 solutions. 3. Apply the geometric version of the Cayley trick to the system

x x + x + x +1=0 f(x)= 1 2 1 2 (14) x2x2 + x + x =0.  1 2 1 2 What is the mixed volume? How many solutions does this system have?

4. Show that the mixed volume is multilinear, e.g.: V (λP1 + µP2,Q) = λV (P1,Q)+ µV (P2,Q), for all polygons P1, P2, Q and all λ, µ ≥ 0. 5. Elaborate the geometric version of the Cayley trick for the example of Figure 5. Download the software polymake to explore the Cayley polytope. 6. Consider Figure 5 and discuss the cost of the mixed area computation for two polygons, spanned by A1 and A2, where n1 = #A1 and n2 = #A2. Formulate the algorithm suggested by Figure 5. Can you show that its cost is O(n1n2)?

References

[1] I.M. Gel’fand, M.M. Kapranov, and A.V. Zelevinsky. Discriminants, Resultants and Multidimensional . Birkh¨auser, 1994. [2] A.J. Sommese, J. Verschelde, and C.W. Wampler. Introduction to numerical . In A. Dickenstein and I.Z. Emiris, editors, Solving Polynomial Equations. Foundations, and Applications, volume 14 of Algorithms and Computation in , pages 301–337. Springer–Verlag, 2005. [3] B. Sturmfels. On the Newton polytope of the resultant. Journal of Algebraic Combinatorics, 3:207–236, 1994. [4] H.-J. Su and J.M. McCarthy. Kinematic synthesis of RPS serial chains. In the Proceedings of the ASME Design Engineering Technical Conferences (CDROM), Chicago, IL, Sep 2-6, 2003.

JanVerschelde UIC,DeptofMath,Stat&CS Lecture17,page5