CHAPTER 7

Solving Diophantine equations

Several topics discussed in this lecture have required solving Diophantine equations (e.g., Sections 2.3.2 and 6.1). Diophantine equations are equations whose domain, range and coefficients are integers and whose form is that of an indeterminate (i.e., it has infinite solutions) polynomial. The equations we are interested in are polynomials of degree one in possibly many variables, which are often referred to as affine equations. This chapter may be skipped, or quickly scanned, by most readers, but is provided for the reader desiring a deeper understanding of the mechanics behind solving Diophantine equations.

7.1 SOLVING SINGLE DIOPHANTINE EQUATIONS

Let the Diophantine equation we wish to solve be in the variables i1, i2, . . . , in, and of the form:

Images

We can form a coefficient matrix A of the equation:

Images

where the j’th row of A is the coefficient for the j’th variable in the system. The left-hand side of the system, C, can be similarly represented. Because our system only has one equation, this is simply:

Images

To solve the system of equations, we first form the matrix IA, where I is the identity matrix. This gives the matrix

Images

An elimination algorithm, reminiscent of Gaussian elimination but using only integer operations, can be applied to the matrix to obtain the matrix UD:

Images

The resulting U matrix is an n × n matrix, and the resulting D matrix contains the greatest common divisor (or gcd) of the coefficients for the equation as its first element.

Let T = [t1, t2, . . . , tn] be a vector of n parameters. Then TD = C, i.e., in our equation, c0 = d1t1, and by simple algebra, t1 = d/d1. The equation has a solution if and only if d1 evenly divides c, i.e., if the gcd of the coefficients evenly divides the constant term. If a solution does exist, then

Images

and the relationship

Images

holds. Stated more verbosely,

Images

By substituting the solutions for t1 and arbitrary integer values for tk, 1 < kn into the system of Equation 7.2, all solutions to Equation 7.1 can be found.

7.2 SOLVING MULTIPLE DIOPHANTINE EQUATIONS

It is sometimes desirable to simultaneously solve a system of Diophantine equations. A general system of Diophantine equations can be expressed as:

Images

This set of equations can be represented in matrix form as:

Images

or, more generally, iA = C and the unique solution to this equation can be found as i = CA−1.

The goal in solving such system is the same as when using Gaussian elimination—we wish to reduce the array and find an upper triangular array that can be used to solve for each of the n variables in turn. However, because we are working with Diophantine equations, and we want them to remain Diophantine equations throughout the process, we avoid the use of division in the elimination process. Two types of operations will be performed on the matrix, interchange of two rows rp, rq and replacement of a row rp by rpkrq. By performing these operations repeatedly, the matrix is reduced to an upper triangular form.

We now describe how to do this systematically, additional details can be found in [24]. Consider the n × m matrix of integers, A, above. It can be augmented with an n × n identity matrix I, yielding the matrix

Images

We repeatedly apply the operations of Section 7.1 to eliminate various elements of the A matrix until the upper triangular form is achieved. At this point we have an n × m upper triangular transformed matrix A and a n × n Unimodular matrix U that is the result of applying the operations forming the upper triangular A matrix to the I matrix. As in the previous section, x = TU. The the parametric solutions of the system of Diophantine equations can be found by multiplying the vector [c′, t2, t3, . . . , tn] times U. An example is given in Figure 7.1.

7.3 EXTREME VALUES OF INTEGER FUNCTIONS

It is often the case that it is desirable to find the minimum and maximum values that an affine expression can assume. In this section we will show how to find the value of the expression

Images

where, as above, the ak are integer constants and the ik are integer variables. For each ik we assume there are integer bounds such that LikikUik. For additional details, see [24].

We first provide two definitions.

Definition 7.1 The positive part of a number a, denoted a+, is a when a ≥ 0, and is 0 otherwise.

Images

Images

Figure 7.1: An example of solving a Diophantine equation and expressing its solution in terms of parametric terms.

Definition 7.2 The negative part of a number a, denoted a, is |a| when a ≥ 0, and is 0 otherwise.

 

Thus, the negative and positive parts of a number return the magnitude of the number when it is a negative, and positive number, respectively. Using these concepts, we can succinctly express the extreme values of the expression. The lower bound of the expression can be

Images

and

Images

Intuitively, when computing the lower (upper) bound we want to minimize (maximize) the value of each term. To minimize a term when the coefficient ak is positive requires using the lowest value ik can take on, and when the coefficient ak is negative using the largest value of ik, and when ak is positive using the smallest value of ik. The maximum value is done in a similar, and symmetric, way.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.144.194