gröbner bases

16
GENERAL ] ARTICLE GrSbner Bases A Useful Tool in Algebra Arnab Chakraborty A common puzzle found in many elementary puzzle books asks the reader to pour out some specified amount of milk using two (or more) containers of fixed volumes. For in- stance, a typical version may read as follows. Example 1 In a dairy shop there is a huge container hold- ing milk, and only two jugs of 3 litre and 5 litre capacities. However, these are not graduated. When a customer comes with a container (of an unknown volume) to take 4 litres of milk, the salesman is at a loss as to how he can give 4 litres of milk using only those two jugs. Can you help the distressed salesman? [] I do not think that you will take much time to help the poor salesman, who is obviously not too bright at mathematics. The simple observation that 4 may be written as 2x 5-2x 3 is enough to suggest that the salesman should pour 2 jugfuls of the bigger jug, and then take away 2 jugfuls of the other one. All this is pretty simple once we know that 4 = 2 x 5 - 2 x 3. But how do you come to know of this in the first place? Mere inspection may not be enough, as one finds in the next example. Example 2 Suppose you are given two jugs. They have volumes 4 litres, 6 litres. Suggest a method for giving 5 litres of milk to a customer. [] Arnab Chakraborty did his BStat (Hons.) and MStat degrees from the Indian Statistical Institute (Calcutta). He is now a PhD student in the Department of Statistics at Stanford University, California. His research interest lies in areas of statistics and computational algebra. Apart from that he is also interested in playing the piano and wishes he could really play well. To solve this observe that you have only the following 'moves' in yore' arsenah (Here .]4 denotes the 4 litre jug, while ./6 stands for the other one.) 1. ,74 t o ,/6 2..]6 to ,I4 RESONANCE I January 2000 29

Upload: arnab-chakraborty

Post on 10-Jul-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Gröbner bases

GENERAL ] ARTICLE

GrSbner Bases A Useful Tool in Algebra

Arnab Chakraborty

A common puzzle found in many elementary puzzle books asks the reader to pour out some specified amount of milk using two (or more) containers of fixed volumes. For in-

stance, a typical version may read as follows.

E x a m p l e 1 In a dairy shop there is a huge container hold- ing milk, and only two jugs of 3 litre and 5 litre capacities. However, these are not graduated. When a customer comes with a container (of an unknown volume) to take 4 litres of milk, the salesman is at a loss as to how he can give 4

litres of milk using only those two jugs. Can you help the

distressed salesman? []

I do not think that you will take much time to help the poor salesman, who is obviously not too bright at mathematics. The simple observation that 4 may be writ ten as 2x 5 - 2 x 3 is enough to suggest tha t the salesman should pour 2 jugfuls of the bigger jug, and then take away 2 jugfuls of the other one. All this is pretty simple once we know that 4 = 2 x 5 - 2 x 3. But how do you come to know of this in the first place? Mere inspection may not be enough, as one finds in the next

example.

E x a m p l e 2 Suppose you are given two jugs. They have volumes 4 litres, 6 litres. Suggest a method for giving 5 litres

of milk to a customer. []

Arnab Chakraborty did

his BStat (Hons.) and

MStat degrees from the

Indian Statist ical

Institute (Calcutta). He

is now a PhD student in

the Department of

Stat is t ics at Stanford

University, California.

His research interest l ies

in areas of stat ist ics and

computational algebra.

Apart from that he is

also interested in playing

the piano and wishes he could really play well.

To solve this observe that you have only the following 'moves' in yore' arsenah (Here .]4 denotes the 4 litre jug, while ./6

stands for the other one.)

1. ,74 to ,/6

2 . . ] 6 to ,I4

RESONANCE I January 2000 29

Page 2: Gröbner bases

GENERAL J ARTICLE

3 . . ] 4 to c u s t o m e r

4 . .16 to c u s t o m e r

5. Source to .14

6. Source to .16

Bu t the jugs not being g radua ted , you can never p e r fo rm

any of the above moves halfway - you have to e i ther fill

up the con ta ine r into which you are pour ing, or you have

to comple te ly e m p t y the one f rom which you are pour ing.

And this implies tha t wha tever s t r a t eg y you choose, at any

stage the a m o u n t of milk in any of the conta iners mus t be

of the form 6n + 4m, where m and n can be any integers,

posit ive, negat ive , or zero. This is because, the jugs be ing

u n g r a d u a t e d , you have to move in s teps of 6 or 4 only.

Thus example 2 canno t be solved, since any number of the

form 6n + 4m has to be even, while 5 is an odd number .

Our analysis has, nevertheless , led a very useful corollary.

We s ta t e this resul t as a general fact below.

F A C T : Suppose we have k u n g r a d u a t e d jugs of volumes

V1, V2 , . . . , Vk litres. We assume th a t all the V~:'s are integers.

T h e n the only volumes of milk t h a t we can measure out to a cus tomer are of the form

nlV1 + n2V2 + . . . + nkVk,

where each n~ is an integer (posit ive, negative, or zero).

Do not wor ry if you find tha t , for some choices of n l , �9 �9 �9 n~,

the vo lume tu rns out to be negat ive. Giving a negat ive

vo lume of milk to the cus tomer s imply means taking t h a t

a m o u n t of milk f r o m him.

We shall call these measurab le volumes of milk as ideal vol-

ames, and refer to the set of such volumes as an ideal. Th u s

each set of jugs gives rise to one ideal of measurab le vol-

umes. Before p roceed ing fur ther , you will do well to ac-

quaint yourse l f b e t t e r wi th this new concept of ideals. A n d

this is precisely wha t the following exercise will help you to do.

30 RESONANCE J January 2000

Page 3: Gröbner bases

GENERAL J ARTICLE

E x e r c i s e : Let Z deno te an ideal (for some set of jugs).

Suppose tha t v and w are two members of I . Do you th ink

t ha t v - w and v + .w are also in 27? W h a t abo u t 53v ?

W h a t we have done above is to observe t ha t all the volumes

of milk tha t one can possibly measure using a given set of

jugs are of a special s t ruc tu re , and we have called thei r set

an ideal. So, given an integer vo lume V, we want to know

w h e t h e r it is a m e m b e r of our ideal or not . If it is, then V

mus t be of the form

V = n l V 1 + " " + n k V k .

If we can know the n i ' s we at once know how to measure

vo lume V using jugs of volumes V1 , . . . , Vk.

More t h a n two t h o u s a n d years ago, this p rob lem was solved

by a famous Greek m a t h e m a t i c i a n called Euclid. He m ad e

the following simple, ye t bri l l iant, observat ion , which we

present in m o d e r n terminology.

E u c l i d ' s O b s e r v a t i o n : If :Z- is the ideal ob ta ined for jugs

of volumes V 1 , . . . , Vk, t hen an integer vo lume V of milk is

in 5[ if and only if the gcd of V1 , . . . , Vk divides V.

If you want to see how Eucl id proved this observa t ion s imply

not ice tha t any in teger of the form n l V 1 -t- . . . + n k V k must

be divisible by the gcd of Vi's. Conversely, we claim tha t the

gcd of V i ' s is i tself of the form n l V 1 + " " + ' n k V k for some

integers n l , �9 �9 �9 nk. P rov ing this is s imple if you r e m e m b e r

the long-division-like p rocedu re of compu t ing the gcd of two

numbers .

Well, coming back to our puzzle, we observe tha t we have

got a comple te so lu t ion to it. We present it below.

S t e p 1: C o m p u t e the gcd (G, say) of the volumes V1, �9 �9 �9 Vk.

Express G as

G = n l V 1 + " " + nkVk ,

for sui table integers 'hi.

S t e p 2: Check w h e t h e r the desired vo lume(V,say ) is di-

visible by this gcd. If not, then you canno t measure

this volume. Otherwise , you can measu re it.

RESONANCE I January 2000 31

Page 4: Gröbner bases

GENERAL I ARTICLE

Now, so far in our puzzle we have been talking about volumes

of milk. However, even a layman can see that all that we have done actually works for any integer-valued quanti ty - irrespective of any physical interpretation that we may at tach to it. Now, mathematicians go one step further. They are the sort of people who are always t rying to stretch things as far as they can. Their motto seems to be 'If you have a key tha t fits one lock, then try it on another lock too'. Thus, when the mathematicians saw that replacing 'volume' by 'any integer-valued quanti ty ' did not change the essence of the puzzle, they at once tried to replace the 'integers' as well - just to see what happens! And something remarkable did happen, as we shall presently see.

The very first thing that they tried their hands on were poly- nomials. Now, to understand what they did you must recall tha t a polynomial is an expression of the form ao + a l x +

�9 .. + a n z ' , w h e r e the ai's are any numbers. For instance, 3.5 - :c + 1000.45x 2 is a polynomial. You may be wonder- ing why the mathematicians chose p o l y n o m i a l s in place of integers. Well, their answer was 'Polynomials behave like

integers'. They do have a point here, no doubt. After all, polynomials can be added just like integers and, just like integers, they can be multiplied as well. More specifically, all the following properties are true for both integers and polynomials.

C o m m o n P r o p e r t i e s o f I n t e g e r s a n d P o l y n o m i a l s :

If a, b, c are either all integers or all polynomials, then

1. ( a + b ) + c = a + ( b + c ) , ( ab )c=a(bc )

2. a + b = b + a

3. a(b + c) = ab + ac

4. l • O + a = a

5. ab = ba

Clearly, if you note that the usual long division like algo- r i thm (by the way, it is called Euclid's algorithm) for finding

32 RESONANCE I January 2000

Page 5: Gröbner bases

GENERAL I ARTICLE

gcd of integers may be directly adapted for polynomials, you can understand why our earlier algorithm works for polyno- mials also. Thus, given polynomials f l , . . . , fk we define the ideal generated by them as the set I d e a l ( f l , . . . , f k ) of all polynomials of the form

g l f l + g2f2 + "'" + gkfk,

where the g~'s are any polynomials. Our problem is to check whether some given polynomial f is in this ideal or not. Applying Euclid's algorithm we first compute the gcd, say h, of the fi 's , and then check whether h divides f or not.

Now, once they saw that the method worked for polynomi- als, the mathematicians went one step further. They tried to work with polynomials in two variables (.z and y, say). As you might have guessed already, these are objects like 1.3 + :r - 45x12y 3. If we call an expression like axmy n (a is

any nonzero number, m and n are nonnegative integers) a monomial then a polynomial in two variables is a sum 1 of monomials. Henceforth, we shall refer to polynomials in two

variables as 2-polynomials.

Suppose that from the space of all such 2-polynomials, we pick up k of them, f l , - . -, fk- As usual, their ideal is the set of all 2-polynomials of the form

Since a may be negative, dif-

ference is also included.

g l f l + ' ' ' + g k f k ,

where the gi's are any 2-polynomials. Our problem is to check whether some given 2-polynomial f is in this ideal or

not.

And now comes the fix. Euclid's algorithm fails to be of any direct help here as the following example shows.

E x a m p l e 3 Suppose k ----- 2, and f l , f 2 are just x and y, respectively, and let us take f = x. If you want to fol- low Euclid's precept, you first try to compute the gcd of f l and f2. But what do you mean by gcd here? The great- est common factor? You cannot measure 'greatness' for 2- polynomials. For ordinary polynomials we have the concept of degree, and can say that a polynomial with higher degree

RESONANCE I January 2000

Page 6: Gröbner bases

GENERAL J ARTICLE

2 This ordering is called lhe

lexicographic ordering in lhe

lileralure.

is a 'greater ' polynomial. But not so in presence of two vari- ables. Which is greater, x2y +y3 or y2x +x3 . 7 So we have to

define gcd here in a different way. We factor both f l and f2 and bunch up as many common factors as possible to define gcd of f l and f2. In our case the only common factor is 1. So gcd(f l , f2) = 1. Obviously the Euclidean idea fails here, since this gcd itself lies outside the ideal set. []

The moral is tha t the use of gcd that we made for polyno- mials in one variable cannot be made for 2-polynomials. So we cannot possibly hope to check membership in an ideal simply by checking divisibility by some suitably chosen 2- polynomial as in the case of polynomials with a single vari- able. So what do we do?

We recall tha t the method for finding gcd was like a long di- vision. Can we at least do long division with 2-polynomials? The answer is yes. First, we introduce an ordering among monomials. Given two monomials axmy n and bxPy q, we shall say tha t the first one is 'bigger' (written as axmy n ~.- b.~:Py q) if m > p, or if m = p and n > q. Note that the constants a, b (positive or negative) do not mat ter in this ordering 2

Exe rc i se : Which is bigger, 100x3y or 2x2yl~176 Which is the bigger monomial in the 2-polynomial 10x3y -- x4?

The biggest monomial in a 2-polynomial, f , will be called its head monomial denoted by HM(f) . Now we shall see how to perform long division with 2-polynomials.

The long division algorithm for 2-polynomials is quite simi- lar to tha t for polynomials in one variable. It is a stepwise procedure. At each step we subtract some suitable multi- ple of the divisor from the dividend, such that during the subtraction some term is completely knocked off from the dividend. The result of this subtraction serves as the divi- dend for the next step. When we cannot do this anymore we declare the final dividend as the remainder. The details are provided in the pseudo-code below.

L o n g d i v i s i o n a l g o r i t h m for 2 - p o l y n o m i a l s : Dividing

34 RESONANCE J January 2000

Page 7: Gröbner bases

GENERAL J ARTICLE

f by g:

L e t # = H M ( g )

L e t D i v i s o r = 9

L e t D i v i d e n d = f

L e t Q u o t i e n t = 0 W h i l e there is some monomial in D i v i d e n d (divisible) by p do

L e t ~, = a monomial in D i v i d e n d such that # divides ~..

L e t m = /~/#. A d d m to Quot i en t . R e p l a c e D i v i d e n d b y D i v i d e n d - r e (Div i sor ) .

E n d w h i l e L e t R e m a i n d e r = D i v i d e n d .

Figure 1 shows one implementation of the above algorithm.

This suggests one method of checking membership in an ideal. Why not divide f by all the fi 's simultaneously? This may be done as follows. At each step we choose some f i , and carry out one step of long division using this fi as the divisor. At the next step we divide the remainder by some f j , and so on. We stop when we cannot do any more such divisions, and call the remainder at that last s tep the remainder of the overall process. To distinguish this process from the usual long division we shall henceforth call it a polynomial

reduction.

x+y

xy+ l ) x2y+xY 2+x

x2y + x

x y 2

xy ~+y

-y

~ x(xy+ I) )

( ),ix),.,- I ) )

RESONANCE J January 2000

Figure 1. Long division of f =x 2 y+ x y z + x b y g = x y + 1.

35

Page 8: Gröbner bases

GENERAL I ARTICLE

It is clear that if the remainder vanishes, then f is in the ideal generated by the f~'s. It may also seem natural that the remainder must vanish when f is in the ideal generated by the f~'s. But, unfortunately, two problems prevent this from being so.

P r o b l e m 1: Depending on the choices of the f~:'s at each step, the remainder may change.

P r o b l e m 2: Even if f is in the ideal, and even if you are determined to consider all the possible choices of ]~'s at each step, you may still not obtain zero as a remainder.

E x a m p l e 4 Let k = 2, f l = x y , f2 = x y + l . Then if we apply polynomial reduction to f = xy , we get remainder 0 if we use f l as divisor; however, we get remainder - 1 if we use f2 as divisor. Now try dividing f -- 1. Clearly, the remainder is 1 itself. But 1 (= f2 - f l ) is in I d e a l ( f 1 , f2). []

So here is a pret ty fix. However, notice that the si tuation does not preclude the existence of s o m e choice of the f i ' s for which neither of the problems is present, but which gener- ate the same ideal. If f~'s const i tute one such choice, then obviously membership in the ideal may be easily checked by polynomial reduction as for polynomials with a single variable. In this case we shall call this nice set { f l , . . . , fk} a G r 6 b n e r basis of the ideal. Too vague? Well, here is a rigorous version of the definition.

D e f i n i t i o n : Given an ideal 5[ of 2-polynomials, we shall call a f in i t e set { f l , . . . , f k } a G r S b n e r basis of I (with respect to lexicographic order) if

1. { f l , . . . , f k } generates I ,

2. for any 2-polynomial f , if we do long division of / by the f~'s then the remainder is unique (irrespective of which f~ was used in which step),

3. if, further, f c I , then this unique remainder must be zero.

36 RESONANCE J January 2000

Page 9: Gröbner bases

GENERAL J ARTICLE

But before t ry ing to find one such basis, let us look at a dia-

g r a m m a t i c r ep re sen t a t i on of po lynomia l reduct ion . Suppose

t h a t at some step we are going to divide g ( which is possibly

the r ema inde r f rom the preceding step). So we choose some

f~ such t ha t H M ( f i ) divides some monomia l in g, say,

m • HM(f~) = some monomia l in g,

where 7n is some monomia l . T h e n the s tep consists of sub-

t r ac t i ng rn/~: f rom g, leaving remainder g - mf~:, which serves

as the d iv idend at t he nex t step.

We shall represent the above by drawing an arrow from g to

g - mf~. In o the r words, an arrow from some 2-polynomia l

g to some 2-po lynomia l h implies t ha t if at some step dur ing

po lynomia l r educ t ion by f l , �9 �9 fk the 2 -po lynomia l g comes

as the dividend, t hen at the next s tep a possible cand ida te

for the d iv idend is h. Of course, at some step more t han one

f~ m a y be eligible as a divisor. In such a case, more t h a n one

ar row emana te s f rom g, each arrow cor respond ing to some

choice of the divisor. Next , imagine all the 2-polynomials

wr i t t en down on a huge piece of paper . If we now draw

all t he possible arrows we shall get an ar row-diagram, A

portion of such a d i ag ram is shown in Figure 2.

T h e following observa t ions are now in order .

O b s e r v a t i o n s :

1. T h e d iagram depends on the set f l , . . . , fk. I f ' you en- large the set, more arrows will appear .

RESONANCE J January 2000

Figure 2. Each arrow rep- resents one step of polyno. mial reduction. Here k=2, and fl = xy, f2 = xy+l .

Page 10: Gröbner bases

GENERAL J ARTICLE

3 This may not seem obvious at

first sight. However, its proof is not important for this article.

38

2. From some polynomials, no arrows come out. We shall

call them dead ends. In the course of a polynomial

reduction, once you come across such a polynomial

you have to declare that as your remainder. Observe

that at each step during the reduction we are knocking

off one monomial from the dividend. Also, the new

monomials tha t enter into the dividend during the step

are all 'less than ' the knocked off monomial. Since

there are only finitely many monomials 'less than ' any

given monomial (check!), the reduction process must

stop after some step. Tha t is, we must come to a dead end.

3. Start from any polynomial f , go on following the ar-

rows until you come to some dead end h. Then your

path represents one implementat ion of the polynomial

reduction of f by f l , . . . , fk leaving remainder h. We

shall denote such a path (along consecutive arrows)

f r o m f t o h a s f ~* h.

4. If f ~ 0 , then for any 2-polynomial g we must have

g f - - O .

5. Suppose f is in I d e a l ( f 1 , . . . , fk). Then there is a chain

of arrows from f to 0, but possibly not all the arrows

are correct ly aligned 3. We shall denote this by f ~ 0.

Next, we present a result which shows th.at actually the two

problems ment ioned above are not two distinct problems. If

we can solve the first of them then the other one solves itself.

R e s u l t : Suppose that the 2-polynomials gl, �9 �9 �9 ,gk are cho-

sen in such a way tha t for any 2-polynomial f the remainder

upon polynomial reduction by .q~:'s is unique. Then for any

f in Ide~al(gl , . . . , gk) this unique remainder must be zero.

Proof: Since f is in the ideal, by the last observation above,

f ~ 0 .

Now we claim tha t whenever two 2-polynomials f and g are

such that f ~ g we always have some 2-polynomial h such

that

f - - h ,

RESONANCE [ January 2000

Page 11: Gröbner bases

GENERAL I ARTICLE

and

g - ~ tl,.

I f we can jus t i fy th is c la im then the resu l t follows immedi -

a te ly (how?).

To jus t i fy the c la im we use induct ion on l, the n u m b e r of

a r rows in the - - p a t h be tween f and g. I f l = 0, then f = g,

and so h, = f is one choice for h,. Suppose now t h a t we have

p roved the resul t for l = n, for some ,,, > 0. We shall p rove

it for l = n + 1, as well,

In F i g u r e 3 the zigzag ar rows denote ~he - - p a t h be tween

f and g. I t is of l eng th ,n, + 1. Let r be the 2 -po lynomia l

jus t before g on this pa th . T h e n there is a p a t h of length ,n,

be tween f and r . Hence , by out" a s s u m p t i o n , there is some

2 -po lynomia l (~ such t h a t

f - o c~, a n d r - - ~ c~.

Now app ly p o l y n o m i a l r educ t ion to g. Th i s takes you up

a ,pa th a long consecu t ive arrows unt i l you come to some

dead end (//, say, which is your r ema inde r ) . A s s u m e t h a t

7- ~ g, as shown in the figure. T h e n you have two p a t h s

(along consecut ive a r rows) s t a r t i ng f rom T - one t e r m i n a t e s

at c~, and the o the r at /~. In view of obse rva t ion 3 above,

this means t h a t you have two p o l y n o m i a l r educ t ions of ~-,

one leaving r e m a i n d e r (~, the o the r /3 . Due to the a s sumed

uniqueness of r e m a i n d e r s we mus t have c~ = /7, jus t i fy ing

RESONANCE J January 2000

Figure 3. Here actually

a = f l , since both are re-

mainders of r.

39

Page 12: Gröbner bases

GENERAL I ARTICLE

Figure 4. a) Non-combining branches. Here g, h do not lead to the same destina- tion. b) Recombining branches.

4 0

the claim for the case when ~- ~ g. If g ~ ~- then the proof is obvious from the diagram once you reverse the direction of the arrow between T and g. Simply go from g to a via 7-. []

If you have understood the above argument then you may similarly try to prove the following result which we shall need later.

R e s u l t : If f and g are 2-polynomials such that f - g - - 0, then there must exist a 2-polyriomial h such that

f - - h a n d g ~ h.

So our aim now is to get hold of gi's such that

(i) I d e a l ( g l , . . . , g l ) = I d e a l ( f l , . . . , / k )

(ii) the g~'s satisfy the condition of the above result.

If gi's meet these conditions, then by the above result they must consti tute a GrSbner basis. Note that in this case the arrow-diagram for the g~'s has the following property:

Start from any point in the diagram, follow whichever path you like (along the arrows) until you come to a dead-end; you will find tha t you always come to the same dead-end irrespective of the path you have followed.

How can you get an arrow-diagram with this property? Of course, if the diagram has no branching at all, then the condition holds trivially. But, even if branching occurs, the property may still hold good, as we shall see below.

Consider the two branchings shown in Figure 4 .

In case (b) the branches have eventually recombined. Thus, both the branches eventually lead to the same destination. Clearly such a branching poses no problem. But in the other case the branches terminate as separa te branches. Here the two branches lead to different dead-ends, a situation which

RESONANCE J January 2000

Page 13: Gröbner bases

GENERAL I ARTICLE

we wish to avoid. If only we could gua ran tee (by choosing

the g,:'s appropr i a t e ly ) t ha t this la t te r t ype of b ranch ing is

not present in the a r row-diagram, then we have achieved our

a im of ob ta in ing a GrSbne r basis.

Le t us take a closer look at the mechan i sm of branching. In

the b ranch ing shown in Figure 5 two branches rad ia te f rom

a root f .

F r o m the very def ini t ion of the arrows , we see t ha t f --, f l

means t ha t there is some divisor .ql, say, and some monomia l

m l such tha t

m l I - I M ( g l ) = some monomia l in f ,

and

f l = f - ml.ql.

Figure 5. A close look at branching.

Similarly, for the o the r b ranch we have some divisor (g2,

say) and monomia l m 2 such t ha t

m 2 H M ( g 2 ) = some monomia l in f ,

and

f2 = f -- m2.q2.

By an earlier resul t we know tha t one suff icient condi t ion

for the branches to recombine is t ha t

I1 - / 2 - - 0.

i.e.,

m 2 g 2 - - 'm, l g l - -* O.

Now, if H M ( m l g l ) >- H M ( m 2 g 2 ) , t hen sub t r ac t - m l g l

f r o m m , 2 g 2 - - 'm, l g l , a n d t h e n s u b t r a c t m 2 g 2 t o a r r i v e a t re-

m a i n d e r zero. Similar ly you may reduce m 2 g 2 - m l g l to zero if H M ( m 2 g 2 ) ~- H M ( m l g O . So in e i ther of these cases the

b ranches do recombine.

Thus , we have na r rowed down the source of non-un ique re-

ma inde r s to those b ranches for which

H M ( m l g l ) = H M (m2.q2).

Hence, if we choose g l , - . . , gl such tha t

RESONANCE I January 2000

Page 14: Gröbner bases

GENERAL I ARTICLE

(i) I d e a l ( g l , . . . , g t ) = I d e a l ( f 1 , . . . , fk) ,

(ii) wheneve r for any two monomia l s m l , m2 we have

H M ( m l g l ) = H M (m2g2), we must also have m 2 9 2 - $

m l g l --+ O.

t hen {g l , . . �9 ,gl} is a Grhbner basis of our ideal.

E x e r c i s e : Let HM(g~) = aixPZy qi, for i = 1, 2. Let p =

Max{p l , p2} and q = MaX{ql, q2}. Define the m o n o m ia l 7n as xPy q. Suppose tha t m l , m2 are two monomia ls such t h a t

H M (m l.ql) = H M (rn2g2). Show th a t

1. H M ( m l g l ) is divisible by m,

2. if we pu t #~: = l x P - P i y q - q i , for i = 1,2, then m l g l - ai

m.2g2 is divisible by p, lgl - p.2g2.

4 In the lileralure this resull is known os Buchberger's crife- r/on.

To keep the no ta t ions simple we shall call P, lg l -p ,292 def ined

above as trouble (gl, g2). F rom the above exercise, and an

earl ier result , we immedia te ly get the following i m p o r t a n t resul t 4

R e s u l t : Le t f l , . . . , fk be any set of 2-polynomials . Le t

g l , . . . , gl be 2-polynomials chosen such tha t

(i) I d e a l ( f l , . . . , y k ) = I d e a l ( g l , . . . , g l ) ,

(ii) for all i , j = 1 , . . . , l we have trouble(gi, gj) - 5 0 .

T h e n gl , - . . , .ql is a Grhbner basis of I d e a l ( f l , . . . , fk) .

T h e resul t gives us a suff icient condi t ion for gi's to be a

Grhbne r basis of I d e a l ( f l , . . . , fk) . But appa ren t ly it does

not tell us w h e t h e r for given f i ' s such g~:'s exist or not , and

even if t hey exist , it does not seem to tell us how to find

them. However , a careful second look at the result yields the

following s imple a lgor i thm due to Buchberge r to c o m p u t e a

Grhbne r basis. T h e m e t h o d s ta r t s by checking whe the r the

set { f l , . . . , fk} itself is a G rh b n e r basis or not. To this

end it picks some pair {i, j} , and computes trouble(f,:, f j ) . T h e n po lynomia l reduc t ion is appl ied to it wi th divisor set

42

A

RESONANCE J January 2000

Page 15: Gröbner bases

GENERAL I ARTICLE

{ f l , . . . , fk} to see if we get remainder zero. If so, then the pair poses no problem; otherwise, if we get a non-zero remainder (It,, say) then we conclude tha t { f l , . . . , fk} is not a Gr6bner basis, but that { f l , . . . , fk, h,} may be one. So we apply the above method afresh to this latter set, and so on.

When the process terminates, we obviously end up with a GrSbner basis. A somewhat nontrivial argument (omitted here) shows that the process always terminates after a finite number of steps.

B u c h b e r g e r ' s Algorithm:

I n p u t : 2-polynomials f l , . . . , fk.

O u t p u t : 2-polynomials g l , . . . ,gl consti tuting a Gr5bner

basis for Ideal { f l , . . . , fk}.

N o t a t i o n : For any finite set A, let ~D(A) denote the set of

all pairs of distinct elements of A.

M e t h o d :

L e t G - - { f l , . . . , f k } . L e t B -- :D(G). W h i l e B is nonempty do

Pick some pair {f, h} from B. Remove the pair from B. L e t .q = trouble(f, h). Apply polynomial reduction to g with divisor set G. L e t h = remainder from this polynomial reduction.

I f h r 0 t h e n Insert h into G. Le t B ---- :D(G).

Endif E n d w h i l e

The elements of G are now the required gl, �9 �9 �9 gl.

Finally let us take stock of what we have achieved so far.

We have defined ideals for integers, polynomials in a sin-

gle variable, and lastly, for 2-polynomials. The puzzle that

we posed initially involved checking membership in an ideal

for the integer case. We saw that Euclid's method pro-

RESONANCE I January 2000 4 3

Page 16: Gröbner bases

GENERAL I ARTICLE

s This subject deals with geo-

metric objects from an alge- braic viewpoint.

vided a solution for that case, as well as for the case of

polynomials in one variable. However, the method failed

for 2-polynomials. Through our discussion we have got a

different method which works for 2-polynomials. It essen-

tially consists of two steps. Given 2-polynomials fl,..., fk, if we want to cheek whether some 2-polynomial f belongs to

Id:~al(fl,..., fk), we first compute a GrSbner basis {gl,..., gl of this ideal. The second step is to apply polynomial reduc-

tion to f with this basis as the divisor set. f is in the ideal

if and only if the remainder turns out to be zero.

But what does come out of it? Yes, it solves our original puzzle generalized for 2-polynomials alright, but is that all?

No, it is not. GrSbner bases have lots of other applications in algebra. In particular, there is a fascinating subject called algebraic geometry 5, where GrSbner bases have become a very useful tool. There ideals may be interpreted as certain geometric objects. But that is quite another story. And you may wish to learn that yourself once you pick up the basic notions of abstract algebra.

Address for Correspondence Arnab Chakraborty

Department of Statistics

Stanford University

California, USA.

S u g g e s t e d R e a d i n g

[1] D Cox, J Little and D O'Shea, Ideals, varieties and algorithms : An

introduction to computational algebraic geometry and commutative al-

gebra (2nd edition), Springer, Undergraduate Texts in Mathematics, 1991.

[2] R K Shyamasundar, Introduction to Algorithms, Resonance, Vol. I, No. 9, 1996. (This is the reference for the language used to describe the algorithms in the present article.)

Not Abel to Solve

The quadratic was solved with ease.

The cubic and biquadratic did tease but got done in the same year.

And then the quintic made it clear

that algebra developed by degrees!

B Sury

44 RESONANCE J January 2000