A parallel Buchberger algorithm for multigraded ideals. M. Vejdemo-Johansson, E. Sköldberg and J. Dusek

Similar documents
Monomial orderings, rewriting systems, and Gröbner bases for the commutator ideal of a free algebra

Journal of Algebra 226, (2000) doi: /jabr , available online at on. Artin Level Modules.

Multi-parameter persistent homology: applications and algorithms

On the minimal free resolution of a monomial ideal.

arxiv: v1 [math.ac] 8 Jun 2012

Parallel PIPS-SBB Multi-level parallelism for 2-stage SMIPS. Lluís-Miquel Munguia, Geoffrey M. Oxberry, Deepak Rajan, Yuji Shinano

Computing Minimal Polynomial of Matrices over Algebraic Extension Fields

The F 4 Algorithm. Dylan Peifer. 9 May Cornell University

POLYNOMIAL DIVISION AND GRÖBNER BASES. Samira Zeada

Groebner Bases and Applications

Lecture 1. (i,j) N 2 kx i y j, and this makes k[x, y]

Rigid monomial ideals

Polynomials, Ideals, and Gröbner Bases

Computing syzygies with Gröbner bases

Component-level Parallelization of Triangular Decompositions

Math 4370 Exam 1. Handed out March 9th 2010 Due March 18th 2010

MCS 563 Spring 2014 Analytic Symbolic Computation Monday 27 January. Gröbner bases

THE BUCHBERGER RESOLUTION ANDA OLTEANU AND VOLKMAR WELKER

MCS 563 Spring 2014 Analytic Symbolic Computation Monday 14 April. Binomial Ideals

Finiteness Issues on Differential Standard Bases

Groebner Bases, Toric Ideals and Integer Programming: An Application to Economics. Tan Tran Junior Major-Economics& Mathematics

Modular Algorithms for Computing Minimal Associated Primes and Radicals of Polynomial Ideals. Masayuki Noro. Toru Aoyama

Summer Project. August 10, 2001

Gröbner Bases for Noncommutative Polynomials

Lecture 6: Introducing Complexity

On Antichains in Product Posets

Solving Polynomial Systems Symbolically and in Parallel

LCM LATTICES SUPPORTING PURE RESOLUTIONS

An efficient reduction strategy for signature-based algorithms to compute Gröbner basis

A (short) survey on signature-based Gröbner Basis Algorithms

Oeding (Auburn) tensors of rank 5 December 15, / 24

1 xa 2. 2 xan n. + c 2 x α 2

Problem Set 1 Solutions

Polynomial multiplication and division using heap.

MCS 563 Spring 2014 Analytic Symbolic Computation Friday 31 January. Quotient Rings

Section Summary. Relations and Functions Properties of Relations. Combining Relations

S-Polynomials and Buchberger s Algorithm

Factoring Solution Sets of Polynomial Systems in Parallel

A variant of the F4 algorithm

A New Dominant Point-Based Parallel Algorithm for Multiple Longest Common Subsequence Problem

Sporadic and related groups. Lecture 15 Matrix representations of sporadic groups.

TIGHT CLOSURE IN NON EQUIDIMENSIONAL RINGS ANURAG K. SINGH

PREMUR Seminar Week 2 Discussions - Polynomial Division, Gröbner Bases, First Applications

Sparse Polynomial Multiplication and Division in Maple 14

Environment (Parallelizing Query Optimization)

arxiv: v1 [math.ac] 8 Jun 2010

Communication Complexity

Gröbner Bases. eliminating the leading term Buchberger s criterion and algorithm. construct wavelet filters

A Blackbox Polynomial System Solver on Parallel Shared Memory Computers

Graph structure in polynomial systems: chordal networks

WORKING WITH MULTIVARIATE POLYNOMIALS IN MAPLE

Dense Arithmetic over Finite Fields with CUMODP

A comparison of sequencing formulations in a constraint generation procedure for avionics scheduling

Graph structure in polynomial systems: chordal networks

The minimal components of the Mayr-Meyer ideals

Current Advances. Open Source Gröbner Basis Algorithms

Consistent Fixed Points and Negative Gain

4 Hilbert s Basis Theorem and Gröbner basis

THE ALGEBRAIC GEOMETRY DICTIONARY FOR BEGINNERS. Contents

The Hilbert functions which force the Weak Lefschetz Property

Cryptographic Hash Functions

Letterplace ideals and non-commutative Gröbner bases

Fast matrix algebra for dense matrices with rank-deficient off-diagonal blocks

Oil Fields and Hilbert Schemes

Algebraic Models in Different Fields

Universität Augsburg

MICROPROCESSOR REPORT. THE INSIDER S GUIDE TO MICROPROCESSOR HARDWARE

Compiling Knowledge into Decomposable Negation Normal Form

Compatibly split subvarieties of Hilb n (A 2 k)

and combine the results of the searches. We consider parallel search with subdivision, although most notions can be generalized to using dierent searc

Zero controllability in discrete-time structured systems

Lecture 6: Finite Fields

Gröbner Bases over a Dual Valuation Domain

An introduction to Hodge algebras

On the BMS Algorithm

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT

Analytical Modeling of Parallel Systems

Optimal quorum for a reliable Desktop grid

2/22/2017. Sept 20, 2013: Persistent homology.

Total Ordering on Subgroups and Cosets

48 CHAPTER 2. COMPUTATIONAL METHODS

Parallel Numerics. Scope: Revise standard numerical methods considering parallel computations!

GPU acceleration of Newton s method for large systems of polynomial equations in double double and quad double arithmetic

Determinant Formulas for Inhomogeneous Linear Differential, Difference and q-difference Equations

Stanford Encyclopedia of Philosophy

POTENTIAL PROBLEM DESCRIPTIONS

INITIAL COMPLEX ASSOCIATED TO A JET SCHEME OF A DETERMINANTAL VARIETY. the affine space of dimension k over F. By a variety in A k F

Algebraic Varieties. Notes by Mateusz Micha lek for the lecture on April 17, 2018, in the IMPRS Ringvorlesung Introduction to Nonlinear Algebra

A new parametrization for binary hidden Markov modes

Characterizations of indicator functions of fractional factorial designs

GRÖBNER BASES AND POLYNOMIAL EQUATIONS. 1. Introduction and preliminaries on Gróbner bases

Change of Ordering for Regular Chains in Positive Dimension

27 : Distributed Monte Carlo Markov Chain. 1 Recap of MCMC and Naive Parallel Gibbs Sampling

James J. Madden LSU, Baton Rouge. Dedication: To the memory of Paul Conrad.

Computation of the Minimal Associated Primes

AUTOMATIC CONTROL. Andrea M. Zanchettin, PhD Spring Semester, Introduction to Automatic Control & Linear systems (time domain)

Model Order Reduction via Matlab Parallel Computing Toolbox. Istanbul Technical University

SCHURRINGS: A PACKAGE FOR COMPUTING WITH SYMMETRIC FUNCTIONS

arxiv: v1 [math.ac] 14 Sep 2016

Some Algebraic and Combinatorial Properties of the Complete T -Partite Graphs

Transcription:

A parallel Buchberger algorithm for multigraded ideals M. Vejdemo-Johansson, E. Sköldberg and J. Dusek REPORT No. 30, 2010/2011, spring ISSN 1103-467X ISRN IML-R- -30-10/11- -SE+spring

A PARALLEL BUCHBERGER ALGORITHM FOR MULTIGRADED IDEALS arxiv:1105.5509v1 [math.ac] 27 May 2011 EMIL SKÖLDBERG, MIKAEL VEJDEMO-JOHANSSON, AND JASON DUSEK Abstract. We demonstrate a method to parallelize the computation of a Gröbner basis for a homogenous ideal in a multigraded polynomial ring. Our method uses anti-chains in the lattice N k to separate mutually independent S-polynomials for reduction. 1. Introduction In this paper we present a way of parallelizing the Buchberger algorithm for computing Gröbner bases in the special case of multihomogeneous ideals in the polynomial algebra over a field. We describe our algorithm as well as our implementation of it. We also present experimental results on the efficiency of our algorithm, using the ideal of commuting matrices as illustration. 1.1. Motivation. Most algorithms in commutative algebra and algebraic geometry at some stage involve computing a Gröbner basis for an ideal or module. This ubiquity together with the exponential complexity of the Buchberger algorithm for computing Gröbner bases of homogeneous ideals explains the large interest in improvements of the basic algorithm. 1.2. Prior Work. Several approaches have been tried in the literature. Some authors, such as Chakrabarti Yelick [1] and Vidal [2] have constructed general algorithms for distributed memory and shared memory machines respectively. Reasonable speedups were achieved on small numbers of processors. Another approach has been using factorization of polynomials; all generated S-polynomials are factorized on a master node, and the reductions of its factors are carried out on the slave nodes. Work by Siegl [3], Bradford [4], Gräbe and Lassner [5]. In a paper by Leykin [6] a coarse grained parallelism was studied that was implemented both in the commutative and non-commutative case. Good surveys of the various approaches can be found in papers by Mityunin and Pankratiev [7] and Amrhein, Bündgen and Küchlin [8]. Mityunin and Pankratiev also give a theoretical analysis of and improvements to algorithms known at that time. Finally, an approach by Reeves [9] parallelizes on the compiler level for modular coefficient fields. 1.3. Our approach. Our approach restricts the class of Gröbner bases treated to homogenous multigraded Gröbner bases. While certainly not general enough to handle all interesting cases, the multigraded case covers several interesting examples. For these ideals we describe a coarsely grained parallelization of the Buchberger algorithm with promising results. 1

2 EMIL SKÖLDBERG, MIKAEL VEJDEMO-JOHANSSON, AND JASON DUSEK Example 1.1. Set R = k[x 1,..., x n 2, y 1,..., y n 2] where k is a field. Let X and Y be square n n-matrices with entries the variables x 1,..., x n 2 and y 1,..., y n 2 respectively. Then the entries of the matrix I n = XY Y X form n 2 polynomials generating the ideal I n R. The computation of a Gröbner basis for I 1 and I 2 is trivial and may be carried out on a blackboard. A Gröbner basis for I 3 is a matter of a few minutes on most modern computer systems, and already the computation of a Gröbner basis for I 4 is expensive using the standard reverse lexicographic term order in R; the Macaulay2 system [10] several hours are needed to obtain a Gröbner basis with 563 elements. However, using clever product orders, Hreinsdóttir has been able to find bases with 293 and 51 elements [11, 12]. As far as we are aware of, a Gröbner basis for I 5 is not known. By assigning multidegrees (1, 0) to all the variables x 1,..., x n 2 and (0, 1) to all the variables y 1,..., y n 2, the ideal I n becomes multigraded over N N, and thus approachable with our methods. Example 1.2. While this paper presents only the approach to multigraded ideals in a polynomial ring, an extension to free multigraded modules over multigraded rings is easily envisioned, and will be dealt with in later work. Gröbner bases for such free modules would be instrumental in computing invariants from applied algebraic topology such as the rank invariant as well as more involved normal forms for higher dimensional persistence modules.[13] 2. Partially ordered monoids We shall recall some definitions and basic facts about partially ordered sets that will be of fundamental use in the remainder of this paper. A partially ordered set is a set equipped with a binary, reflective, symmetric and transitive order operation. Two objects a, b such that either a b or b a are called comparable, and two objects for which neither a b nor b a are called incomparable. A subset A of a partially ordered set in which all objects are mutually incomparable is called an antichain. An element p is minimal if there are no distinct q with q p, maximal if there are no distinct q with p q, smallest if all other q fulfill p q and largest if all other q fulfill q p. There is a partially ordered set structure on N d in which (a 1,..., a d ) (b 1,..., b d ) iff a i b i for all i. This structure is compatible with the monoid structure on N d in the sense that if ā b, then c ā c b for ā, b, c N d. If a monoid has a partial order compatible with the multiplication in this manner, we call it a partially ordered monoid. In a partially ordered set P, we say that a subset Q is an ideal if it is downward closed, or in other words if for any p P, q Q such that p q, then p Q. It is called a filter if it is upward closed, or if for p P, q Q such that q p, then p Q. An element p is maximal in an ideal if any element q such that p q is not a member of the ideal. Minimal elements of filters are defined equivalently. An ideal (filter) is generated by its maximal (minimal) elements in the sense that the membership condition of the ideal (filter) is equivalent to being larger than (smaller than) at least one generator. Generators of an ideal or filter form an antichain.

A PARALLEL BUCHBERGER ALGORITHM FOR MULTIGRADED IDEALS 3 Indeed, if these were not an antichain, two of them would be comparable, and then one of these two would not be maximal (minimal). An ideal (filter) is finitely generated if it has finitely many generators, and it is principal if it has exactly one generator. There is a partially ordered monoid structure on N d, given by (p 1,..., p d ) (q 1,..., q d ) if p i q i for all i, and by (p 1,..., p d ) (q 1,..., q d ) = (p 1 +q 1,..., p d +q d ). This structure will be the main partially ordered monoid in us in this paper. 3. Multigraded rings and the grading lattice A polynomial ring R = k[x 1,..., x r ] over a field k is said to be multigraded over P if each variable x j carries a degree x j P for some partially ordered monoid P. We expect of the partial order on P that if p, q P then p p q and q p q. The degree extends from variables to entire monomials by requiring mn = m n for monomials m, n; and from thence a multigrading of the entire ring R follows by decomposing R = p P R p where R p is the set of all homogenous polynomials in R of degree p, i.e. polynomials with all monomials of degree p. A homogenous polynomial of degree (n 1,..., n d ) is said to be of total degree n 1 + +n d. We note that for the N d -grading on R, the only monomial with degree (0, 0,..., 0) is 1, and thus the smallest degree is assigned both to the identity of the grading monoid and to the identity of the ring. We write lm p, lt p, lc p for the leading monomial, leading term and leading coefficient of p. Proposition 3.1. Suppose p and q are homogenous. If p q then lm p does not divide lm q. Proof. If lm p lm q then lm q = c lm p, and thus lm q = c lm p, and thus, since 1 c, by our requirement for a partially ordered monoid, lm p lm q. Proposition 3.2. Reduction in the Buchberger algorithm of a given multidegree for a homogenous generating set depends only on its principal ideal in the partial order of degrees. Proof. We recall that the reduction of a polynomial p with respect to polynomials q 1,..., q k is given by computing p = p gcd(lm p, lm q j) q j lm p for a polynomial q j such that lm q j lm p. We note that by Proposition 3.1, this implies lm q j lm p and thus q j p. We note that Proposition 3.2 implies that if two S-polynomials are incomparable to each other, then their reductions against a common generating set are completely independent of each other. Furthermore, since p = p, in the notation of the proof of Proposition 3.2, a reduction of an incomparable S-polynomial can never have an effect on the future reductions of any given S-polynomial. Hence, once S-polynomials have been generated, their actual reductions may be computed independently across antichains in the partial order of multidegrees, and each S-polynomial only has to be reduced against the part of the Gröbner basis that resides below it in degree.

4 EMIL SKÖLDBERG, MIKAEL VEJDEMO-JOHANSSON, AND JASON DUSEK 4. Algorithms The arguments from Section 3 lead us to an approach to parallelization in which we partition the S-polynomials generated by their degrees, pick out a minimal antichain, and generate one computational task for each degree in the antichain. One good source for minimal antichains, that is guaranteed to produce an antichain, though most often will produce more tasks than are actually populated by S-polynomials is to consider the minimal total degree for an unreduced S- polynomial, and produce as tasks the antichain of degrees with the same total degree. Another, very slightly more computationally intense method is to take all minimal occupied degrees. These, too, form an antichain by minimality, and are guaranteed to only yield as many tasks as have content. Either of these suggestions leads to a master-slave distributed algorithm as described in pseudocode in Algorithms 1 and 2. The resulting master node algorithm can be seen in Algorithm 1, and the simpler slave node algorithm in Algorithm 2. Algorithm 1 Master algorithm for a distributed Gröbner basis computation loop if have waiting degrees and waiting slaves then nextdeg pop(waiting degrees) nextslave pop(waiting slaves) send nextdeg to nextslave else if all slaves are working then wait for message from slave newslave push(newslave, waiting slaves) else if no waiting degrees and some working slaves then wait for message from slave newslave push(newslave, waiting slaves) else if no waiting degrees and no working slaves then generate new antichain of degrees if no such antichain available then finish up end if else continue end if end loop 5. Experiments We have implemented the master-slave system described in Section 4 in Sage [14], using MPI for Python [15, 16] for distributive computing infrastructure and SQLAlchemy [17] interfacing with a MySQL database [18] for an abstraction of a common storage for serialized python objects. In order to test our implementation, we have used a computational server running 8 Intel Xeon processors at 2.83 GHz, with a 5M cache, and a total RAM available of 16G.

A PARALLEL BUCHBERGER ALGORITHM FOR MULTIGRADED IDEALS 5 Algorithm 2 Slave algorithm for a distributed Gröbner basis computation loop receive message msg from master if msg = finish then return else if msg = new degree d then reduce all S-polynomials in degree d and append to Gröbner basis compute new S-polynomials based on new basis elements send finished degree to master end if end loop We have run test with the Gröbner basis problem I 3, and recorded total wallclock timings, as well as specific timings for the S-polynomial generation and reduction steps. The problem was run for each possible number of allocated core (1 to 7 slave processors), and the server was the entire time otherwise un-utilized. As can be seen in Figure 1, parallelization decreases the wall-clock timings radically compared to single-core execution (2 processors, with the slave processor doing all work essentially serially). However, the subsequent decrease in computational times is less dramatic. Looking into specific aspects of the computation, we can see that while the average computational times decrease radically with the number of available processors, the maximal computation time behaves much worse. With the reduction step, maximal computation times still decrease, mostly, with the number of available processors. The S-polynomial generation step however displays almost constant maximal generation times along the computation. Furthermore, compared to the time needed for the algebraic computations, the relatively slow, database engine mediated storage and recovery times are almost completely negligible. These trends are even more clear when we concentrate on only the maximal, minimal and average computation times, as in Figure 2. We see a proportional decrease in average computation times, and a radical drop-off in minimal computation times, which certainly sounds promising. The global behaviour, however, is dictated by the maximal thread execution times, which are rather disappointingly behaving throughout. 6. Conclusions and Future Work In conclusion, we have demonstrated that while the parallel computation of Gröbner bases in general is a problem haunted by the ghost of data dependency, the lattice structure in an appropriate choice of multigrading will allow for easy control of dependencies. Specifically, picking out antichains in the multigrading lattice gives a demonstrable parallelizability, that saturates the kind of computing equipment that is easily accessible by researchers of today. Furthermore, we have developed our methods publically accessible, 1 and released it under the very liberal BSD license. Hence, with the ease of access to our code 1 http://code.google.com/p/dph-mg-grobner, the code used for Section 5 can be found in the sage subdirectory

6 EMIL SKÖLDBERG, MIKAEL VEJDEMO-JOHANSSON, AND JASON DUSEK 340 320 300 280 260 240 220 200 250 200 150 100 50 0 14 10 12 6 8 0 2 4 60 50 40 30 20 10 0 Figure 1. Timings (seconds) for I 3 on an 8-core computational server. Timing runs were made with between 2 and 8 active processors, and the total wallclock times (top left), SQL interaction times (top right, the S-polynomial reduction times (bottom left), and the S-polynomial generation times (bottom right) were measured. and to the Sage computing system, we try to set the barrier to build further on our work as low as we possibly can. However, the techniques we have developed here are somewhat sensitive to the distribution of workload over the grading lattice: if certain degrees are disproportionately densely populated, then the computational burden of an entire Gröbner basis is dictated by the essentially serial computation of the highly populated degrees. As such, we suspect these methods to work at their very best in combination with other parallelization techniques. The Gröbner basis implementation used was a rather naïve one, and we fully expect speed-ups from sophisticated algorithms to combine cleanly with the constructions we use. This is something we expect to examine in future continuation of this project. There are many places to go from here. We are ourselves interested in investigating many avenues for the further application of the basic ideas presented here:

A PARALLEL BUCHBERGER ALGORITHM FOR MULTIGRADED IDEALS 7 10 2 10 1 10 0 10 1 10 0 10-1 10-2 10-3 10-4 Figure 2. Logarithms of maximal, minimal and average timings (seconds) for reduction (left) and generation (right) in the I 3 computations. Adaptation to state-of-the-art Gröbner basis techniques for single processors. Improve the handling of each separate degree, potentially subdividing work even finer. Multigraded free modules, and Gröbner bases of these; opening up for the use of these methods in computational and applied topology, as a computational back bone for multigraded persistence. Multigraded free resolutions; opening up for the application of these methods in parallelizing computations in homological algebra. Adaptation to non-commutative cases; in particular to use for ideals in and modules over quiver algebras. Building on work by Dotsenko and Khoroshkin, and by Dotsenko and Vejdemo-Johansson, there is scope to apply this parallelization to the computation of Gröbner bases for operads. [19, 20] References [1] Chakrabarti, S., Yelick, K.: Implementing an irregular application on a distributed memory multiprocessor. In: PPOPP 93: Proceedings of the fourth ACM SIGPLAN symposium on Principles and practice of parallel programming, New York, NY, USA, ACM (1993) 169 178 [2] Vidal, J.P.: The computation of gröbner bases on a shared memory multiprocessor. In: DISCO 90: Proceedings of the International Symposium on Design and Implementation of Symbolic Computation Systems, London, UK, Springer-Verlag (1990) 81 90 [3] Siegl, K.: A parallel factorization tree Gröbner basis algorithm. In: Proceedings of PASCO 94. (1994) [4] Bradford, R.: A parallelization of the buchberger algorithm. In: ISSAC 90: Proceedings of the international symposium on Symbolic and algebraic computation, New York, NY, USA, ACM (1990) 296 [5] Gräbe, H.G., Lassner, W.: A parallel Gröbner factorizer. In: Proceedings of PASCO 94. (1994) [6] Leykin, A.: On parallel computation of Gröbner bases. In: Parallel Processing Workshops, International Conference on. Volume 0., Los Alamitos, CA, USA, IEEE Computer Society (2004) 160 164 [7] Mityunin, V.A., Pankrat ev, E.V.: Parallel algorithms for the construction of Gröbner bases. Sovrem. Mat. Prilozh. (30, Algebra) (2005) 46 64

8 EMIL SKÖLDBERG, MIKAEL VEJDEMO-JOHANSSON, AND JASON DUSEK [8] Amrhein, B., Bündgen, R., Küchlin, W.: Parallel completion techniques. In: Symbolic rewriting techniques (Ascona, 1995). Volume 15 of Progr. Comput. Sci. Appl. Logic. Birkhäuser, Basel (1998) 1 34 [9] Reeves, A.A.: A parallel implementation of Buchberger s algorithm over Z p for p 31991. J. Symbolic Comput. 26(2) (1998) 229 244 [10] Grayson, D.R., Stillman, M.E.: Macaulay2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/macaulay2/ [11] Hreinsdóttir, F.: A case where choosing a product order makes the calculations of a Groebner basis much faster. J. Symbolic Comput. 18(4) (1994) 373 378 [12] Hreinsdóttir, F.: An improved term ordering for the ideal of commuting matrices. J. Symbolic Comput. 41(9) (2006) 999 1003 [13] Carlsson, G., Singh, G., Zomorodian, A.: Computing multidimensional persistence. In Dong, Y., Du, D.Z., Ibarra, O.H., eds.: ISAAC. Volume 5878 of Lecture Notes in Computer Science., Springer (2009) 730 739 [14] Stein, W.: Sage: Open Source Mathematical Software (Version 4.3.5). The Sage Group. (2010) http://www.sagemath.org. [15] Dalcín, L., Paz, R., Storti, M.: MPI for Python. J. Parallel Distrib. Comput. 65(9) (2005) 1108 1115 [16] Dalcín, L., Paz, R., Storti, M., D Elía, J.: MPI for Python: Performance improvements and MPI-2 extensions. J. Parallel Distrib. Comput. 68(5) (2008) 655 662 [17] Bayer, M.: SQLAlchemy. http://www.sqlalchemy.org/ [18] Oracle: MySQL. http://mysql.com/ [19] Dotsenko, V., Khoroshkin, A.: Gröbner bases for operads. To appear, Duke Math. Journal (2008) [20] Dotsenko, V., Vejdemo-Johansson, M.: Implementing Gröbner bases for operads. To appear, Séminaires et Congrès (2009)