• Nebyly nalezeny žádné výsledky

Solving systems of equations by Gr¨obner basis conversion

4.3 Standard Gr¨obner basis methods for solving systems of polynomial equations . 28

4.3.2 Solving systems of equations by Gr¨obner basis conversion

The second standard method for solving systems of polynomial equations tries to avoid the problem of large computational complexity of the Gr¨obner basis w.r.t. the lexicographic ordering by computing a Gr¨obner basis w.r.t. some other monomial ordering. Then this basis is converted to the lexicographic Gr¨obner basis and the method continues as the Elimination Gr¨obner Basis Method presented in the previous section.

Usually, the graded reverse lexicographic (grevlex) ordering from Definition 5, which often requires far less computational effort than a lexicographic Gr¨obner basis computation, is used in this method [40, 13]. Then some algorithm for converting a Gr¨obner basis with respect to one monomial ordering to a Gr¨obner basis with respect to a different monomial ordering is used. The FGLM algorithm [48] can be used for zero-dimensional ideals and the Gr¨obner walk algorithm [38] for general ideals.

Since we are considering zero-dimensional ideals, we briefly describe here the main ideas of the FGLM algorithm.

The algorithm starts with some Gr¨obner basisG of the idealI and converts it to a lexico-graphic Gr¨obner basis Glex, or a Gr¨obner basis w.r.t. some other monomial ordering, of the same ideal. The algorithm uses only two structures, a listGlex = {g1, . . . , gk}, which at each stage contains a subset of the lexicographic Gr¨obner basis, and a list Blex, which contains a subset of the monomial basis of the quotient ringC[x1, . . . , xn]/I. Both these lists are initially empty.

For each monomialxα C[x1, . . . , xn]in increasing lexicographic ordering, starting with xα = 1, the algorithm performs these three steps:

Algorithm 4FGLM

1. For the inputxα, computexαG

IfxαG = ∑

jcjxα(j)G, where[ xα(j)]

Blex andcj C, i.e. ifxαGis linearly dependent on the remainders on division by G of the monomials inBlex, then add polynomialg=xα

jcjxα(j)∈ItoGlexas the last element.

Otherwise add[xα]toBlexas the last element.

2. Termination Test

If a polynomial g havingLT(g)equal to a power of the greatest variable in the lexico-graphic ordering was added toGlex, then STOP.

3. Next Monomial

Replacexαwith the next monomial, w.r.t. the lexicographic ordering, which is not divisi-ble by any of the monomialsLT(gi)forgi∈Glex. GOTO 1.

Note that the original ordering (not the lexicographic ordering) is used for division byGin this algorithm.

Theorem 3. The FGLM algorithm terminates for every input Gr¨obner basis G of a zero-dimensional idealI and correctly computes a lexicographic Gr¨obner basisGlex forI and the lexicographic monomial basisBlexfor the quotient ringA=C[x1, . . . , xn]/I.

Proof. The proof of this theorem can be found in [39].

Here we only show that the first polynomial added toGlexusing this algorithm is a polynomial in one variable (the smallest in the used lexicographic ordering).

Let the ordering of the variables bex1 > x2 > · · · > xn. Using this ordering, the FGLM algorithm starts with the monomialxα = 1and continues with monomials xn, x2n, x3n and so on in increasing lexicographic order. Let us consider the setS1 =

{

[1],[xn],[xn]2, . . . }

with [xn]i A = C[x1, . . . , xn]/I, i 0. Since our ideal is zero-dimensional, the algebraA is finite dimensional. This means that the setS1 is linearly dependent inA. Moreover, also the set S2=

{

1, xnG, x2nG, x3nG, . . . }

is linearly dependent.

Letibe the smallest positive integer for which {

1, xnG, x2nG, . . . , xinG }

is linearly dependent.

This means that in the FGLM algorithm monomial cosets[1],[xn],[ x2n]

, . . .[ xin1]

will be added toBlexand we can write

xinG=

withcj C. Therefore the polynomial xin

i1

j=1

cjxjn∈I (4.36)

is a polynomial in one variable (xn), which is added toGlexas the first polynomial.

For some applications, e.g. where it is sufficient to find solutions only for one variable or where solutions for other variables can be found in a different “easier” way, the algorithm can be stopped after finding this one-variable polynomial.

Example 5. (FGLM method)Let us consider the system of polynomial equations (4.30) from Example 4, i.e. the system

2x2+y2+ 3y12 = 0, (4.37)

x2−y2+x+ 3y4 = 0.

Here we show how this system can be solved using the FGLM conversion algorithm. This al-gorithm starts with a Gr¨obner basisGw.r.t. some “feasible” monomial ordering. Usually the graded reverse lexicographic ordering (grevlex) is used here. In this case the Gr¨obner basisG w.r.t. this grevlex ordering consists of the following two polynomials

G={

3y22x3y4,3x2+x+ 6y16}

. (4.38)

The computation of this basis is simpler than the computation of the lexicographic Gr¨obner basis (4.32) for the same ideal. In this case both polynomials from the grevlex Gr¨obner basis G(4.38) can be easily obtained from the initial polynomials (4.37) as their simple linear combi-nations. Denoting the input polynomials asf1andf2and polynomials from the grevlex Gr¨obner basisGasg1andg2, we haveg1=f12f2andg2 =f1+f2.

Now we transform this grevlex Gr¨obner basisGto the lexicographic Gr¨obner basis using the presented FGLM algorithm.

First we set Glex = {} andBlex = {}. Then we go through monomialsxα C[x, y]in increasing lexicographic order forx > y, i.e. we start with1and continue withy, y2and so on.

For each of these monomials, we first perform the main loop of the FGLM algorithm. This main loop requires to computexαG and to check if this remainder is linearly dependent on the remainders of the monomials inBlexon the division byG. In this case we have

1. 1G= 1,and sinceBlexis empty we setBlex={[1]}, is linearly independent we setBlex ={

[1],[y],[

is linearly dependent we let Blex = {

[1],[y],[

}, wherecjare coefficients from the linear combi-nation

and therefore, the first element of the Glex, i.e. the lexicographic Gr¨obner basis, will be polynomialy42y3 139y2+ 103y−89.

Next we can continue with the next two steps of the FGLM algorithm, i.e. the termination test and the next monomial step. This means that we can continue with monomials containingxin the lexicographic ordering and for these monomials again perform the main loop. However, in this case, it is sufficient to stop here and find solution foryfrom the polynomial equation

y42y313

9 y2+10 3 y− 8

9 = 0. (4.41)

This equation gives us solutions y = {

1, 2, 13, 43}

. Solutions for x can be obtained by substituting the solutions foryto one from the initial polynomial equations (4.37). In this way we obtain four solutions of the system (4.37)

(2,1),(1,2), (

7 3,1

3 )

, (8

3,−4 3

)

. (4.42)

Note that the polynomial equation (4.41) is equivalent to the polynomial equation 9y4 18y313y2+ 30y8 = 0obtained from the lexicographic Gr¨obner basis (4.32) computed in Example 4.

4.3.3 Solving systems of equations via eigenvalues end eigenvectors