An Algorithm to Calculate the Kernel of Certain ... - Project Euclid

0 downloads 0 Views 221KB Size Report
3. The Solution by Means of Gröbner Bases over Kx. 4. Simulation Results and .... 3 x4. 4x15. 5 x14. 1 x35. 2 x36. 6 g is the reduced Gr obner basis for ker with ...
An Algorithm to Calculate the Kernel of Certain Polynomial Ring Homomorphisms ¨ Fausto Di Biase and Rudiger Urbanke

CONTENTS 1. Introduction 2. The Solution by Means of a Grobner Basis over ¨ 3. The Solution by Means of Grobner Bases over ¨ 4. Simulation Results and Discussion References

Kx;y Kx

We propose an improvement upon the standard algorithm for computing the kernel of a polynomial map, assuming that the map sends monomials into monomials. Rather than computing ¨ a Grobner basis in the joint polynomial ring, and then selecting only the elements of interest, we show that a moderate number of iterations of the Buchberger algorithm in the variables of the domain suffices.

1. INTRODUCTION

This work was carried out while the authors were at Washington University, St. Louis, in the Mathematics and Electrical Engineering Departments, respectively. Di Biase thanks the C.N.R. (Italy) for support, through grants 203.01.55 and 203.01.63.

We are interested in calculating a nite basis for the kernel of a ring homomorphism  : Kx ! Ky between polynomial rings Kx := K [x1 ; : : : ; xn ] and Ky := K [y1 ; : : : ; ym]. It is well known [Adams and Loustaunau 1994; Conti and Traverso 1991] that this can be accomplished applying the Buchberger algorithm [Buchberger 1985] over the polynomial ring Kx;y := K [x1 ; : : : ; xn ; y1 ; : : : ; ym ]. Unfortunately, the complexity of the Buchberger algorithm is a strongly increasing function of the number of variables. Hence, it would be useful to nd an algorithm operating on Kx alone. The main result of this paper is that this can indeed be done in the special case in which the map  is the extension of a semigroup homomorphism. We will see that in this case a moderate number (bounded by b 21 nc) of Buchberger algorithms over Kx is suf cient to nd a basis for ker , and, hence, that for a large number of variables the proposed algorithm will be more ecient than the standard algorithm. For general information on Grobner bases, see [Buchberger 1985; Cox et al. 1991]. The proposed algorithm has many applications, e.g., in the area of integer programming [Conti

c A K Peters, Ltd. 1058-6458/96 $0.50 per page

228

Experimental Mathematics, Vol. 4 (1995), No. 3

and Traverso 1991; Natraj et al.; Thomas; Hosten and Sturmfels 1994] as well in the realm of sampling from conditional distributions [Diaconis and Sturmfels]. We start by shortly reviewing the standard solution in Section 2. In Section 3 we then present the new algorithm together with some examples. Finally, in Section 4 the running times of these two algorithms are compared and the results are discussed.

y y y y , y y y , y y y , and y y . The reduced Grobner basis G for hf ; : : : ; gi with respect to lex order y >    y > x >    > x consists of 1180 elements, and G0 = f x x x x x ; x x x x x x ; x x x x x x ;x x x x x x ; x x x x x x ;x x x x x x g is the reduced Grobner basis for ker  with respect to lex order x >    > x . Note that the above procedure requires the calculation of a Grobner basis G of hf i gi in Kx;y , but the actual solution G0 is then just a small subset of G, namely G0 = G \ Kx . This is especially apparent in the second example, where jGj = 1180 and jG0j = 6. 4 4 2 1 2 3 4

2 4 1 3 4

Let fj = (xj ) 2 Ky and j = xj fj 2 Kx;y , for j = 1; : : : ; n. Denote by hf: : :gi the ideal generated by f: : :g. Lemma 2.1. Let G be a (reduced ) Gr obner basis for hf 1; : : : ; n gi in Kx;y with respect to a term order that eliminates the y variables . Then G0 = G \ Kx is a (reduced ) Grobner basis for ker . Proof. The Elimination Theorem [Cox et al. 1991, p. 114] implies that G0 is a (reduced) Grobner basis for hf 1 ; : : : ; n gi \ Kx . The claim then follows since hf 1 ; : : : ; n gi is equal to the kernel of the (unique) homomorphic extension e : Kx;y ! Ky of , for which e (xj ) = fj and e (yi ) = yi .  Example 2.2. Let  : K [x1 ; : : : ; x4 ] ! K [y1 ; y2 ] map x1; : : : ; x4 into y13, y12y2 , y1 y22, and y23 , respectively, so that 1 = x1 y13 , etc. Then G = f x23 + x2 x4 ; x2 x3 + x1 x4 ; x22 + x1 x3 ; x4 y23; x4 y1 + x3y2 ; x3y1 + x2 y2; x2y1 + x1 y2 ; x3 y1 y22; x2 y12y2; x1 y13g is the reduced Grobner basis for hf 1 ; : : : ; 4 gi with respect to lex order, y1 > y2 > x1 >    > x4 . Hence, G0 = f x23 + x2x4 ; x2 x3 + x1 x4 ; x22 + x1 x3 g is the reduced Grobner basis for ker  with respect to lex order, x1 >    > x4 . Example 2.3. Let  : K [x1 ; : : : ; x6 ] ! K [y1 ; : : : ; y4 ] map x1 ; : : : ; x6 to, respectively, y12 y23 y35 , y15 y22 y33 y4 ,

2 2 2 4

1

1

10 3 16 3 36 3

4

6 4 18 5 16 5

9 2

5

14 1 14 1

1

¨ 2. THE SOLUTION BY MEANS OF A GROBNER BASIS OVER Kx;y

5 3 1 3 4

6

1

6

11 14 20 6 19 2 3 5 6 1 4 8 14 3 26 17 14 2 4 6 3 5 1 26 2 25 46 4 15 2 4 6 3 4 5

8 6 17 2 14 1

8 14 4 6 35 36 2 6

6

¨ 3. THE SOLUTION BY MEANS OF GROBNER BASES OVER x

K Here we present an alternative way to calculate ker  when (xj ) is a monomial in Ky for every j = 1; : : : ; n. The solution is gradually built up by a repeated application of the Buchberger algorithm over Kx (as opposed to Kx;y ). The eciency of the proposed algorithm is based on the (empirical) fact that the complexity of the Buchberger algorithm grows strongly in the number of variables, so that for a large number of variables it is more ecient to calculate a moderate number of Grobner bases over Kx instead of one over Kx;y . This is especially true for the memory requirements of the proposed algorithm (see Example 2.3). Let Mx denote the set of all monomials in Kx , and likewise My . Let fj = (xj ) and assume that fj 2 My , for j = 1; : : : ; n. Note that all the information about  is contained in the m  n matrix M , with nonnegative integer entries, given by the exponents of the monomials f ; : : : ; fn . We use the usual compact multi-index notation for monomials: e.g., for = ( ; : : : ; n ) 2 N n , the symbol x denotes the monomial x 1 : : : xn n . Denote by log the isomorphism between Mx and 1

1

1

229

Di Biase and Urbanke: An Algorithm to Calculate the Kernel of Certain Polynomial Ring Homomorphisms

N n given by log x := for 2 N n . There is a similar map from My to N m , which, by a slight

abuse of notation, we will denote by log also. Let M 2 N mn be de ned by Mi;j = (log fj )i , where Mi;j is the entry of M in row i, column j . This matrix de nes a Z -linear mapping  : Z n ! Z m , by the usual row-by-column multiplication:  (u) := Mu: A Z -basis for ker  can be calculated using a variant of an algorithm that calculates the Smith normal form of an integer basis [Cohen 1993, p. 72]. The connection between ker  and ker  is conveyed by a map ' : Z n ! Kx , which will be presently de ned. For u 2 Z de ne u+ and u by u+ = max(u; 0) and u = max( u; 0). These de nitions extend naturally to elements in Z n if we apply them componentwise. Note that if u 2 Z n then u+ ; u 2 N n , and that ( u)+ = u and ( u) = u+ . Now for any u 2 Z n we de ne '(u) := xu+ xu : Any binomial (di erence of monomials) p = x x , where ; 2 N n , can be written (in a unique way) as p = x x = mp '(up ), where mp 2 Mx and up 2 Z n . We will write p+ for x +, and p for x . Then clearly p+ = x = mpxup and p = x = mpxup . Let 0 denote the natural partial order on N n obtained by forming the product of n copies of N with its natural order. If ; 2 N n , we denote by _ the 0 -smallest element of N n such that 0 _ and 0 _ . In symbols, ( _ )j = maxf j ; j g for j = 1; : : : ; n: We set x _ x = x _ . Lemma 3.1. Let p and q be binomials in Kx . Then p _ q+ p + p _ q+ q = m '(u + u ) (3.1) p;q p q p q+ for some mp;q 2 Mx . Proof. Note that up (up + uq )+ = uq (up + uq ) . Therefore the left-hand side equals

p _ q (p p +

p ) + p q_ q (q q ) = p p_ q p p q_ q q = xup up mp _ u+q mq x uq up mp _ u+q = x x up uq + x up uq = x '(up + uq ); +

+

+

+

+

+

+

+

+(

+log(

)) (

+(

(

+

)

+log(

+log(

(

+

))

)) (

mq ))

+log(

)

where = up (up + uq )+ +(up +log(mp )) _ (u+q +log(mq )) = uq (up + uq ) +(up +log(mp )) _ (u+q +log(mq )): To see that 2 N n note that (up + log(mp )) _ (u+q +log(mq )) is increasing (with respect to 0 ) in mp and mq . Hence, it suces to show that 2 N n in the case mp = mq = 1. Using the facts that up _ u+q = up + (u+q up )+ and (up + uq )+ = (u+p uq )+ + (u+q up )+ , we get that = u+p (u+p uq )+ and, hence, 2 N n .  Note that the S -polynomial [Cox et al. 1991, p. 82] of p and q, as well as the reduction of p with respect to q (if possible), can be written in the form of equation (3.1). This shows that if we calculate the Grobner basis of a set of elements of the form mi '(ui ), where mi 2 Mx and ui 2 Zn , each element of this Grobner basis will also have this form, since this calculation can be done by computing a sequence of S -polynomials (possibly) followed by reductions. This can be seen in Examples 2.2 and 2.3 (each j is a binomial in Kx;y ). We also have the following special case. (The support of 2 N n , denoted by supp , is the set of indices for which the corresponding component of is not zero.) Corollary 3.2. Let p = '(up ); q = '(uq ) for some up ; uq 2 Z n . If supp u+p and supp uq are disjoint (or supp up is disjoint from supp u+q ) then '(up + uq ) 2 h'(fup ; uq g)i: Proof. From Lemma 3.1 with mp = mq = 1 we have (using the same notation as in the previous proof) = u+p (u+p uq )+ . The hypothesis on

230

Experimental Mathematics, Vol. 4 (1995), No. 3

the supports implies that (u+p uq )+ = u+p and, hence, = 0.  Example 3.3. Let u = (1; 2; 3; 1) = u+ u = (1; 0; 3; 0) (0; 2; 0; 1) and v = (2; 1; 0; 2) = v+ v = (2; 1; 0; 0) (0; 0; 0; 2). Since

1 1

2 1

3 1

4 1

1 2

2 2

3 2

4 2

Since this (reduced and therefore unique) Grobner basis does not equal the Grobner basis we calculated in Example 2.2, we conclude that h'(K )i is strictly contained in h'(span K )i. Example 3.6. There are many equivalent choices for K . More precisely, if A 2 Zkk and det A = 1, then K 0 = AK is an equivalent basis (span K 0 = span K ), and we write K 0  K . Conversely, any two equivalent bases are related in this way. Hence, we may ask if there always exists a K 0  K such that h'(K 0 )i = h'(span K )i. Again the previous example shows that this is not true. But there is an important special case in which '(K ) is already sucient to generate h'(span K )i. Theorem 3.7. Let K 2 N kn . Then h'(K )i = h'(span K )i: Proof. Let gi , i = 1; : : : ; k , denote the rows of K . It suces to prove that if '(v) 2 h'(K )i and i 2 f1; : : : ; kg then '(v  gi) 2 h'(K )i, since any u 2 span K can be achieved in this way by starting with v = 0. Hence, assume '(v) 2 h'(K )i. Note that gi 2 N n , so that supp gi \ supp v+ = ?. Therefore, by Corollary 3.2, '(v + gi ) 2 h'(fv; gig)i  h'(K )i: To prove that '(v gi ) 2 h'(K )i, note that v gi = v + ( gi ), and that supp( gi )+ \ supp v = supp gi \ supp v = ?:

1

In general, given a K 2 Z kn there will not exist a K 0  K such that K 0 2 N kn . Nevertheless we can always nd an equivalent basis with all base vectors lying in the same orthant, as the next lemma shows. Lemma 3.8. Let K 2 Z kn . Then there exists a K 0  K such that each column of K 0 is either in N k or in ( N )k . Proof. First note that, if the j -th column of K is the zero k-tuple, the j -th column of any K 0  K is an

supp u+ \ supp v = f1; 3g \ f4g = ?; it follows from Corollary 3.2 that

'(u + v) = '((3; 1; 3; 3)) = x x x x belongs to hfx x x x ; x x x gi. Indeed, this binomial equals x (x x x x ) + x x (x x x ). In the next theorem we see that the connection between ker  and ker  rests on the fact that ker  is the ideal generated by '(ker  ). Theorem 3.4. ker  = h'(ker  )i: Proof. It is simply based on a telescopic identity. Details can be found in [Herzog 1970].  If K is a basis for ker  consisting of k elements (to simplify notation, we will use K to denote a basis for ker  as well as the matrix in Z kn whose rows are the vectors in K ), then it is not true in general that '(K ) will be a set of generators for h'(span K )i, as the next example shows. Example 3.5. Let  be as in Example 2.2. Then  log(f ) log(f ) log(f ) log(f )  M = log(f ) log(f ) log(f ) log(f )   = 03 12 21 30 : Calculating a Z -basis for ker  we get   K = 11 12 11 10 : Hence, '(K ) = fx x x x ; x x x g and, calculating the reduced Grobner basis with respect to lex order, x >    > x , we get the set G = fx x x x ; x x + x x ; x x x g: 3 1

1

3 3

2 2

2 1

1

1

4

1

2

2 3

2 1 2 2 2 4

4 3 3

2

3

3 3

2 4

2

2 2

2 1

4

1

2

3 4

2 4

2

3

4

2 2

4

2

3

1

4

2 2

3



Di Biase and Urbanke: An Algorithm to Calculate the Kernel of Certain Polynomial Ring Homomorphisms

element of N k (being also the zero vector). Hence, without loss of generality, we can assume that each column of K contains at least one nonzero entry. If we can show that there exists a K 0  K such that some row of K 0 has all nonzero entries then by adding suitable (positive) multiples of this row to all other rows (thereby not changing the row space) we can generate the desired equivalent matrix. To see that such a K 0 exists, consider the set fi : 1  i  n and jKj;ij > 0g; called the support of the j -th row of K and denoted by supp gj . De ne K 0 by g10 = g1 and gj0 = gj + aj 1 gj0 1 for j = 2; : : : ; k, where aj 1 is any integer such that supp gj0 = supp gj [ supp gj0 1 (for instance, aj 1 = 1 + maxi jgj;i j). Clearly K 0  K and supp gk0 =

[k

j =1

supp gj = f1; : : : ; ng:

Therefore all components of gk0 are nonzero.  Example 3.9. Let  be as in Example 2.2 and Example 3.5. Then  1 1 1 1   M = 01 11 1 2 1 0 2 3 0 1 = 1 2 1 0 is an equivalent basis for ker  with both rows in the same orthant. Lemma 3.10. Let K 2 Z kn , and assume there exists a nite set U  span K such that h'(U )i = h'(span K )i. If G is the reduced Grobner basis for h'(U )i (with respect to some xed order    > x4 , we obtain f x23 + x2x4 ; x2 x3 + x1x4; x22 + x1x3 g, which agrees with our previous result derived in Example 2.2. Example 3.13. Let  be as in Example 2.3. Then 02 5 4 1 1 01 B3 2 4 0 0 2C M =B A; @5 3 2 2 5 0C  00 1 91 4 103 26 1 11  K = 14 8 16 14 18 3 ;  0 9 10 6 1 11  0 K = 14 10 4 26 20 19 : Hence, Gf2;5;6g = '(Kf0 2;5;6g ) 6 10 11 10 4 26 20 19 = fx92 x10 1; x14 1g: 3 x4 x5 x6 1 x2 x3 x4 x5 x6 Calculating a Grobner basis of Gf2;5;6g with respect to lex order x6 > x1 > : : : > x5 and then applying T6 we get the following set Gf2;5g : 172 201 fx612x146 x154 x232 x543 + x561 x624x735 ; 3 1 x4 x5 ; 128 92 x981 x110 + x38 x421 x284 x555 + x152 x383x26 ; 4 x5 2 x3 x6 ; x82 x163 + x141 x144 x185 x36 ; x281 x344 x375 + x72x223 x56; x141 x2 x204 x195 + x63 x86 ; x92 x103 x64x5 + x116g: In the same way we can calculate Gf2g , which has 22 elements, and nally G? , with 14 elements. Calculating a Grobner basis of G? with respect to lex order x1 >    > x6 one can check that this result coincides with the one derived in Example 2.3. 4. SIMULATION RESULTS AND DISCUSSION

The proposed algorithm requires the determination of at most b 21 nc Grobner bases over Kx . Based on the (empirical) fact that the complexity of the Buchberger algorithm is a strongly growing function of the number of variables, we conclude that it

Di Biase and Urbanke: An Algorithm to Calculate the Kernel of Certain Polynomial Ring Homomorphisms

is in general more ecient to evaluate b 12 nc Grobner bases over Kx than one Grobner basis over Kx;y . In the special cases where either ker  (hence also ker ) is trivial or ker  is spanned by a single element in Z n , no determination of a Grobner basis is required in the proposed algorithm; more generally, we observe that the starting point of the proposed algorithm is a collection of binomials, whose cardinality is equal to the nullity of a generic linear map from Z n to Z m : namely, maxfn m; 0g. Table 1 compares the running times of the standard versus the proposed algorithm for some parameters of n and m. For each pair (n; m) the time listed is the median of the running times, in seconds, of 500 random examples, where each entry in the matrix M was chosen independently according to a uniform distribution on the set f0; : : : ; 5g. The simulation was performed on a NeXT computer (25 Mhz, 20 MBytes of RAM) using Mathematica [Wolfram 1991] (which uses lex order) to perform the Grobner basis calculations and PARI [Batut et al. 1993] to perform the calculation of the integer kernel. From this table we see that for all listed cases but the case (n; m) = (6; 2) the proposed algorithm performs better than the standard algorithm. As expected, the di erence in performance becomes the more signi cant the larger m is compared to n. Beside the signi cant decrease in running time, the proposed algorithm also requires a signi cantly smaller amount of memory. For the mapping given in Example 2.3 the largest intermediate Grobner basis required for the proposed algorithm has 22 elements, compared to 1180 elements that the standard algorithm requires. The listed running times could be further reduced in several ways. Instead of using Mathematica to perform the Grobner basis calculation, one could use Macaulay [Bayer and Stillman], which is signi cantly faster. More substantially, all occurring ideals are toric ideals, for which specialized Buchberger algorithms have been investigated [Conti and Traverso 1991; Hosten and Sturmfels 1994]. These speedups apply to the standard as

233

(n; m) standard alg. present alg. (3; 2) 0.233 0.015 (3; 3) 0.383 0.015 (4; 2) 0.433 0.298 (4; 3) 1.350 0.015 (4; 4) 2.450 0.015 (5; 2) 0.883 0.864 (5; 3) 4.300 0.681 (5; 4) 11.333 0.031 (5; 5) 19.117 0.015 (6; 2) 1.450 2.046 (6; 3) 10.433 3.279 (6; 4) 43.283 1.448 (6; 5) 93.950 0.046 (6; 6) 190.233 0.031 Comparison of running times between the standard and the present algorithms. Times listed are in seconds, and represent the median running times of 500 random examples where each entry of M is independent and uniformly distributed in the set f0; : : : ; 5g. TABLE 1.

well as to the proposed algorithm. There are at least two more potential ways in which the proposed algorithm can be made more ecient. First, it is known that the lexicographical ordering is in general not very ecient, so a potential improvement would be to replace lex order by a more ef cient order which eliminates xj . Secondly, in the above simulations no special e ort was made to choose a speci c K 0 from the many possible equivalent bases in order to minimize the subsequent calculations. Although the original task of the proposed algorithm was to compute the kernel of a polynomial map, assuming that the map sends monomials into monomials, the algorithm also applies to ring homomorphisms  : Kx ! Ky;y 1 , where Ky;y 1 := K [y1 ; : : : ; ym; y1 1 ; : : : ; ym1 ]: For these maps, the entries of the corresponding matrix M will be integers (rather than non negative integers), but the algorithm works as well.

234

Experimental Mathematics, Vol. 4 (1995), No. 3

Finally, we observe that in the standard method one could use the FGLM algorithm [Marinari et al. 1993], which given a Grobner basis with respect to a certain ordering produces a basis with respect to another ordering. Since hf 1 ; : : : ; n gi is already a Grobner basis (with respect to any term order that eliminates the x variables), one could apply this FGLM algorithm to hf 1 ; : : : ; n gi to compute a Grobner basis with respect to a term order that eliminates the y variables, rather than computing this basis from scratch. But it seems that no substantial improvement in running times results from this approach. Further, this approach is limited to the original case where the map sends monomials into monomials, and does not extend to the more general case. REFERENCES

[Adams and Loustaunau 1994] W. W. Adams and P. Loustaunau, An Introduction to Grobner Bases, Graduate Studies in Math. 3, Amer. Math. Soc., Providence, 1994. [Batut et al. 1993] C. Batut, D. Bernardi, H. Cohen and M. Olivier, User's Guide to Pari-GP. This manual is part of the program distribution, available by anonymous ftp from the host megrez.ceremab. u-bordeaux.fr. [Bayer and Stillman] D. Bayer and M. Stillman, Macaulay: A Computer Algebra System for Algebraic Geometry. This manual is part of the program distribution, available by anonymous ftp from the host available by anonymous ftp from zariski.harvard.edu. [Buchberger 1985] B. Buchberger, \Grobner bases: An algorithmic method in polynomial ideal theory", Chapter 6 in Multidimensional Systems Theory (edited by N. K. Bose), D. Reidel, Dordrecht and Boston, 1985.

[Cohen 1993] H. Cohen, A Course in Computational Algebraic Number Theory, Graduate Texts in Math. 138, Springer, New York, 1993. [Conti and Traverso 1991] P. Conti and C. Traverso, \Grobner bases and integer programming", pp. 130{ 139 in Applied Algebra, Algebraic Algorithms, and Error-Correcting Codes, New Orleans, 1991 (edited by H.F. Mattson et al.), Lecture Notes in Computer Science 539, Springer, Berlin, 1991. [Cox et al. 1991] D. Cox, J. Little, and D. O'Shea, Ideals, Varieties, and Algorithms, Undergraduate Texts in Math., Springer, New York, 1991. [Diaconis and Sturmfels] P. Diaconis and B. Sturmfels, \Algebraic algorithms for sampling from conditional distributions", to appear in Ann. Stat. [Herzog 1970] J. Herzog, \Generators and relations of abelian semigroups and semigroup rings," Manuscripta Math. 3 (1970), 175{193. [Hosten and Sturmfels 1994] S. Hosten and B. Sturmfels, \GRIN: An implementation of Grobner bases for integer programming", 1994 (for information contact Hosten at [email protected]). [Marinari et al. 1993] M. Marinari, H. Moller, and T. Mora, \Grobner bases of ideals de ned by functionals with an application to ideals of projective points", Appl. Algebra Eng. Commun. Comput. 4 (1993), 103{145. [Natraj et al.] N. R. Natraj, S. R. Tayur and R. R. Thomas, \An algebraic geometry algorithm for scheduling in the presence of setups and correlated demands", to appear in Math. Programming. [Thomas] R. R. Thomas, \A geometric Buchberger algorithm for integer programming", to appear in Math. Oper. Res. [Wolfram 1991] S. Wolfram, Mathematica: A System for Doing Mathematics by Computer, 2nd ed., Addison-Wesley, Reading, MA, 1991.

Fausto Di Biase, Department of Mathematics, Princeton University, Princeton, NJ 08544 ([email protected]) Rudiger Urbanke, Room 2C-254, AT&T Bell Labs, 600 Mountain Avenue, P.O.Box 636, Murray Hill, NJ 07974 ([email protected]) Received May 19, 1994; accepted in revised form July 21, 1995