On Gröbner Bases and Their Uses in Solving System of Polynomial Equations and Graph Coloring

: This paper is based on the analytic and computational solution procedures of Gröbner basis and its applications. We show the behavior of the ideals generated by polynomials from a polynomial ring. We also present the idea of a zero dimensional ideal and use of this ideal to solve system of polynomial equations. We then introduce an algorithmic procedure for solving a system of polynomial equations (linear and nonlinear) with a finite number of solutions extending the idea of Gröbner basis. Finally we explore the idea of Gröbner basis for coloring the vertices of a given graph. We illustrate the stated results through a number of examples. Moreover, as for auxilary and making comparison with the analytic results, we use Mathematica 9.0.1 to develop some computer algebra.


Introduction
Gröbner bases were first introduced in 1965, together with an algorithm to compute them (Buchberger Algorithm), by Bruno Buchberger in his Ph.D. thesis. He named them after his advisor Wolfgang Gröbner. In 2007, Buchberger received the Association for Computing Machinery Paris Kanellakis Theory and Practice Award for this work. Accordingly, Buchberger and Kauers (2010) Gröbner bases methodology has been applied. In Mathematics, more specifically in computer algebra Gröbner basis is treated as a generating set of an ideal of a polynomial ring both in single variable and multivariable polynomial ring. Since Gröbner basis is treated as generators we can think of them as the greatest common divisors in a polynomial ring containing only one indeterminate. This is because ideals generated by two polynomials are equal to the ideal generated by the greatest common divisors of them.
For multivariable polynomials, if a polynomial ring is Noetherian then ideals of this ring are finitely generated. In these settings, the idea of greatest common divisors as the principal generators of the polynomial ideals in one variable corresponds to the concept of reduced Gröbner basis. To understand the concept of Gröbner basis we provide some theorems associated with it. After all of these we concentrate on the main objective of this paper that is to propose an algorithm that can solve both linear and non linear equations with finite number of solutions with the help of Gröbner basis. However, many other authors like Lazard (1983), Mörtberg (2010), Nicholson (2012), Östlin (2014), Trott (2006) and Ufuktepe and Bacak (2005) discussed on Gröbner-Bases, Gaussian elimination and resolution of systems of algebraic equations and its applications of graph coloring.
Finally we conclude this paper with coloring the vertex of a graph with Gröbner basis methods. Proper coloring of a graph is to assign colors either to vertices of the graph or to the edges in such a way that adjacent vertices or edges are colored with different colors. In this study we colored the vertices instead of coloring the edges. We also provide an example that illustrate the algorithm to show how vertices of a graph can be colored. At the end we also provide some future directions to the reader.

Properties and Basic Definitions
In this section we present some preliminary concepts that will help the reader to understand the subsequent topics.

Definition 1
The set of all polynomials in an indeterminate x denoted by R[x] with coefficients from the ring R is called a polynomial ring. The ring R is defined with its usual binary operations addition and multiplication and it is a subset of the polynomial ring i.e., R⊂R[x]. The notion of single variable polynomials can be extended to multivariable polynomials and thus gives rise to polynomial ring with more than one indeterminate. The ring of polynomials containing more than one indeterminate is denoted by R[x 1 , x 2 ,...., x n ] (Fraleigh, 2003).

Proposition 1
Let {f 1 , f 2 ,..., f n } be a subset of a ring R. Then the set is an ideal. Here this ideal I is called the ideal generated by {f 1 , f 2 ,..., f n } and denoted by I = <f 1 , f 2 ,..., f n > (Maya, 2009).

Theorem 2
If R is a commutative Noetherian ring with identity then the polynomial ring R[x] is also Noetherian (Paley and Weichsel, 1966).

Lemma 3
A polynomial ring with finite number of variables is a Noetherian ring. Here we call V(f) to be the variety defined by f.

Theorem 5
Let k be an algebraically closed field and let I ⊂k(x 1 , x 2 ,..., x n ). Then the variety, V(I) would be empty if and only if I = k[x 1 , x 2 ,..., x n ], this theorem is also known as Weak Nullstellensatz theorem.
The importance of this theorem is that it tells us that every proper ideal has a solution in an algebraically closed field. The proof of this theorem is beyond this paper. But this theorem motivates the next lemma.

Proof
For k to be a field and I = k [x 1 ,.., x n ] alternatively implies 1∈I.
For the converse case if 1∈I then for any arbitrary element h in k[x 1 , x 2 ,..., x n ], by the definition of an ideal 1.h∈I or h∈I. So every element of k[x 1 , x 2 ,..., x n ] is also an element of I. Hence I = k[x 1 , x 2 ,..., x n ] and by weak Nullstellensatz, we can say the variety would be empty.

Theorem 7
For k k = an ideal I ≠ [x 1 ,..., x n ] that satisfies one of the following three conditions is called a zero dimensional ideal (Adams et al., 1994): It is to be noted that the above three conditions are equivalent to each other i.e., if one condition is satisfied then the other two conditions will be satisfied automatically.

Definition 3
A set of non-zero polynomials G = {f 1 , f 2 ,..., f t } in an ideal I, will be called Gröbner basis for the ideal if and only if for every f in the ideal, there exists i∈{1,2,...,t} such that LP(f i ) divides LP(f). In other words if G is the Gröbner basis for the ideal I, then there are no non zero polynomials in I reduced with respect to G (Adams et al., 1994).
A Gröbner basis is a set of polynomials enjoying certain properties that allow algorithmic solutions for many fundamental problems in mathematics. Throughout this paper we are going to use the following algorithm proposed by Buchberger to find the Gröbner basis for an ideal of a polynomial ring.
Buchberger's Algorithm (Adams et al., 1994) Minimal and Reduced Gröbner Basis (Adams et al., 1994;Buchberger and Winkler, 1998;Maya, 2009) In the last Section we saw how to compute Gröbner basis. However, the Gröbner basis obtained from Buchberger's algorithm may not be unique. In this section we show by putting certain conditions on polynomials in the Gröbner basis, to obtain uniqueness.

Definition 4
If G = {g 1 , g 2 ,..., g s } be a Gröbner basis and if LC(g i ) for all i, i ≠ j, LP(g j ) is not divisible by LP(g i ), then G is called the minimal Gröbner basis (Adams et al., 1994).

Corollary 8
Let I be the ideal and G = {g 1 ,g 2 ,..., g s } be its Gröbner basis. To get a minimal Gröbner basis find all g i such that LP(g j ) divides LP(g i ) and eliminate them and divide each remaining g i by LC(g i ) (Adams et al., 1994).

Definition 5
A Gröbner basis G = {g 1 , g 2 ,..., g s } will be called reduce if, LC(g i ) for all i and g i is reduce with respect to G-{g i }.

Corollary 10
Let I be a zero dimensional ideal and G be the reduced Gröbner basis for I with respect to lex term order with x 1 <x 2 <x 3 <....<x n .
Then we can order g 1 , g 2 ,..., g t in such a way that g 1 contains only the variable x 1 , g 2 contains only the variable x 1 and x 2 and LP(g 2 ) is a power of x 2 , g 3 contains only the variable x 1 , x 2 and x 3 and LP(g 3 ) is a power of x 3 and so forth until g. The detailed proof can be found in (Adams et al., 1994).
Thus in order to solve system of equations by a zero dimensional ideal I, it suffices to have an algorithm to find the roots of polynomial in one variable as the Gröbner basis for a zero dimensional ideal I forms a triangular form. That is we first solve the equation for one variable as g 1 = 1, for each solution α of g 1 = 1, we solve the equation g 2 (α,x 2 ) = 0. We continue this manner all the way till we get, g n = 0.

Main Results
The results of this work are depending on algorithms. In this section we introduce the following algorithm for solving system of linear and nonlinear equations with a finite number of solutions.
Step 2: Step 3: Compute the reduced Gröbner basis G for I = <f 1 , f 2 ,...,f m >, if G = {1} then the system has no solution and stop, otherwise go to next step.
Step 4: Compute the intersection process to eliminate variables, namely: ( ) Step 5: Take back substitution into equation (*). Firstly, solve for G∩k[x 1 ] and it gives x 1 and substitute x 1 to in G∩k[x 1 , x 2 ] to get x 2 . Continue this process to find x 3 ,..., x n-1 . After getting {x 1 , x 2 ,..., x n-1 } seek for x n into G.

Stability Analysis
To state the stability analysis we should study the quotient ring Q[x]/I. As it is guaranteed from theorem 7 that if a system of equation has m roots then the quotient ring is an m dimensional linear space; i.e., dimension of the ring states the number of solutions of the system. By quotient ring we mean to replace an element of Q[x] by an element of Q[x]/I and it is uniquely defined by the monomial ordering imposed on the ideal generated by the polynomials in the system. So to find a solution of a system of equations we need to set up a basis for the polynomials and for elements outside the basis we need to worry a little. But if the basis for I is a Gröbner basis then the possibility of unexpected solutions is rulled out. So we can certainly say that solutions in this way is stable since we use Gröbner basis as a standard basis. For comparison we also provide some built-in codes to show the accuracy of our algorithm.

Illustrative and Numerical Examples
We now illustrate our algorithm in case of system of linear equations first then for the system of nonlinear equations by examples (Anton, 2010).

Example 1
For the following set of linear equations:

Example 2
Suppose we want to find the common solutions for the following nonlinear equations:

Solution
Step 1: Define the stated nonlinear equations in the following way: Step 2: Form an ideal generated by the above polynomials i.e., I = <f 1 , f 2 , f 3 , f 4 , f 5 >.
Step 4: In this step we get: G k x y z z z yz y y xy xz x x G k x y y y xy x x Step 5: We now seek to solve for G∩k[x] = {-x + x 2 } and hence get x = 0, 1.

Solution
Step 1: Define the stated nonlinear equations in the following way: Step 2: Form an ideal generated by the above polynomials i.e., I = <f 1 , f 2 , f 3 >.
Step 3: Since the reduced Gröbner basis{1}, it is confirmed by our algorithm that the above system of equations have no solution.

Applications
In this section we show graph Coloring by using Gröbner Basis. If X represent the vertices and E represents the edges then the pair G(X,E) is called a graph and each vertices will be connected by associated edges (Gallinger, 2013). In this section we want to deal with vertex coloring of a graph G(X,E) with strictly maintaining the fact that two distinct vertices connected by an edge have different colors. By vertex coloring we mean that if a given graph has n vertexes then we want to color those vertices in such a way that no two adjacent vertexes share the same color. The first question that arises is that whether a graph is colorable or not? We are going to answer this question by using Gröbner basis. For this we first need to express this problem as a Gröbner basis problem, i.e., we must represent the graph as polynomials. Taking this into account, we introduce here a general algorithm for the vertexes to be colored and we then illustrate our algorithm for assigning three (3) different colors for n vertices.
Graph coloring can be used in many different ways. To understand graph coloring we need to determine how to express a graph in terms of polynomials and the next question is whether a graph is colorable or not? So before getting started we need to study some theorems relevant to vertex coloring of a graph G(X,E). That is in this way we have a polynomial representation for our vertices. We now need another polynomial representation such that no two adjacent vertices have same color. The polynomial f(x i , x j ) = 2 2 1 i i j j

Theorem 11
x x x x + + − will suffice this problem and we will prove this now in the next theorem.

Theorem 12
For the two vertices x i , x j in G(X,E), will not share the same color if and only if f(x i , x j ) = 0 (Gallinger, 2013).

Proof
First we consider the vertices to be different and think of them as {(-1,0),(-1,1),(0,-1),(0,1),(1,0),(1,-1)} and since x x x x + + − is symmetric for any of the three we get f(x i , x j ) = 0. This means that if the vertices are colored in a different way we will always get f(x i , x j ) = 0.
For the converse case let f(x i , x j ) = 0 then we need to show that two vertices are colored in a different way. Now suppose we have a contradiction as f(x i , x j ) ≠ 0 and the vertices are same. This gives vertices to be {(-1,-1),(0,0),(1,1)}. Now if we substitute these into f(x i , x j ) = 0 then f(x i , x j ) ≠ 0 and hence we have a contradiction. So two adjacent vertices will be colored in a different way if and only if f(x i , x j ) = 0.
Thus so far we know we can color two vertices of an edge by two different colors. Now we treat this polynomial and the previous polynomials as a generator of the ideal I, so Here X i and X j must be connected by an edge.
Step 3: Generate an ideal I by the polynomials in Step 2.
Step 4: To determine whether graph, G(X,E) is colorable or not. In order to do this we compute the variety of the ideal generated by I. If V (I) = Φ, coloring is possible and proceed to Step 5.
Step 5: Compute the reduced Gröbner basis, G r for the ideal I of the polynomials in step 2.
Step 6: Solve reduced Gröbner basis, G r and assign different colors to vertices connected by edges.
To assign this color solutions that possess same value will be colored with a single color and solutions that possess different values will be colored with different colors.
It is to be noticed here that graph coloring in not unique in the sense we can have a graph colored in many different ways. Next we elaborate these steps in three and four coloring of a graph, G(X,E).

Illustration of Graph Coloring
In this section we are going to illustrate our algorithm with an example to specifically show how three coloring of a graph can be viewed according to our algorithm.

Example 4
Suppose we want to color the vertices of the following graph with three different colors (Adams et al., 1994).

Solution
We first use the lexicographical ordering and then we create from the above figure the polynomials that will determine the coloring. So the polynomials are: We see that the sets {x 1 , x 3 , x 7 }, {x 2 , x 5 }, {x 4 , x 6 , x 8 } share the same color. Now let us determine the colors from the Gröbner basis: • x 1 , x 3 , x 7 are colored green as they posses 0.
(Arbitrary Colors) • x 4 , x 6 , x 8 are colored red as they posses -1 • x 2 , x 5 are colored blue as they posses 1 So the graph would look like The Fig. 1 shows a graph with eight vertices and the Fig. 2 shows the same vertices with three different colors using our algorithm. x 8 x 2 x 3 x 4 x 5 x 6 x 7 x 1 x 8 x 2 x 3 x 4 x 5 x 6 x 7

Conclusion
We discussed about how we can use Gröbner basis on ideals of a polynomial rings. Throughout this paper we tried to give Mathematica 9.0.1 codes to calculate the arithmetic on polynomial ideals by Gröbner basis. We also presented the idea of a zero dimensional ideal and use of this ideal to solve system of polynomial equations. Here we can easily understand which of the problems are solvable by Gröbner basis and which are not. We then introduced an algorithm for solving system of polynomial equations in the light of polynomial ideals and their intersections. Although the system of polynomial equations having infinite number of solutions, it cannot be solved with the algorithm discussed in this study. Finally, we introduced how we can use Gröbner basis to color vertices of a given graph.