24
Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

  • View
    230

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Introduction to Gröbner Bases for Geometric Modeling

Geometric & Solid Modeling

1989

Christoph M. Hoffmann

Page 2: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Geometry

• Branch of mathematics.• Express geometric facts in algebraic terms in

order to interpret algebraic theorems geometrically.

• Computations for geometric objects using symbolic manipulation.– Surface intersection, finding singularities, and more…

• Historically, methods have been computationally intensive, so they have been used with discretion.

source: Hoffmann

Page 3: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Goal

• Operate on geometric object(s) by solving systems of algebraic equations.

• “Ideal”: (informal partial definition) Set of polynomials describing a geometric object symbolically.– Considering algebraic combinations of algebraic equations (without

changing solution) can facilitate solution.– Ideal is the set of algebraic combinations (to be defined more rigorously later).

– Gröbner basis of an ideal: special set of polynomials defining the ideal.

• Many algorithmic problems can be solved easily with this basis.• One example (focus of our lecture): abstract ideal membership problem:

– Is a given polynomial g in a given ideal I ?– Equivalently: can g be expressed as an algebraic combination of the fj for

some polynomials hj?– Answer this using Gröbner basis of the ideal.– Rough geometric interpretation: g can be expressed this way when surface

g = 0 contains all points that are common intersection of surfaces fj = 0.

}{ 11 rr fhfhg

source: Hoffmann

},{ 1 rffI

Page 4: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Overview• Algebraic Concepts

– Fields, rings, polynomials– Field extension– Multivariate polynomials and ideals– Algebraic sets and varieties

• Gröbner Bases– Lexicographic term ordering and leading terms– Rewriting and normal-form algorithms– Membership test for ideals– Buchberger’s theorem and construction of Gröbner bases

• For discussion of geometric modeling applications of Gröbner bases, see Hoffmann’s book.– e.g. Solving simultaneous algebraic expressions to find:

• surface intersections• singularities

source: Hoffmann

Page 5: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Fields, Rings, and Polynomials

0),,( 1 nxxf • Consider single algebraic equation:• Values of xi’s are from a field. (Recall from earlier in semester.)

– Elements can be added, subtracted, multiplied, divided*.– Ground field k is the choice of field .

• Univariate polynomial over k is of form:– Coefficients are numbers in k.– k[x] = all univariate polynomials using x’s.

• It is a ring (recall from earlier in semester): addition, subtraction, multiplication, but not necessarily division.

• Can a given polynomial be factored?– Depends on ground field

• e.g. x2+1 factors over complex numbers but not real numbers.– Reducible: polynomial can be factored over ground field.– Irreducible: polynomial cannot be factored over ground field.

m

i

ii xa

0

source: Hoffmann

* for non-0 elements

Page 6: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Field Extension

• Field extension: enlarging a field by adjoining (adding) new element(s) to it.– Algebraic Extension:

• Adjoin an element u that is a root of a polynomial (of degree m) in k[x].– Resulting elements in extended field k(u) are of form:

– e.g. extending real numbers to complex numbers by adjoining i» i is root of x2+1, so m=2 and extended field elements are of form

a + bi

– e.g. extending rational numbers to algebraic numbers by adjoining roots of all univariate polynomials (with rational coefficients)

– Transcendental Extension:• Adjoin an element (such as ) that is not the root of any polynomial in k[x].

11

2210

m

m uauauaa

source: Hoffmann

Page 7: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Multivariate Polynomials

jnjj en

m

j

eej xxxa ,,2,1

121

• Multivariate polynomial over k is of form:– Coefficients are numbers in k.– Exponents are nonnegative integers.– k[x1,…,xn] = all multivariate polynomials using x’s.

• It is a ring: addition, subtraction, multiplication, but not necessarily division.

• Can a given polynomial be factored?– Depends on ground field (as in univariate case)– Reducible: polynomial can be factored over ground field.– Irreducible: polynomial cannot be factored over ground field.– Absolutely Irreducible: polynomial cannot be factored over any

ground field.• e.g. 1222 zyx

source: Hoffmann

Page 8: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Ideals

• For ground field k, let:– kn be the n-dimensional affine space over k.

• mathematical physicist John Baez: "An affine space is a vector space that's forgotten its origin”.

– Points in kn are n-tuples (x1,…,xn), with xi’s having values in k.– f be an irreducible multivariate polynomial in k[x1,…,xn] – g be a multivariate polynomial in k[x1,…,xn] – f = 0 be the hypersurface in kn defined by f

• Since hypersurface gf = 0 includes f = 0, view f as intersection of all surfaces of form gf = 0

• is an ideal* – g varies over k[x1,…,xn] – Consider the ideal as the description of the surface f.– Ideal is closed under addition and subtraction.– Product of an element of k[x1,…,xn] with a polynomial in the ideal is

in the ideal.

source: Hoffmann and others

fixed} |],...,[{ 1 fxxkgffI n

*Ideals are defined more generally in algebra.

Page 9: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Ideals (continued)

• Let F be a finite set of polynomials f1, f2,…, fr in k[x1,…,xn]

• Algebraic combinations of the fi form an ideal generated by F (a generating set*):

– generators: { f, g }

• Goal: find generating sets, with special properties, that are useful for solving geometric problems.

source: Hoffmann

}],...,[|...{ 12211 nirr xxkgfgfgfgFI

* Not necessarily unique.

Page 10: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Algebraic Sets

• Let be the ideal generated by the finite set of polynomials F = { f1, f2,…, fr }.

• Let p = (a1,…, an) be a point in kn such that g(p) = 0 for every g in I.

• Set of all such points p is the algebraic set V(I) of I.– It is sufficient that fi(p) = 0 for every generator fi in F.

• In 3D, the algebraic surface f = 0 is the algebraic set of the ideal .

],...,[ 1 nxxkI

source: Hoffmann

fI

Page 11: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Algebraic Sets (cont.)

• Intersection of two algebraic surfaces f, g in 3D is an algebraic space curve.

– The curve is the algebraic set of the ideal. • But, not every algebraic space curve can be

defined as the intersection of 2 surfaces.• Example where 3 are needed*: twisted

cubic (in parametric form):

• Can define twisted cubic using 3 surfaces: paraboloid with two cubic surfaces:

• Motivation for considering ideals with generating sets containing > 2 polynomials. source: Hoffmann

3

2

tz

ty

tx

3232 00 xzzyyx

*see Hoffman’s Section 7.2.6 for subtleties related to this statement.

Page 12: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Algebraic Sets and Varieties (cont.)

• Given generators F = { f1, f2,…, fr }, the algebraic set defined by F in kn has dimension n-r – If equations fi = 0 are algebraically

independent.– Complication: some of ideal’s components

may have different dimensions.

source: Hoffmann

Page 13: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Algebraic Sets and Varieties (cont.)

source: Hoffmann

• Consider algebraic set V(I) for ideal I in kn.• V(I) is reducible when V(I) is union of > 2

point sets, each defined separately by an ideal.– Analogous to polynomial factorization:

• Multivariate polynomial f that factors describes surface consisting of several components

– Each component is an irreducible factor of f.

• V(I) is irreducible implies V(I) is a variety.

Page 14: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Algebraic Sets and Varieties (cont.)

• Example: Intersection curve of 2 cylinders:

• Intersection lies in 2 planes:

and• Irreducible ellipse in plane is

is algebraic set in ideal generated by { f1,g1 }.

• Irreducible ellipse in plane is is algebraic set in ideal generated by { f1,g2 }.

• Ideal is reducible.– Decomposes into and

• Algebraic set– Varieties: V(I2) and V(I3)

0:1 zxg

source: Hoffmann

0:

0:222

2

2221

rzyf

ryxf

0:2 zxg

211 , ffII

112 , gfII

213 , gfII

0:1 zxg

0:2 zxg

112 , gfII 213 , gfII

)()()( 321 IVIVIV

Page 15: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Algebraic Concepts:Algebraic Sets and Varieties (cont.)

• Example: Intersection curve of 2 cylinders:

– Intersection curve is not reducible• These 2 component curves cannot be defined

separately by polynomials.• Rationale: Bezout’s Theorem implies

intersection curve has degree 4. Furthermore:– Union of 2 curves of degree m and n is a

reducible curve of degree m + n.– If intersection curve were reducible, then

consider degree combinations for component curves (total = 4):

» 1 + 3: illegal since neither has degree 1.» 2 + 2: illegal since neither is planar.» Conclusion: intersection curve irreducible.

• Bezout’s Theorem also implies that twisted cubic cannot be defined algebraically as intersection of 2 surfaces:

• Twisted cubic has degree 3. • Bezout’s Theorem would imply it is intersection

of plane and cubic surface. • But twisted cubic is not planar; hence

contradiction.

source: Hoffmann

02:

01:22

2

221

zyf

yxf

Bezout’s Theorem*: 2 irreducible surfaces of degree m and n intersect in a curve of degree mn. *allowing complex coordinates, points at infinity

Page 16: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Formulating Ideal Membership Problem• Can help to solve geometric modeling problems

such as intersection of implicit surfaces (see Hoffmann Sections 7.4-7.8).

• Here we only treat the ideal membership problem for illustrative purposes:– “Given a finite set of polynomials F = { f1, f2,…, fr },

and a polynomial g, decide whether g is in the ideal generated by F; that is, whether g can be written in the form where the hi are polynomials.”

• Strategy: rewrite g until original question can be easily answered.

source: Hoffmann

rr fhfhfhg ...2211

Page 17: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Lexicographic Term Ordering and Leading

Terms• Need to judge if “this polynomial is simpler

than that one.”• Power Product:• Lexicographic ordering of power products:

1. x

2. If then for all power products w.

3. If u and v are not yet ordered by rules 1 and 2, then order them lexicographically as strings.

0 ,21

21 ie

nee exxx n

source: Hoffmann

nxxx 211

vu vwuw

Page 18: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Lexicographic Term Ordering and Leading

Terms• Each term in a polynomial g is a coefficient

combined with a power product.– Leading term lt(g) of g: term whose power product

is largest with respect to ordering• lcf (g) =leading coefficient of lt(g) • lpp (g) =leading power product of lt(g)

• Definition: Polynomial f is simpler than polynomial g if:

source: Hoffmann

)()( glppflpp

Page 19: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Rewriting and Normal-Form Algorithms

• Given polynomial g and set of polynomials F = { f1, f2,…, fr }

– Rewrite/simplify g using polynomials in F.

– g is in normal form NF(g, F) if it cannot be reduced further. Note: normal form need not be unique.

source: Hoffmann

Page 20: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Rewriting and Normal-Form Algorithms

• If normal form from rewriting algorithm is unique– then g is in ideal when NF(g, F) = 0.

• This motivates search for generating sets that produce unique normal forms.

source: Hoffmann

Page 21: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:A Membership Test for Ideals

• Goal: Rewrite g to decide whether g is in the ideal generated by F.

– Gröbner basis G of ideal • Set of polynomials generating F.

• Rewriting algorithm using G produces unique normal forms.

– Ideal membership algorithm using G:

source: Hoffmann

Page 22: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Buchberger’s Theorem & Construction

• Algorithm will consist of 2 operations:1. Consider a polynomial, and bring it into normal form

with respect to some set of generators G.2. From certain generator pairs, compute S-

polynomials (see definition on next slide) and add their normal forms to the generator set.

• G starts as input set F of polynomials• G is transformed into a Gröbner basis.• Some Implementation Issues:

– Coefficient arithmetic must be exact.• Rational arithmetic can be used.

– Size of generator set can be large.• Reduced Gröbner bases can be developed.

source: Hoffmann

Page 23: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Buchberger’s Theorem & Construction (continued)

source: Hoffmann

Page 24: Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Gröbner Bases:Buchberger’s Theorem & Construction (continued)

Buchberger’s Theorem: foundation of algorithm

source: Hoffmann

Gröbner basis construction algorithm