computational algebraic statistics and its applications · 2018-06-30 · ideals, varieties, and...

78
Computational Algebraic Statistics and its Applications Satoshi Aoki (Kobe Univ.) RIKEN iTHEMS 26 June, 2018 1

Upload: others

Post on 01-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

Computational Algebraic Statisticsand its Applications

Satoshi Aoki (Kobe Univ.)

RIKEN iTHEMS

26 June, 2018

1

Page 2: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

Contents

1. An introduction of Grobner bases of polynomial rings

2. Grobner bases theory in design of experiments

3. Grobner bases theory in sampling problems of contingency tables

2

Page 3: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• References

1. Cox, D., Little, J. and O’Shea, D. (2000). Ideals, Varieties, and

Algorithms, An Introduction to Computational Algebraic Geometry

and Commutative Algebra. 3rd ed. Springer.

· · · An introduction of Grobner basis theory.

2. Hibi, T. (ed). (2013). Grobner Bases, Statistics and Software

Systems. Springer.

· · · Translation of [3]. Chap 1 by Hibi: An introduction of Grobner

basis theory. Chap 4 by Aoki and Takemura: An application to

the analysis of contingency tables.

3. JST CREST 日比チーム (編). (2011). グレブナー道場. 共立出版.4. 青木敏.計算代数統計 — グレブナー基底と実験計画法 —.統計学

One Point 第 9巻.2018年 8月刊行予定.· · · The slides 1 and 2 today are partially based on this book.

3

Page 4: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

5. Pistone, G. and Wynn, H. P. (1996). Generalized confounding with

Grobner bases. Biometrika, 83, 653–666.

· · · An application to the design of experiments. (One of the two

origins of computational algebraic statistics.)

6. Pistone, G., Riccomagno, E. and Wynn, H. P. (2001). Algebraic

statistics: Computational commutative algebra in statistics.

Chapman & Hall Ltd, Boca Raton.

· · · The first textbook of computational algebraic statistics.

7. Diaconis, P. and Sturmfels, B. (1998). Algebraic algorithms for

sampling from conditional distributions. Annals of Statistics. 26,

363–397.

· · · Application to the analysis of contingency tables. (One of the

two origins of computational algebraic statistics.)

8. Aoki, S., Hara, H. and Takemura, A. (2012). Markov bases in

statistics. Springer Series in Statistics.

· · · Application to the analysis of contingency tables.

4

Page 5: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

1. An introduction of Grobner bases of polynomial rings

5

Page 6: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

1. Grobner bases and algebraic equations

• The stage of the Grobner bases is an ideal of a polynomial ring.

Prof. Takayama says, “Ideal is an algebraic equation.”

• Prob. 1 Solve the simultaneous linear equations:

⎧⎪⎪⎨⎪⎪⎩

x+ 2y − z = 2

x+ y − 4z = 3

x+ 3y + 3z = 0

6

Page 7: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Easy. (Linear algebra)⎧⎪⎪⎨⎪⎪⎩

x+ 2y − z = 2

y + 3z = −1

z = −1

• Prob. 2 Solve the simultaneous algebraic equations:

⎧⎪⎪⎨⎪⎪⎩

x2 + y2 + 4z2 = 81

x− y + z2 = 13

xz − 2y = 18

7

Page 8: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Answer: ⎧⎪⎪⎨⎪⎪⎩

x2 + y2 + 4z2 = 81

x− y + z2 = 13 (1)

xz − 2y = 18 (2)

From (2)− 2× (1), we can eliminate y as

xz − 2x− 2z2 = −8.

The answer is given from the factorization

(z − 2)(x− 2z − 4) = 0.

8

Page 9: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Prob. 3 Solve the simultaneous algebraic equations:

⎧⎪⎪⎨⎪⎪⎩

x2 + y2 + 4z2 = 90

x− y + z = 12

xz − 3y = 28

• Similarly to Prob. 2, we can eliminate y as

xz − 3x− 3z + 8 = 0,

however, we cannot factorize this.

9

Page 10: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• It is quite difficult to solve Prob. 3 by hand, though it seems to

be similar to Prob. 2.

• Prob. 2 is easy to solve because we can use the factorization of

the equation.

What is a general method to obtain an equation of one

variable from algebraic simultaneous equations, by not us-

ing factorization?

• The calculation of the Grobner bases is an effective answer.

10

Page 11: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• ”Grobner bases like” solution of Prob. 3⎧⎪⎪⎨⎪⎪⎩

f1 = x2 + y2 + 4z2 − 90 = 0

f2 = x− y + z − 12 = 0

f3 = xz − 3y − 28 = 0

◦ Aim: eliminate x, y and obtain the equation of z.

◦ From f2 = 0, substitute x = y − z + 12 into f3, we have

f3 = z(y − z + 12)− 3y − 28 = yz − 3y − z2 + 12z − 28.

We have

f4 = yz − 3y − z2 + 12z − 28.

11

Page 12: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

f1 = x2 + y2 + 4z2 − 90 = 0

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0

◦ Similarly, substitute x = y − z + 12 into f1, we have

f1 = (y − z + 12)2 + y2 + 4z2 − 90

= 2y2 − 2yz + 24y + 5z2 − 24z + 54. (∗)

We already have f4 = 0. Substitute yz = 3y+ z2 − 12z+28 as

(∗) = 2y2 − 2(3y + z2 − 12z + 28) + 24y + 5z2 − 24z + 54

= 2y2 + 18y + 3z2 − 2.

We have

f5 = y2 + 9y + 3z2/2− 1.

12

Page 13: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Now we have the equivalent simultaneous equation⎧⎪⎪⎨⎪⎪⎩

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0

f5 = y2 + 9y + 3z2/2− 1 = 0.

◦ Next we want to eliminate y from f4 = f5 = 0. But we do not

use rational expression

y =z2 − 12z + 28

z − 3.

We only consider polynomials.

Eliminate yz and y2, the leading terms of f4, f5.

13

Page 14: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Calculate yf4 − zf5:

yf4 − zf5

= y(yz − 3y − z2 + 12z − 28)− z(y2 + 9y + 3z2/2− 1)

= −3y2 − yz2 + 3yz − 28y − 3z3/2 + z. (∗∗)

yz and y2 can be replaced from f4 = f5 = 0 as

(∗∗) = −3(−9y − 3z2/2 + 1)− (z − 3)(3y + z2 − 12z + 28)

−28y − 3z3/2 + z

= −3yz + 8y − 5z3/2 + 39z2/2− 63z + 81

= −3(3y + z2 − 12z + 28) + 8y − 5z3/2 + 39z2/2− 63z + 81

= −y − 5z3/2 + 33z2/2− 27z − 3.

We have f6 = y + 5z3/2− 33z2/2 + 27z + 3.

14

Page 15: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Now we have the equivalent simultaneous equations⎧⎪⎪⎨⎪⎪⎩

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0

f6 = y + 5z3/2− 33z2/2 + 27z + 3 = 0.

◦ Now it is easy to obtain⎧⎪⎪⎨⎪⎪⎩

x+ 5z3/2− 33z2/2 + 28z − 9 = 0

y + 5z3/2− 33z2/2 + 27z + 3 = 0

z4 − 48z3/5 + 31z2 − 36z + 38/5 = 0.

The last one is an equation of z.

15

Page 16: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Note: The third equation can be factorized as

(z2 − 4z + 1)(z2 − 28z/5 + 38/5) = 0.

The solution of Prob. 3 is

(x, y, z) =

{(7±√

3

2,−13± 3

√3

2, 2±

√3

),(

4±√6,

−26± 6√6

5,14±√

6

5

)}.

16

Page 17: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• The set of the polynomials we have

x+ 5z3/2− 33z2/2 + 28z − 9,

y + 5z3/2− 33z2/2 + 27z + 3,

z4 − 48z3/5 + 31z2 − 36z + 38/5

is a Grobner basis.

• The polynomial deformation we done is a Buchberger algorithm.

• For general simultaneous algebraic equations, we can obtain the

polynomial of z in similar way, if x, y can be eliminated.

• Prof. Hibi says, “Grobner basis is a powerful technique for

solving simultaneous equations”.

17

Page 18: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

2. Ideals of polynomial rings

The stage of the Grobner bases: polynomial rings in n variables.

• Monomial of the variables x1, . . . , xn:

n∏i=1

xaii = xa1

1 · · ·xann , a1, . . . , an ∈ Z≥0.

n∑i=1

ai : degree

◦ Term: monomial with a nonzero coefficient

◦ Polynomial: finite sum of terms

◦ Example: f = −5x21x2x

23 +

2

3x2x

34x

25 − x3

3 − 7 is a polynomial

with 4 terms −5x21x2x

23,

2

3x2x

34x

25, −x3

3, −7.

The monomials appearing in f are x21x2x

23, x2x

34x

25, x3

3, 1.

18

Page 19: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• K: field. (Example: K = Q or R or C.)

• K[x1, . . . , xn] : the set of all polynomials in the variables

x1, . . . , xn with coefficients in K.

◦ Example:

x21 −

√2x2x3 ∈ R[x1, x2, x3],

2x21x2 − 2

3x2x

43 + 1 ∈ Q[x1, x2, x3](⊂ R[x1, x2, x3])

• K[x1, . . . , xn] has the structure of a ring (i.e., sum and product),

and is called a polynomial ring in n variables over K.

19

Page 20: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• To introduce an ideal of K[x1, . . . , xn], consider Prof.

Takayama’s words: “Ideal is an algebraic equations”.

◦ For f1(x1, . . . , xn), . . . , fr(x1, . . . , xn) ∈ K[x1, . . . , xn],

consider the simultaneous equation⎧⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎩

f1(x1, . . . , xn) = 0

f2(x1, . . . , xn) = 0...

fr(x1, . . . , xn) = 0.

◦ Affine variety of f1, . . . , fr :

V(f1, . . . , fr) = {(a1, . . . , an) ∈ Kn | ∀i, fi(a1, . . . , an) = 0}.◦ Solve the equation f1 = · · · = fr = 0

⇔ Derive the affine variety V(f1, . . . , fr).

20

Page 21: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ In Prob. 3, we have

V(f1, f2, f3) =

{(7±√

3

2,−13± 3

√3

2, 2±

√3

),(

4±√6,

−26± 6√6

5,14±√

6

5

)}

for K = R and

f1 = x2+y2+4z2−90, f2 = x−y+ z−12, f3 = xz−3y−28.

How did we get it?

21

Page 22: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

f1 = x2 + y2 + 4z2 − 90 = 0

f2 = x− y + z − 12 = 0

f3 = xz − 3y − 28 = 0

◦ From f1 = f2 = f3 = 0, “solve f2 = 0 for x and substitute it

into f3”, we have⎧⎪⎪⎨⎪⎪⎩

f1 = x2 + y2 + 4z2 − 90 = 0

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0.

Note that f3 − zf2 = f4.

22

Page 23: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

f1 = x2 + y2 + 4z2 − 90 = 0

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0

◦ Next, “solve f2 = 0 for x and substitute it into f1”, and into

this, substitute the result of “solve f4 = 0 for yz”, and

multiply the result by 1/2, we have⎧⎪⎪⎨⎪⎪⎩

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0

f5 = y2 + 9y + 3z2/2− 1 = 0.

Note that

1

2f1 − x+ y − z + 12

2f2 + f4 = f5.

23

Page 24: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Next, to eliminate yz of f4 and y2 of f5, consider yf4 − zf5,

and substitute yz = · · · from f4 = 0 and y2 = · · · from f5 = 0

into it. Then multiply it by −1, we have⎧⎪⎪⎨⎪⎪⎩

f2 = x− y + z − 12 = 0

f4 = yz − 3y − z2 + 12z − 28 = 0

f6 = y + 5z3/2− 33z2/2 + 27z + 3 = 0.

Note that

−1× (yf4 − zf5 + 3f5 + (z − 3)f4 + 3f4)

= (−y − z)f4 + (z − 3)f5 = f6.

◦ Finally we have f6 = f7 = f8 = 0 as

f7 = f2 + f6 = x+ 5z3/2− 33z2/2 + 28z − 9

f8 = −2

5f4 +

2z − 6

5f6 = z4 − 48

5z3 + 31z2 − 36z +

38

5.

24

Page 25: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Point: The deformations of polynomials above are expressed

as “multiplied by polynomials” and “addition” of polynomials.

• Now we define the set

〈f1, . . . , fr〉 = {h1f1 + · · ·+ hrfr | h1, . . . , hr ∈ K[x1, . . . , xr]},

i.e., the set of polynomials that can be obtained from f1, . . . , fr

by “multiplied by polynomials” and “addition”.

• In other words, 〈f1, . . . , fr〉 is the set of all polynomials that can

appear to solve the equation f1 = · · · = fr = 0.

• 〈f1, . . . , fr〉 is an important example of an ideal.

25

Page 26: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

Definition A nonempty subset I of K[x1, . . . , xn] is called an ideal

of K[x1, . . . , xn] if the following conditions are satisfied.

• If f ∈ I, g ∈ I, then f + g ∈ I;

• If f ∈ I, h ∈ K[x1, . . . , xn], then hf ∈ I.

Proposition I = 〈f1, . . . , fr〉 is an ideal of K[x1, . . . , xn].

26

Page 27: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• 〈f1, . . . , fr〉 is the ideal generated by {f1, . . . , fr}, i.e., finitelygenerated ideal.

◦ In general, let {fλ | λ ∈ Λ} be a nonempty subset of

K[x1, . . . , xn], then we can show that

〈{fλ | λ ∈ Λ}〉 ={finite sum

∑λ∈Λ

hλfλ, hλ ∈ K[x1, . . . , xn]

}

is an ideal of K[x1, . . . , xn].

◦ Conversely, for an ideal I ⊂ K[x1, . . . , xn], there exists

{fλ | λ ∈ Λ} ⊂ K[x1, . . . , xn] satisfying I = 〈{fλ | λ ∈ Λ}〉.The subset {fλ | λ ∈ Λ} is called a system of generators of I.

27

Page 28: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Fundamental problems for ideal:

1. Ideal description problem

Can every ideal I ⊂ K[x1, . . . , xn] be written as

I = 〈f1, . . . , fr〉

for some finite set {f1, . . . , fr} ⊂ K[x1, . . . , xn]?

2. Ideal membership problem

For an ideal I ⊂ K[x1, . . . , xn], is there an algorithm to decide

whether a given f ∈ K[x1, . . . , xn] lies in I?

• The answers for both are “YES”.

• For the case of one variable polynomial ring K[x], both problems

can be solved by high school mathematics.

A key is a division algorithm.

28

Page 29: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

Prob. 4

Divide f(x) = x4 + 2x3 − x2 + 4x− 1 by g(x) = x2 − 3x+ 1.

Answer:

x2+ 5x+ 13

x2 − 3x+ 1 x4+2x3− x2 + 4x − 1

x4−3x3+ x2

5x3− 2x2 + 4x − 1

5x3−15x2+ 5x

13x2− x − 1

13x2−39x+13

38x−14

The quotient is x2 + 5x+ 13 and the remainder is 38x− 14.

29

Page 30: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• The expression we have is

f(x) = (x2 + 5x+ 13)g(x) + 38x− 14.

• A division of f ∈ K[x] by g ∈ K[x] is to express f in the form

f(x) = q(x)g(x) + r(x),

where q(x) is the quotient and r(x) is the remainder satisfying

r(x) = 0 or deg(r(x)) < deg(g(x)).

q(x) and r(x) are decided uniquely.

30

Page 31: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Point: “Divide by g(x) = x2 − 3x+ 1“ means “replace x2 by

g(x) + 3x− 1 as many times as possible”.

x2+ 5x + 13

x2 − 3x + 1 x4+2x3− x2 + 4x − 1 x4 + 2x3 − x2 + 4x − 1

x4−3x3+ x2 = x2(g + 3x − 1) + 2x3 − x2 + 4x − 1

5x3− 2x2 + 4x − 1 = x2g + 5x3 − 2x2 + 4x − 1

5x3−15x2+ 5x = x2g + 5x(g + 3x − 1) − 2x2 + 4x − 1

13x2− x − 1 = (x2 + 5x)g + 13x2 − x − 1

13x2−39x+13 = (x2 + 5x)g + 13(g + 3x − 1) − x − 1

38x−14 = (x2 + 5x + 13)g + 38x − 14

31

Page 32: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Ideal description problem for K[x]

◦ I ⊂ K[x]: ideal.

◦ g ∈ I: an element of I with a minimum degree.

◦ For each f ∈ I, we have the expression

f = qg + r,

where r = 0 or deg(r) < deg(g).

q ∈ K[x] and r ∈ K[x] are decided uniquely.

◦ From f, g ∈ I, we have r = f − qg ∈ I. Because g is an

element of I with a minimum degree, r = 0. Therefore each

f ∈ I can be expressed as f = qg, i.e., I is generated by g:

I = {qg | q ∈ K[x]} = 〈g〉 .

• Each ideal I ⊂ K[x] is a principal ideal.

32

Page 33: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Ideal membership problem for K[x]

To judge whether f ∈ K[x] is in 〈g〉 ⊂ K[x] or not, divide f by g,

and we have the expression

f = qg + r, q, r ∈ K[x],

where r = 0 or deg(r) < deg(g).

Then we have

r = 0 ⇔ f ∈ 〈g〉 .

33

Page 34: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

3. Monomial order and division algorithm

• To solve the ideal membership problem for n variables, consider

the division algorithm for K[x1, . . . , xn].

• Recall that “divide g = x2 − 3x+ 1” means “replace x2 by

g + 3x− 1” for one variable case.

• How it can be generalized to n variable cases?

◦ “Divide f by h = x2 − yz” means “replace x2 in f with

h+ yz”? or “replace yz in f with −h+ x2”?

◦ Anyway, deg(f) cannot be reduced. Also, we must define a

stopping rule.

• To generalize the division algorithm for K[x1, . . . , xn], we need

“order” on the set of monomials.

34

Page 35: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Definition Let Mn be the set of monomials in the variables

x1, . . . , xn. A monomial order on K[x1, . . . , xn] is a total order ≺on Mn such that

(i) 1 ≺ u for all 1 �= u ∈ Mn;

(ii) If u, v ∈ Mn and u ≺ v, then uw ≺ vw for all w ∈ Mn.

◦ Example: An order by the degree

1 ≺ x ≺ x2 ≺ x3 ≺ · · ·

is a monomial order on M1.

35

Page 36: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Examples of monomial orders:

Definition Let u = xa11 · · ·xan

n , v = xb11 · · ·xbn

n ∈ Mn.

(i) We define u ≺purelex v if the leftmost nonzero element of

(b1 − a1, . . . , bn − an) is positive. It follows ≺purelex is a

monomial order on K[x1, . . . , xn], called the pure

lexicographic order.

(ii) We define u ≺lex v if either (i) deg(v) > deg(u) or (ii)

deg(v) = deg(u) and the leftmost nonzero element of

(b1 − a1, . . . , bn − an) is positive. It follows ≺lex is a monomial

order on K[x1, . . . , xn], called the lexicographic order.

(iii) We define u ≺rev v if either (i) deg(v) > deg(u) or (ii)

deg(v) = deg(u) and the rightmost nonzero element of

(b1−a1, . . . , bn−an) is negative. It follows ≺rev is a monomial

order on K[x1, . . . , xn], called the reverse lexicographic order.

36

Page 37: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Prob. 5 Let n = 3 and x1 = x, x2 = y, x3 = z. List the

monomials of degree less than 5 with respect to

≺purelex,≺lex,≺rev induced by x y z, respectively.

Answer

◦ The pure lexicographic order:

x4, x3y, x3z, x3, x2y2, x2yz, x2y, x2z2, x2z, x2,

xy3, xy2z, xy2, xyz2, xyz, xy, xz3, xz2, xz, x,

y4, y3z, y3, y2z2, y2z, y2, yz3, yz2, yz, y,

z4, z3, z2, z, 1

37

Page 38: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ The lexicographic order:

x4, x3y, x3z, x2y2, x2yz, x2z2, xy3, xy2z, xyz2, xz3,

y4, y3z, y2z2, yz3, z4,

x3, x2y, x2z, xy2, xyz, xz2, y3, y2z, yz2, z3,

x2, xy, xz, y2, yz, z2, x, y, z, 1

◦ The reverse lexicographic order:

x4, x3y, x2y2, xy3, y4, x3z, x2yz, xy2z, y3z,

x2z2, xyz2, y2z2, xz3, yz3, z4,

x3, x2y, xy2, y3, x2z, xyz, y2z, xz2, yz2, z3,

x2, xy, y2, xz, yz, z2, x, y, z, 1

38

Page 39: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• We fix a monomial order ≺ on K[x1, . . . , xn].

• For each f ∈ K[x1, . . . , xn], we can define the initial monomial of

f with respect to ≺, in≺(f), as the largest monomial belonging

to f .

• We also write cf as the coefficient of in≺(f). The term

cf · in≺(f) is the initial term of f .

• Example: f = 2xy4 − x3z + 5x2y2z + 1 ∈ K[x, y, z]

◦ For ≺purelex, in≺purelex(f) = x3z and the initial term is −x3z.

◦ For ≺lex, in≺lex(f) = x2y2z and the initial term is 5x2y2z.

◦ For ≺rev, in≺rev(f) = xy4 and the initial term is 2xy4.

39

Page 40: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Division algorithm for K[x1, . . . , xn]

Let f, g1, . . . , gs ∈ K[x1, . . . , xn]. Divide f by g1, . . . , gs as

follows.

◦ Fix a monomial order ≺ on Mn.

◦ Suppose a monomial in f is divided by some

in≺(g1), . . . , in≺(gs). Then replace in≺(gi) in f with

1

cgigi −

(1

cgigi − in≺(gi)

).

◦ Replace similarly as possible as we can.

40

Page 41: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Theorem (Division algorithm) Fix a monomial order ≺ on Mn.

Let g1, . . . , gs and f are nonzero polynomials in K[x1, . . . , xn].

Then there exists a standard form of f with respect to g1, . . . , gs,

f = q1g1 + · · ·+ qsgs + r

for some q1, . . . , qs, r ∈ K[x1, . . . , xn], satisfying

(i) If r �= 0, then any monomial of r cannot be divided by any

in≺(gi).

(ii) If qi �= 0, then in≺(qigi) � in≺(f) holds.

r is called a remainder of f with respect to g1, . . . , gs.

41

Page 42: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Prob. 6 For ≺lex on M3, derive a standard form of

f = xyz+ xz2 − y2 − 1 with respect to g1 = yz− x, g2 = xz− y2.

Answer. For the lexicographic order, the initial monomials of

g1, g2 are

in≺lex(g1) = yz, in≺lex

(g2) = xz.

Then, we “replace yz in f with g1 + x” or “replace xz in f with

g2 + y2” as possible as we can.

42

Page 43: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

g1 = yz − x, g2 = xz − y2

f = xyz + xz2 − y2 − 1

= x(g1 + x) + xz2 − y2 − 1

= xg1 + x2 + xz2 − y2 − 1

= xg1 + x2 + z(g2 + y2)− y2 − 1

= xg1 + zg2 + x2 + y2z − y2 − 1

= xg1 + zg2 + x2 + y(g1 + x)− y2 − 1

= (x+ y)g1 + zg2 + x2 + xy − y2 − 1

This is a standard form of f with respect to g1, g2 for ≺lex.

43

Page 44: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

Another answer. Replace by g2 first, we have

f = xyz + xz2 − y2 − 1

= y(g2 + y2) + xz2 − y2 − 1

= yg2 + y3 + xz2 − y2 − 1

= yg2 + y3 + z(g2 + y2)− y2 − 1

= (y + z)g2 + y3 + y2z − y2 − 1

= (y + z)g2 + y3 + y(g1 + x)− y2 − 1

= yg1 + (y + z)g2 + y3 + xy − y2 − 1.

This is also a standard form of f with respect to g1, g2 for ≺lex.

For n variable cases, a standard form is not unique.

44

Page 45: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

4. Grobner bases and ideal membership problems

• Consider the ideal membership problem for K[x1, . . . , xn].

• For an ideal I = 〈g1, . . . , gs〉 ⊂ K[x1, . . . , xn] and

f ∈ K[x1, . . . , xn], if we fix a monomial order ≺ on Mn, we have

a standard form of f with respect to g1, . . . , gs by the division

algorithm,

f = q1g1 + · · ·+ qsgs + r.

• If r = 0, then we know f ∈ I. However, r = 0 is not necessary

condition for f ∈ I.

45

Page 46: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Example. For ≺lex on M3,

f = (x+ y)g1 + zg2

= yg1 + (y + z)g2 + y3 − x2

are standard forms of f = xyz + xz2 − x2 − xy with respect to

g1 = yz − x, g2 = xz − y2.

• Here, write g3 = y3 − x2 and express I = 〈g1, g2〉 asI = 〈g1, g2, g3〉. Then we have standard forms of f with zero

remainder with respect to g1, g2, g3,

f = (x+ y)g1 + zg2

= yg1 + (y + z)g2 + g3.

• This {g1, g2, g3} is a Grobner basis of I.

46

Page 47: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Consider the case that f ∈ I = 〈g1, . . . , gs〉 has a standard form

f = q1g1 + · · ·+ qsgs + r,

where r �= 0.

• Here, r = f − q1g1 − · · · − qsgs ∈ I. Each monomial of r cannot

be divided by any of in≺(g1), . . . , in≺(gs). In particular, in≺(r)cannot be divided by any of in≺(g1), . . . , in≺(gs), i.e.,

in≺(r) �∈ 〈in≺(g1), . . . , in≺(gs)〉 .

• Conversely, for a monomial order ≺, if the set {g1, . . . , gs}satisfies the condition

f ∈ 〈g1, . . . , gs〉 ⇒ in≺(f) ∈ 〈in≺(g1), . . . , in≺(gs)〉 ,then it follows, for each f ∈ K[x1, . . . , xn], the remainder of f

with respect to g1, . . . , gs is unique.

47

Page 48: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• The above consideration leads to the definition of the Grobner

basis.

• Write the (monomial) ideal generated by {in≺(f) | f ∈ I} as

in≺(I) = 〈{in≺(f) | f ∈ I}〉 .

This is called an initial ideal of f with respect to ≺.

• Definition Fix a monomial order ≺ on Mn. Let I be an ideal

of K[x1, . . . , xn]. Then a Grobner basis of I with respect to ≺ is

a finite set {g1, . . . , gs} of polynomials in I satisfying

in≺(I) = 〈in≺(g1), . . . , in≺(gs)〉 .

48

Page 49: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• For I = 〈g1, . . . , gs〉, in≺(I) ⊃ 〈in≺(g1), . . . , in≺(gs)〉 in general.

• The converse does not necessary hold.

Example.

For ≺lex on M3, consider g1 = yz − x, g2 = xz − y2, I = 〈g1, g2〉.From y3 − x2 = xg1 − yg2 ∈ I, in≺lex

(y3 − x2) = y3 ∈ in≺lex(I)

holds. However, y3 �∈ 〈yz, xz〉 = 〈in≺lex(g1), in≺lex

(g2)〉, i.e.,in≺lex

(I) �= 〈in≺lex(g1), in≺lex

(g2)〉.

49

Page 50: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• A finite Grobner basis always exists.⎛⎜⎜⎝

From Dickson’s lemma saying that “The set of

minimal elements of a nonempty subset of Mn

is at most finite”.

⎞⎟⎟⎠

• A Grobner basis of I is a system of generators of I.⎛⎜⎜⎝

This yields the so-called Hilbert Basis Theorem.

Therefore the ideal description problem reduces to

a calculation of Grobner basis for arbitrary fixed ≺.

⎞⎟⎟⎠

50

Page 51: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• The remainder of the standard form with respect to the Grobner

basis is unique.⎛⎜⎜⎝

Therefore the ideal membership problem is solved

by the division algorithm with respect to the

Grobner basis.

⎞⎟⎟⎠

51

Page 52: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

5. Buchberger criterion and Buchberger algorithm

• Given a system of generators of an ideal, how can we decide

whether they form its Grobner basis or not?

• The answer is Buchberger criterion.

• Recall that {g1, g2} = {yz − x, xz − y2} is not a Grobner basis of

I = 〈g1, g2〉 with respect to ≺lex because the initial monomial of

g3 = xg1 − yg2 ∈ I is not included in

〈in≺lex(g1), in≺lex

(g2)〉 = 〈yz, xz〉.• Idea: check the element of I that can be produced from g1, g2 by

“cancelling the initial monomials in≺(g1), in≺(g2) each other”.

52

Page 53: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Write the least common multiple lcm(u, v) of two monomials

u = xa11 · · ·xan

n and v = xb11 · · ·xbn

n as

lcm(u, v) = xc11 · · ·xcn

n , ci = max{ai, bi}, i = 1, . . . , n.

• Definition The polynomial

S(f, g) =lcm(in≺(f), in≺(g))

cf · in≺(f) f − lcm(in≺(f), in≺(g))cg · in≺(g) g

is called the S-polynomial of f and g with respect to ≺, where

cf , cg are the coefficients of in≺(f), in≺(g) in f, g, respectively.

53

Page 54: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• The S-polynomial of f and g is obtained by cancelling the initial

monomials of f and g.

• Example: g1 = yz − x, g2 = xz − y2

Lexicographic order:

in≺lex(g1) = yz, in≺lex

(g2) = xz,

S(g1, g2) = xg1 − yg2 = −x2 + y3

Reverse lexicographic order:

in≺lex(g1) = yz, in≺lex

(g2) = y2,

S(g1, g2) = yg1 + zg2 = −xy + xz2

Pure lexicographic order:

in≺lex(g1) = x, in≺lex

(g2) = xz,

S(g1, g2) = −zg1 − g2 = −yz2 + y2

54

Page 55: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Theorem (Buchberger criterion)

Fix a monomial order ≺ on Mn. Let I be an ideal of

K[x1, . . . , xn] and G = {g1, . . . , gs} is a system of generators of I.

Then G is a Grober basis of I if and only if the following

condition is satisfied:

“For all i �= j, the remainder of the standard form of S(gi, gj)

with respect to g1, . . . , gs is 0.”

55

Page 56: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Example:

g1 = yz − x, g2 = xz − y2, I = 〈G〉 ⊂ K[x, y, z], G = {g1, g2}◦ Lexicographic order ≺lex

S(g1, g2) = y3 − x2 is a standard form w.r.t. G and is a

remainder itself. Therefore G is not a Grobner basis of I.

Write g3 = y3 − x2 and G′ = G ∪ {g3}, then

S(g1, g3) = x2z − xy2 = xg2

S(g2, g3) = −y2g3 + x2g2 (∗)

are standard forms w.r.t. G′ with 0 remainder. Therefore G′

is a Grobner basis of I w.r.t. ≺lex.

56

Page 57: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Reverse lexicographic order ≺rev

S(g1, g2) = xz2 − xy is a standard form w.r.t. G and is a

remainder itself. Therefore G is not a Grobner basis of I.

Write g3 = xz2 − xy and G′ = G ∪ {g3}, then

S(g1, g3) = xy2 − x2z = −xg2

S(g2, g3) = −xzg3 − xyg2 (∗)

are standard forms w.r.t. G′ with 0 remainder. Therefore G′

is a Grobner basis of I w.r.t. ≺rev.

57

Page 58: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ Pure lexicographic order ≺purelex

S(g1, g2) = y2 − yz2 is a standard form w.r.t. G and is a

remainder itself. Therefore G is not a Grobner basis of I.

Write g3 = y2 − yz2 and G′ = G ∪ {g3}, then

S(g1, g3) = −y3z + xyz2 = −yzg3 − yz2g1 (∗)S(g2, g3) = xyz3 − y4 = −y2g3 + yz2g2 (∗)

are standard forms w.r.t. G′ with 0 remainder. Therefore G′

is a Grobner basis of I w.r.t. ≺purelex.

58

Page 59: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• As we have seen, Buchberger criterion is not only a criterion, but

supplies an element that is needed to be a Grobner basis.

Buchberger algorithm

Fix a monomial order ≺. Let I = 〈G〉 = 〈g1, . . . , gs〉. If eachS-polynomial S(gi, gj) has a standard form with 0 remainder

w.r.t. G, G is a Grbner basis of I. Otherwise, if S(gi, gj) has a

standard form with nonzero remainder rs+1, add rs+1 to G.

Repeating this procedure, we can obtain a Grobner basis after

finite number of steps.

(The “finiteness” is important. This is from the fact

that the polynomial ring is Noetherian ring.

)

59

Page 60: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• To perform the Buchberger algorithm, the following lemma is

useful.

Lemma

Fix a monomial order ≺ on Mn. For f, g ∈ K[x1, . . . , xn],

suppose in≺(f) and in≺(g) are relatively prime, i.e.,

lcm(in≺(f), in≺(g)) = in≺(f) · in≺(g). Then there exists a

standard form of S(f, g) with 0 remainder w.r.t. f, g.

(Therefore the calculation of S-polynomials (∗) arenot needed in the previous Example in pages 56-58.

)

60

Page 61: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Now we back to Prob. 3.

By the Buchberger algorithm, calculate the Grobner basis of the

ideal I = 〈f1, f2, f3〉 ⊂ K[x, y, z] for ≺purelex, where

f1 = x2 + y2 + 4z2 − 90, f2 = x− y + z − 12, f3 = xz − 3y − 2.

61

Page 62: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Let F = {f1, f2, f3}. Check S(f1, f2), S(f1, f3), S(f2, f3).

S(f2, f3) = zf2 − f3

= −yz + 3y + z2 − 12z + 28.

This is a standard form w.r.t. F and is a remainder itself. We

add

f4 = yz − 3y − z2 + 12z − 28

to F . We have F = {f1, f2, f3, f4}.

62

Page 63: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

S(f1, f2) = f1 − xf2

= xy − xz + 12x+ y2 + 4z2 − 90

= (y − z + 12)f2 − 2f4 + 2y2 + 18y + 3z2 − 2.

This is a standard form w.r.t. F . We add the remainder

f5 = y2 + 9y +3

2z2 − 1

to F . We have F = {f1, f2, f3, f4, f5}.

63

Page 64: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

S(f1, f3) = zf1 − xf3

= 3xy + 28x+ y2z + 4z3 − 90z

= (3y + 28)f2 − 12f4 + (z + 3)f5 + y + 5z3/2

−33z2/2 + 27z + 3.

This is a standard form w.r.t. F . We add the remainder

f6 = y +5

2z3 − 33

2z2 + 27z + 3

to F . We have F = {f1, f2, f3, f4, f5, f6}.

64

Page 65: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Now we have

f1 = x2 + y2 + 4z2 − 90,

f2 = x− y + z − 12,

f3 = xz − 3y − 2,

f4 = yz − 3y − z2 + 12z − 28,

f5 = y2 + 9y + 32z

2 − 1,

f6 = y + 52z

3 − 332 z2 + 27z + 3.

Checked: S(f1, f2), S(f1, f3), S(f2, f3).

Check needed: S(f3, f4), S(f4, f5), S(f4, f6), S(f5, f6).

65

Page 66: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

S(f3, f4) = yf3 − zf4

= xyz − 3y2 − yz2 + 3yz − 28y + z3 − 12z2 + 28z

= (3y + 28)f2 + (z − 12)f3 + (x− z)f4,

S(f4, f5) = yf4 − zf5

= −3y2 − yz2 + 3yz − 28y − 3z3/2 + z

= −zf4 − 3f5 − f6.

These are standard forms w.r.t. F with 0 remainder.

66

Page 67: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

S(f4, f6) = f4 − zf6

= −3y − 5z4/2 + 33z3/2− 28z2 + 9z − 28

= −3f6 − 5z4/2 + 24z3 − 155z2/2 + 90z − 19

This is a standard forms w.r.t. F . We add the remainder

f8 = z4 − 48

5z3 + 31z2 − 36z +

38

5

to F . We have F = {f1, f2, f3, f4, f5, f6, f8}.

67

Page 68: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

S(f5, f6) = f5 − yf6

= −5yz3/2 + 33yz2/2− 27yz + 6y + 3z2/2− 1

= (−5z2/2 + 9z)f4 + 6f6 − (5/2)f8.

This is a standard form w.r.t. F with 0 remainder.

68

Page 69: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Now we have

f1 = x2 + y2 + 4z2 − 90,

f2 = x− y + z − 12,

f3 = xz − 3y − 2,

f4 = yz − 3y − z2 + 12z − 28,

f5 = y2 + 9y + 32z

2 − 1,

f6 = y + 52z

3 − 332 z2 + 27z + 3.,

f8 = z4 − 485 z3 + 31z2 − 36z + 38

5

Checked: S(f1, f2), S(f1, f3), S(f2, f3), S(f3, f4),

S(f4, f5), S(f4, f6), S(f5, f6).

Check needed: S(f3, f8), S(f4, f8).

69

Page 70: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

S(f3, f8) = z3f3 − xf8

= 48xz3/5− 31xz2 + 36xz − 38x/5− 3yz3 − 28z3

= −(38/5)f2 + (48z2/5− 31z + 36)f3

+(−3z2 + 99z/5− 168/5)f4 − (2/5)f6 − 3f8.

S(f4, f8) = z3f4 − yf8

= 33yz3/5− 31yz2 + 36yz − 38y/5− z5 + 12z4 − 28z3

= (33z2/5− 31z + 99z/5− 57 + 297/5)f4

−(2/5)f6 − (z − 9)f8.

These are standard forms w.r.t. F with 0 remainder.

Therefore F = {f1, f2, f3, f4, f5, f6, f8} is a Grobner basis of I

w.r.t. ≺purelex from the Buchberger criterion.

70

Page 71: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

6. Elimination theory and solving simultaneous

equations

• Prof. Hibi says, “Grobner basis is a powerful technique for

solving simultaneous equations”.

• This is due to the elimination theory. It is a fascinating result

which demonstrates the power of Grobner bases.

71

Page 72: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Recall that the Grobner basis w.r.t. ≺purelex of

I = 〈f1, f2, f3〉 ⊂ Q[x, y, z], where

f1 = x2 + y2 + 4z2 − 90, f2 = x− y + z − 12, f3 = xz − 3y − 28

includes a polynomial of z,

5z4 − 48z3 + 155z2 − 180z + 38,

as an element.

• In fact, the Grobner basis w.r.t. the pure lexicographic order is

effective for solving simultaneous equations.

72

Page 73: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

Proposition Let I = 〈f1, . . . , fr〉 is an ideal of K[x, y, z]. If

I ∩K[z] �= 〈0〉, there is only one polynomial of K[z] in the

reduced Grobner basis of I w.r.t. ≺purelex satisfying

x purelex y purelex z, and is unique. Write this element be

g∗ ∈ G ∩K[z], then I ∩K[z] = 〈g∗〉 holds.

◦ Note that I ∩K[z] is the set of elements in I with the variable

z. In other words, I ∩K[z] is the set of polynomials that is

derived from the simultaneous equation

f1(x, y, z) = · · · = fr(x, y, z) = 0 by eliminating x, y.

◦ I ∩K[z] is an ideal of K[z].

73

Page 74: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

◦ We have seen that each ideal of one variable polynomial ring

is a principal ideal, and the unique generator is the element

with the minimum degree. (see page 32)

◦ Therefore this Proposition means that g∗ ∈ G ∩K[z] is the

element of I ∩K[z] with the minimum degree.

◦ In the previous example, we have

I ∩Q[z] =⟨5z4 − 48z3 + 155z2 − 180z + 38

⟩.

74

Page 75: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Extending Proposition.

• Let K[xi1 , xi2 , . . . , xim ] be the set of the polynomials in

K[x1, . . . , xn] with the variables xi1 , xi2 , . . . , xim

(1 ≤ i1 < i2 < · · · < im ≤ n). This is a polynomial ring.

• A monomial order ≺ on K[x1, . . . , xn] naturally induce the

monomial order ≺′ on K[xi1 , xi2 , . . . , xim ].

75

Page 76: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Theorem (The Elimination Theorem)

Let ≺ be a monomials order on K[x1, . . . , xn] and G a Grobner

basis of an ideal I ⊂ K[x1, . . . , xn] w.r.t. ≺. Suppose that

g ∈ G, in≺(g) ∈ K[xi1 , xi2 , . . . , xim ] ⇒ g ∈ K[xi1 , xi2 , . . . , xim ]

holds. Then G ∩ K[xi1 , xi2 , . . . , xim ] is a Grobner basis of

I ∩ K[xi1 , xi2 , . . . , xim ] w.r.t. ≺′.

• The pure lexicographic order satisfies this condition.

76

Page 77: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• In the previous example, we have the Grobner basis

G = {g1, g2, g3},

g1 = 5z4 − 48z3 + 155z2 − 180z + 38,

g2 = 2y + 5z3 − 33z2 + 54z + 6,

g3 = 2x+ 5z3 − 33z2 + 56z − 18,

of I = 〈g1, g2, g3〉 w.r.t. ≺purelex.

From the elimination theorem,

◦ {g1} is a Grobner basis of I ∩K[z],

◦ {g1, g2} is a Grobner basis of I ∩K[y, z] w.r.t. y purelex z.

77

Page 78: Computational Algebraic Statistics and its Applications · 2018-06-30 · Ideals, Varieties, and Algorithms, An Introduction to Computational Algebraic Geometry and Commutative Algebra

• Solving equation f1 = · · · = fr = 0 by the elimination theorem

1. Calculate the reduced Grobner basis G of I = 〈f1, . . . , fr〉w.r.t. x1 purelex x2 purelex · · · purelex xn.

2. If G ∩K[xn] �= ∅, this is the reduced Grobner basis of

I ∩K[xn]. Solve it for xn.

3. If G ∩K[xn−1, xn] �= ∅, this is the reduced Grobner basis of

I ∩K[xn−1, xn]. Substitute xn and solve it for xn−1.

4. Similarly, obtain xn−2, xn−3, . . . , x1 in order.

78