Lattice points on the plane ax+by+cz=d and the diophantine system ax+by+cz=d ex+fy+gz=h
LATTICE POINTS ON THE PLANE AND THE DIOPHANTINE SYSTEM dczbyax =++ dzcybxa =++ dzcybxa =++ By Konstantine ‘Hermes’ Zelator
Page 1 of 27
Lattice Points on the plane dczbyax =++ and the linear diophantine system dzcybxa =++ dzcybxa =++
Introduction
In almost every introductory number theory book there is a section devoted to the treatment of the linear diophantine equation cbyax =+ , in two unknowns or variables x and , and with integer coefficients and .The word “diophantine” refers to equations to be solved in the set of integers, usually denoted by Z . Also the same word, “diophantine”, has its historic derivation in the name of Diophantos, a Greek mathematician (estimated to have lived in the period 150AD-250AD) who lived in Alexandria, Egypt. Diophantos tackled real life problems whose solution relied on the solution of certain equations to be solved in integers.The books Elementary Number Theory with Applications (see [1]) by Kenneth Rosen and Classical Algebra (see[2]) by William J.Gilbert and Scott A.Vanstone are excellent courses for the student who is unfamiliar with the above linear diophantine equation; they are replete with interesting exercises, not only on this topic but throughout, and they emphasize the computational aspects of number theory in a clear and concise manner. As with every other textbook wiich contains a presentation of the above equation, the complete solution set is presented (parametric solutions in terms of an integer-valued parameter), along with the relevant conditions and facts. y ba , c From a geometric perspective when one tries to solve the diophantine equation , one has the objective of determining all the lattice points, if any, that lie on the straight line described by the equation cbyax =+ cbyax =+ .In a given coordinate plane with coordinate axes x and , a lattice point is simply a point in which both coordinates and are integers. y ),( yx x y Later on in this paper, we will make use of the parametric solution to the above linear diophantine equation. Now let us turn our attention to three-dimensional space equipped with a coordinate system of three mutually perpendicular or orthogonal axes yx , and z ; and imagine for a moment a lattice points in space; that would be a point with the real numbers actually being integers. The problem of determining the set of all lattice points that lie on a given plane described by the equation (with being integers) is tantamount to finding all integer solutions to the above ),,( zyx ,, zyx dczbyax =++ dcba ,,, equation. This equation often arises in practical problems as well. Only rarely does an Page 2 of 27 ntroductory number theory book devote a section to this equation. Even more rarely, does it contain a section on the system of two (simultaneous) linear diophantine equations, dzcybxa =++ eometrically speaking we would seek to find the set of all the lattice points which lie on he organization of this paper in sequential sections is as follows: Terminology notation of the form can be interpreted three ways: as a point in the coordinate dzcybxa =++
Gthe intersection line of two planes. Of course there may be not a line of intersection (parallel planes) or if there is one, it may not contain any lattice points. This is then the aim of this article: to present (in a step-by-step manner) the parametric solutions to the above three-variable diophantine equation as well as the system of the two three-variable diophantine equations; along with interesting computational examples. T 1. Terminology, 2. Review: Solving the diophantine equation , ulas cbyax =+
3. The Four Form , 4. Examples, 5. Explanations and Proofs, 6. Chart of Special Cases A ( ) l , k plane (with axes x and y ); secondly as the greatest common divisor of two integers k and l .And thirdly, as a solution to the diophantine equation cbyax =+ (here, we exemp the pen interval notation). toimilarly, a notation of the form ( ) rk ,, l S can have three meanings: as a point in space (equipped with an zyx ,, coordinate system), as the greatest common divisor of three integers rk ,, l ,or (third meaning) as a solution to the linear diophantine equation dbyax ++ or the diophantine system d cz = zcybxa =++ will always be clear from the text whether for example dzcybxa =++ ( ) rk ,, l It refers to the greatest or solcommon divisor of the integers rk ,, l ; or to a point in space ution to the above tree variable diophantine equation or em. Note that the difference between the meanings of the triple ( ) rk ,, l as a point or as solution to the above equation (or system) is only semantic; for all practical purposes we may regard the frist and the third meanings as indistinguishable. Thus the only distinction that needs to be made clear is that between syst Page 3 of 27 rk ,, l ) as a point (or solution) and as greatest common divisor of ,we will be writing rk ,, l δ= ),,( rk l or some other letter. With regard to the notation ∈ x Z which may appear on occasion throughout this paper, it simply means “ x belongs to the set Z ” or “ x is a member of the set Z (in plain language, “ x is an integer”). Finally, the conjunctive “ ” may be used between statements, which simply means “and”. ∧ And one more clarification. If we state that “the integer k divides the integer l ”, we will mean that k exactly divides ; that is, l l ⋅= tk , for some ∈ t Z . The same meaning we will attribute to the expression “ k is a divisor of l ”. The notation “|” can also be employed “ ” means “k divides l ". l | k
2. Review: Solving the diophantine equation cbyax =+ First assume that both a and b are nonzero integers.The special case (and the geometric interpretation of) (i.e. = ab ( ) ≠= ba , ( ) =≠ ba or ( ) == ba is discussed in the special cases section.(Section 6) The graph described by the equation cbyax =+ is slant (straight) line whose slope is equal to ba − . The equation cbyax =+ has solutions in the set of integers Z if, and only if the greatest common divisor is also a divisor of ( ba , ) ( ) cbac |,: = δ . If δ does not divide c then the set of solutions is the empty set (no solutions) We have, dcybxacbyax =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛⇔=+ δδ ; the last diophantine equation is equivalent to the original one; that is, they have the same solution set. The two reduced integers δ a and δ b are relatively prime or coprime, another way of saying that their greatest common divisor is equal to 1: =⎟⎠⎞⎜⎝⎛ δδ ba . If ( ) , yx is a particular solution to the above linear diophantine equation then all the solutions are given by Solution set S: ( ) ⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛−= maymbxyx δδ ,, (For further details, proof etc, see either of the two references, [1] or [2]) Where m is an integer parameter; in other words m can take any integer value; we can simply write Z .Thus, for each specific integer value of m a new particular solution is produced. ∈ m Page 4 of 27
So for ( ) ( ,,,0 yxyxm ) == . Thus, if we know one specific or particular solution, all the rest can be found. But how does one determine a particular solution ( ) ?, yx Sometimes it is easy to find one by inspection or by a short trial and error process, especially if the coefficients a and b are small in absolutely value. But there is fail proof procedure that works in all cases, although it may several steps in order to arrive at a particular solution .Essentially this process is what is known as the Euclidean Algorithm. We can explain how it works without becoming unduly theoretical. For simplicity let us put ( , yx ) ==== baccbbaa δδδ .We have the equation cybxa =+ . If = a or = b , we are done; for example say = a (i.e. = a or -1) and suppose .We solve for x to obtain −= aybcx +−= . So the solution set S is given by S: Z . A similar picture emerges in the cases , ( ) ( ) ∈⋅+−= mmmbcyx ,,, = a = b or . Now suppose that −= b > a and > b . Because of the condition ( ) = ba it follows that a and b must be distinct positive integers: either ba > or ba < . For the sake of discussion suppose that ba < : we solve the equation for x (if it were ba > , we would solve for y): a ybcxcybxa −=⇔=+ We perform the divisions and ; we have : ac : ab , RQacrqab +=+= , Where are the quotients of the divisions and the two remainders. , Qq , Rr As we know form the division theorem, ar <≤ and aR <≤ . We find that, ( ) ( ) a yRQarqax +−+= a yRryQqx −+−= Obviously for x to be an integer, the ratio a yRr − must be an integer; say yRzarza yRr +=⇔=− . Page 5 of 27 ote that in the last equation, aRR <= . Thus by setting zy = ,we can repeat the process by solving for the variable (which is one that has the smaller, in absolute value, coefficient). The Euclidean Algorithm ensures us that the process must terminate after a finite number of steps by obtaining, in the last stage, an equation of the form z μ=+ + nn zkz , which has the integer solution ( ) μ .By back substitution we can trace a particular solution to equation ( , yx ) cybxa =+ . Let us illustrate this with an example. Consider the linear diophantine equation, 102x + 140y = 318 We have a = 102, b = 140 , c = 318; =δ (a,b) = (102 , 140) = 2; ==== baa δ , and 159 == δ cc . The original equation is equivalent to 51x + 70y = 159. Obviously =<= , so we solve for x: 5170159 yx −= The divisions 159:51 and 70:51 yield 159=(3)(51)+6 and 70=(1)(51)+19. Therefore, ( )( ) [ ] ( )( ) [ ] ;51 195116513 yx +−+= yyx −+−= Next we set and zy = zz −= , a linear diophantine equation with unknowns and ; we obtain z z =<==+ zz ,so we solve for : z ( ) zzzzzz −+−=⇔+−=−= Again, we set zz −= , a linear diophantine equation in the unknowns z and z : we ha = ; note thve + zz at and so solve for =<= z : Page 6 of 27 )
13 613.1613196 zzz +−=−= ( ) zzz −+−=
We could continue for a few more steps till we get an equation of the form μ=+ + nn zkz (which has the integer solution )0,( μ ); but it is not really necessary, for the last diophantine equation has an obvious particular solution: = z and . Tracing back we find −= z ( ) =+−−== zy and −=−−= x Thus is a particular solution to the diophantine equation 51x + 70y = 159 and hence the original one. All the solutions are given by ( −= yx ) mbxx −= , ; mayy += Solution set S( x,y )=(-1-70 m ,3+51 m ), m ∈ Z In the Examples Section, in all the examples (except for one) the particular solutions are easily found by inspection. However, we wanted to give an illustration to the reader of how this process works in less than obvious cases.
3. The Four Formulas
In formulas 1,2 and 3 below assume that the coefficients a,b,c are nonzero (for the cases in which abc=0, see the Special Cases Section).
Formula
If at least on of the positive integers cba ,, is equal to 1 (i.e. ±=±=±= corbora ), all the solutions to the diophantine equation dczbyax =++ can be obtained by merely solving for the corresponding variable. For example if a=1, solution set ( ) ( ) nmcnbmdzyxS ,,,,: −−= , where m and n are integer- value parameters. While in the case b=-1, Solution set ( ) ( ) ∈−+= nmwithndcnammzyxS ,,,,,,: Z The next formula pertains to the case in which >>> cba and at least one of the greatest common divisors (a,b),(b,c),(a,c) is equal to 1. First observe that the diophantine equation will have solutions if, and only if, the number dczbyax =++ ( ) cba ,, = δ is a divisor of d. Otherwise, if δ does not divide d, the equation has no integer solutions. If d | δ , the given diophantine equation is equivalent to Page 7 of 27 δδδδ dzcybxa =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛+⎟⎠⎞ =⎟⎠⎞⎜⎝⎜⎛⎝ and and ⎛ δδδ cba ecause of the above reduction, in Formulas 2 and 3, we start with an equation which is ormula he next formula, Formula 3, deals with the cases in which not only each of the three here is a fact from number theory that is used in Formula 3, namely ) eader to show. InBalready reduced; ( a,b,c )=1 F Assume ( a, b, c ) = > cba and at least one of ( a,b ), (b,c), (a,c) being 1, all the solequal to 1. If ( a,b ) = utions to the diophantine equation dczbyax =++ are given by ( ) ( ) mzanycdybn mxcmdx +−= =−−= , , with being integer-valued parameters, and ( ) being a solution lineikewise, if , to the ar diophantine equation =+ byax nm , , yx L ( ) = cb , all the solution can be expressed by the two-parameter formulas ( ) ( ) ( ) ,,, yxwithbnzamdzcnyamdx , ym +−=−−== being a solution to the equation 1 =+ czby . imilarly, if S ( ) = ca , all the solutions can be given by ( ) cnxbmdx −−= , ( ) andzmy zbm + − to == , with ),( yx being a solution =+ czax Tcoefficient is greater than 1 in absolute value; but also each of the greatest common divisors ( ) ( ) ( ) cacbba ,,,,, is greater than 1 (so we can not use Formula 2). T ( ) ( cbacba ,,),,( = for any nonzero integers cba ,, . We leave this as an exercise for the r our case, a,b,c )=1= (( a,b ), c ) ( Page 8 of 27
Formula o finish this section, we stat Formula 4 which pertains to the diophantine system ormula and ( ) ( ) ( ) > cacbba > cba Assume , and let ( ) δ = ba , All the so lutions to the diophantine equation dczbyax =++ are given by the formulas, ( )( ) mzz naycmty nb ⎞⎛ xcmtx δ δδ+= ⎟⎠⎞⎜⎝⎛+−= ⎟⎠⎜⎝−−= here are integer-valued parameters, W nm , ( ) , yx is a solution to the linear diophantine equation ;1 =⎟⎠⎞⎛⎞⎛ ba ⎜⎝+⎟⎠⎜⎝ yx δδ and ( ) , zt is a solution to the linear diophantine equation dczt =+ δ . Tmentioned in the introduction. F ssume that at most one of the six integers is zero and =++ =++ here and are also integers. i. a A ,,,,, cbacba consider the linear diophantine system dzcybxa dzcybxa W d d If bba cc εεε =∧=∧= where = ε or -1, then the above equation has solutions if, and only if, ; dd ε = that is, if dd ε ≠ , the solution set is the empty set; while for dd ε = , the solution set to the above system is equal to the solution set of the linear diophantine equation dzcybxa =++ which can be solved with the aid of Formulas 1,2 or 3; provided that ( ) ,, cba is a divisor of d (otherwise there are no solutions); if , ba or c happens to be zero, refer to the Special Cases section. one of Page 9 of 27
Page 10 of 27 ii. Assume that at least one of the conditions ,, ccbbaa εεε ≠≠≠ holds true as well as ( ) ,, cba = ( ) = cba . Let be the determinants respectively, of the 2x2 matrices DDDD ,,, ⎥⎦⎤⎢⎣⎡⎥⎦⎤⎢⎣⎡⎥⎦⎤⎢⎣⎡⎥⎦⎤⎢⎣⎡
22 1122 1122 1122 11 ,,, cd cdca cacb cbba ba : ,, cacaDcbcbDbabaD −=−=−= and cdcdD −= . D and can not both be zero (see Explanations and Proofs section) and so we can define, D ( ) ⎟⎟⎠⎞⎜⎜⎝⎛== ⋅ ,, cDDcandDDD δ Under the condition ≠ c (see notes 1 and 2 below). The above diophantine system will have solutions (i.e. a nonempty solution set) only if both conditions, stated below, are satisfied: Condition 1:
The integer divides (or is a divisor of) the integer D D Condition 2: δ is a divisor of the integer ybxad −− , for any solution ( ) to the linear diophantine equation , yx DyDxD =+ (see note 3). If both conditions are met, the solution set to the above system can be described by, , λδ ⎟⎟⎠⎞⎜⎜⎝⎛⎟⎠⎞⎜⎝⎛+⎟⎟⎠⎞⎜⎜⎝⎛−= DDcmDDxx λδλδ ⎟⎟⎠⎞⎜⎜⎝⎛+=⎟⎠⎞⎜⎝⎛−⎟⎟⎠⎞⎜⎜⎝⎛+= DdczzcmDDyy , where λ is and integer-valued parameter and ( ) , zm is a solution to the linear diophantine equation, byaxdzcmDdc −−=+⎟⎟⎠⎞⎜⎜⎝⎛ (which will have solutions, by condition 1). Note 1:
Note that the number-fraction
Ddc is indeed an integer: an easy computation shows that,
DDcDDbDDa =⎟⎟⎠⎞⎜⎜⎝⎛+⎟⎟⎠⎞⎜⎜⎝⎛−
Obviously , both DD and DD are integers since is the greatest common divisor of and .Similarly, the numbers D D D δ c and δ ⎟⎟⎠⎞⎜⎜⎝⎛ DDc are both integers by the very definition of the integer δ . Note 2:
We may assume , since if it were ≠ c = c , cb ) ; by hypothesis, we know that at most one of the coefficient is zero and so by necessity we would have .We can simply rename the coefficients: become and conversely. ≠ c ,, cba , a Note 3:
With regard to Condition 1: It will either hold for every solution or for none; this will become evident in the Explanations and Proof section. ( , yx When one is faced with a specific linear diophantine equation (or system) of two, three, or more variables, one may solve it without applying any systematic general method or formulas; but if one follows a different path for solving the very same system one may end up with a different set of parametric formulas describing the same solution set. Assuming that no error occurred in the process, both sets of parametric formulas would be correct; the would be equivalent: one could, in a finite number of algebraic steps derive one from the other. We make this remark in light of the possibility that some readers may want to experiment and improvise with specific linear diophantine equations or systems and discover this fact in their own experience. 4 . Examples
Below we present seven examples. (cid:190)
Example 1 i. Find the solutions to the diophantine equation =−− zyx ii.
Determine the lattice points that lie on the plane described by the above equation and which also lie in the interior of or on the boundary of (sphere) the ball whose center is the origin (0,0,0) and whose radius is R=2.
Solution i) We are in the simplest of cases, namely those dealt with by Fromula 1. We solve for x to obtain x = 3y + 4z ; solution set , where are integer-valued parameters. ( ) ( nmnmzyxS ,,43,,: += ) nm , ii) For a point ( ) zyx ,, to lie inside or on the given ball, it is necessary and sufficient that its distance from the center not exceed R=2; since the center is the point (0,0,0), we must have, ≤++ zyx It follows that ( ) ⇔≤∧≤∧≤⇔≤ zyxzyx ( ) ≤≤−≤≤−≤≤−⇔ zyx
Page 11 of 27 hese conditions are necessary but not sufficient for a point ( ) zyx ,, to lie in or on the given ball.The locus that the last three inequalities describe, is the set of all points in space which lie inside or on the rectangular box whose boundary surface is a cube centered at (0,0,0) and whose edges have length 4. 4. The given ball is inscribed in that box. Applying part (i), we arrive at the necessary conditions, ( ) ≤≤−∧≤≤−∧≤+≤− nmnm . A quick search can be done systematically by picking a value of m(m=-2,-1,0,1,2) and checking to see whether there are values of n satisfying the first and the third inequalities. Seven points are produces: (-2,-2,1) , (2,-2,2), (1,-1,1) , (0,0,0) , (-1,1,-1) , (-2,2,-2) and (2,2,-1). However only three lie in or the given ball (actually all three lie inside the ball): (1,-1,1) , (0,0,0) , (-1,1,-1) (cid:190) Example 2
In how many ways can a person pay the amount of 80 cents using only dimes, nickels or quarters?
Solution
If x is the number of dimes, y the number of nickels, and z the number of quarters, we must have 10x + 5y + 25z = 80 ⇔
2x + y + 5z = 16. We are seeking the number of nonnegative solutions to the last diophantine equation; we must have which lead to the constraints zyx ,,0 ≤ ≤≤∧≤∧≤≤ zx . This is a Formula 1 case, solving the equation yields x = m , y=16 – 2m – 5n , z = n, where m and n are integer-valued parameters. Applying the constrains implies, ≤≤∧≤+≤∧≤≤ nnmm A search produces exactly twenty solutions; the triples (0,16,0),(0,11,1),(2,6,2),(0,1,3),(1,14,0),(1,9,1),(1,4,2),(2,12,0),(2,7,1),(2,2,2),(3,10,0),(3,5,1),(3,0,2),(4,8,0),(4,3,1),(5,6,0),(5,1,1,),(6,4,0),(7,2,0), and (8,0,0) Therefore there are exactly twenty ways of paying the given amount. (cid:190)
Example 3 i) Find the integer solutions to the equation 2x + 3y + 7z = 23 ii)
Find those lattice points that lie on the plane described by the equation of part (i) and in the interior space bounded by or on the cube which is described by the inequalities ≤≤−∧≤≤−∧≤≤− zyx . Page 12 of 27 olution i. Since (2,3) = (3,7) = (2,7) = 1, we can apply Formula 2 with more than one choice; we apply it with ( a,b ) = (2,3) = 1; in our case a = 2 , b = 3 , c = 7, and d = 23. All the solutions can be described by x = (23-7m) x - 3n, ∈=+−= nmwheremznymy ,,,2)723( Z are the two parameters and ( ) , yx is an integer solution to the equation 2 x + 3 y =1. By inspection, ( ) ( ) −= yx is solution. Hence, Solution set ( ) ( ) mnmnmzyxS ,2723,3723,,: +−−+−= . ii. We apply the constrains to the solutions we found: ( ) ⇔≤≤−∧≤+−≤−∧≤−+−≤− mnmnm ( ) ≤≤−∧≤−≤∧≤−≤⇔ mnmnm
A search shows that only m =2 , m=1 and m = 3 yield values of n that satisfy the first and second inequalities. Specifically for m =2 we obtain n = -3 and n = -4; while for m = 1 the values of n are only n = -6; and for m =3 those values of n are n = -1 and n = 0. Going back to the parametric formulas for x,y , and z we obtain exactly five points. ( x,y,z ) = (0,3,2) , (3,1,2) , (2,4,1) , ( 1,0,3) , (-2,2,3) The third point in the list lies in the interior space bounded by the cube, whereas the other four lie on the cube itself. (cid:190) Example 4
Find the solutions to the diophantine equation 6 x – 15 y + 10 z = 4. Solution
We have a = 6 , b = -15 , c = 10 , d = 4 thus ( a,b,c ) = 1. Since > cba , and ( ) ( ) ,15,,13, >=>= cbba ( ) >= ca , the relevant formula to use is Formula 3. First we need to find an integer solution ( ) , yx to the linear equation =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛ δδ bxa , where ( ) == ba δ . By inspection the equation 2 x – 5 y = 1 has a solution ( ) , yx = ( ) . Next we find and integer solution is a solution. Applying the parametric formulas in Formula 3 we obtain, ( ) ( −= zt ) Solution set S:( x,y,z ) = (-6 - 30 m + 5 n , -2 – 10 m + 2 n , 1 + 3 m ), with m ,n ∈ Z Check: 6 (-6 – 30 m + 5 n ) -15 (-2 – 10 m + 2 n ) + 10(1 + 3 m ) = 4 Page 13 of 27 (cid:190)
Example 5 x - 4 y + 3 z = 30 Find the solutions to the linear diophantine system 3 x + 6 y – 2 z = 25 Solution
We have =−=====−== dcbadcba . Note that ) c and all the coeff ,,, cba are nonzero. Also, obviously, the requir ,,1,, bacba == icients ,, cba ement that ( ) ( ba ±≠ o b ± r a ≠ or ba ±≠ is satisfied, so we can apply Formula 4, part (ii). We compute the four determinants to find , , , = D −= D −= D −= D . Also, ( ) ( ) =−−== DDD and ⎟⎟⎠⎞⎜⎜⎝⎛ ⋅=
123 11 , cD Dc δ = ((3) (48),3)=3. We check the two conditions: Condition 1 : obviously divides D = -135. So this condition is also satisfied. = D Condition 2 : First we find a solution ( ) , yx to the equation -21x – 10y = - 135 21x + 10y = 135; ⇔ ( ) , yx =(5,3) is a solution. We compute, which is divisible by =−− ybxad δ = 3; so the condition is satisfied. Thus, the system has solutions. To find them, we must find a solution ( ) , zm linear equation, to the ( ) ybxadzcmD Dc +−=+⎟⎟⎠⎞⎜⎜⎝⎛ ⋅ ; 144m + 3z = 12 48m + z = 4; an obvious solution is ⇔ ( ) )4,0(, = zm . Applying this together with the other information we already have to the formulas in Formula 4. we find, Solution set ∈++−= λλλλ );484,213,105(),,(: zyxS Z Check: ( ) ( ) ( ) ++−− λ + λ =λ
And ( ) ( ) ( ) =+−++− λλλ
Page 14 of 27 (cid:190)
Example 6
Solve the diophantine system 13 x + 11 z = 123 -5 y + 7 z = 4 Solution
Observe that this system falls in the category of the Special Cases section since two of the six coefficients , are zero, namely and . We can solve this system by first finding the general solution to the second equation and substituting (for y) into the first equation. By inspection a ,,,, cbacb b a == zy is a solution to the second equation. The general solution can be given by, ∈−=−= λλλ ;52,72 zy Z Substituting into the first equation gives ( ) =−⇔=−+ λλ xx To find a solution ( , ) λ x to the last equation, we solve for x: we have 13103741310155 +++=+= λλλ x Let t = 3 1343 101313103 −+−=−=⇔+ ttt λλ An obvious solution to the last equation is λ== t Thus =++=+++= λλ x We conclude that ( ) ( = ) λ x is a solution to the linear diophantine equation =− λ x . Hence all integer solutions to the last equation are given by x=12-(-55) m and λ =1 + 13m. We substitute for λ in the previous equations for y and z to find. Solution set S: (x,y,z) = (12+55m , 5-91m , -3-65m). Check: 13(12+55m) + 11 (-3-65m) = 123 and -5 (-5-91m) +7(-3-65m) = 4 (cid:190) Example 7
Let p be a positive integer. i)
Describe the set of all triples (x,y,z) with the two properties, 1.
The sum of the three integers x,y,z is equal to p, and 2.
The integers 7x , 5y, 3z (in that order) are successive terms of an arithmetic progression.
Page 15 of 27 i) What condition must p satisfy in order that x,y,z be positive integers? iii)
Find the smallest value of p for which x,y,z are positive integers. iv)
What conditions must p satisfy in order that x,y,z be the side lengths of a triangle? v)
For p = 85 find those triples (x,y,z) with x,y,z>0. Which of those triples correspond to a triangle with x,y,z being the side lengths?
Solution i) if the numbers 7x , 5y , 3z are consecutive terms of an arithmetic progression, the middle term must be the average of the other two. Thus we obtain the diophantine system pzyx =++ ( ) yxpz +−= ⇔ ⇔ ( ) zxy += =+− zyx )( yxpz +−= )( yxpz +−= ⇔ ( ) [ ] =+−+− yxpyx ⇔ pyx =+− In the last system, we solve the second equation for x to obtain 433 pyyx −+= ; clearly, is a solution, and so all the solutions to the second linear diophantine equation are given by and ( ) ( ppyx = ) mpx −= mpy −= , where m is an integer-valued parameter. Substituting back in the first equation (of the last system above) for z we find that, Solution set ( ) ( ) ∈+−−−= mmpmpmpzyxS ,1711,43,139,,: Z ii) Setting ( ) ⇔>∧>∧> zyx ( ) ⇔>+−∧>−∧>−⇔ mpmpmp ⇔⎟⎠⎞⎜⎝⎛ <∧<∧<⇔ pmpmpm pmpandpce <<⎟⎠⎞⎜⎝⎛ <<>⇔ is the necessary and sufficient condition for x,y and z to be positive integers. What this really says is that in order for x,y and z to be positive integers it is necessary and sufficient that the open interval ⎟⎠⎞⎜⎝⎛= ppl (here we use standard precalculus/ calculus notation) contain at least one integer m . For each such value of the parameter m , a positive integer triple ( x,y,z ) will be generated. p Page 16 of 27 ii)
An easy calculation show that p = 3 is the smallest value of the (positive) integer p for which the interval p l contains an integer. For p = 3 , =⎟⎠⎞⎜⎝⎛== mll p is the only integer that falls in l . For p = 3 and m = 2 the formulas part (i) produce ( x,y,z ) = (1,1,1). iv) If ( x,y,z ) corresponds to a triangle, the three triangle inequalities must be satisfied: ) yz > ( xxzyzyx ++ > ∧∧>+ . Note that these three inequalities alone imply >∧>∧> zyx ( for example, add the first two inequalities member wise to obtain > x ). This means that we should obtain an interval (that depends on p ) which must contain at least one integer, and which is a subinterval of the interval obtained in part (ii). Indeed, using the above three triangles inequalities and parametric formulas for x,y,z ( in part (i) we now have, ( ) ⇔−>+−∧−>+−∧−−<− mpmpmpmpmpmp ⇔⎟⎠⎞⎜⎝⎛ >∧>∧>⇔ pmpmpm pmpandpce <⎟⎠⎞⎜⎝⎛ <<>⇔ . We see that the necessary and suff or ( x,y,z ) to correspond to icient condition fa triangle is that the open interval ⎟⎠⎞⎝ p te as expected, that since ⎜⎛= pJ p contain and integer. No 139342326171711 <<< , the interval lies entirely ithin (the interval in part (ii)). v) For p J p l w ⎟⎠⎞⎜⎝⎛=⇔= lp and ⎟⎠⎞⎝ ⎜⎛= ,1445 J . Also since 5.5734,569.5526,846.5813,5517 ≈≈≈= , we see that the internal l contains three integers; the integers m = 19551445765935 56,57,58; whereas the interval contains two integers, namely m = 56,57. ormulas in part (i) we find that, J Substituting for p = 85 and m = 56,57,58 in the f ( x,y,z ) = (37,31,17) , (24,27,34) , (11,23,51) Page 17 of 27 he first two triples correspond to a triangle, but the third one does not since 11 + 23 = 34 is in fact less than 51; this is as expected by virtue of the fact that the integer 58 does not lie within the interval J . Also note that in part (iii) where we found that for p = 3, there is one positive integer triple ( x,y,z ), namely ( x,y,z ) = (1,1,1); we see that p = 3 is lso the smallest value of p for which a triple ( x,y,z ) corresponds to triangle; which for p f side lengthe 1. Of Formula 1 uch to show here, one simply solves for the variable whose coefficient is 1 or - ntine equatioa= 3 is the equilateral triangle o 5.
Explanations and Proofs 1.
Not m1. Of formula 2
We only need explain the derivation of Formula 2 in the case ( a,b ) = 1. Since ( a,b ) =, the linear diopha n ax + by = 1 has solutions, let ( ) be a particular , yx =+ byax ( ) [ ] ( ) [ ] cmdycmdbxcmdabyax = −−+−⇔=+ , which shows that the pair ( )( ) )(, ycmdxcmd −− so u o the linear diophantine equation ax + by =d – cm. Consequently, all the integer solutions of the last equation are given by is a l tion t ( ) ( ) ∈+−=−−= nanycmdybnx ,, Z . But the initial diophantine equation by + cz = d is obviously equivalent to ( ) dbyax cmdx ax + Zmmzcz ∈=∧−=+ , ons to the initial equation re given by ( ) . Hence all the soluti ( ) mzanycmdybnxcmdx =+−=−−= a ,, , where m,n are integer-We are done. + by = d valued parameters. Of Formula 3
The diophantine equation ax + by + cz = d is equivalent to ax – cz . Since δ is the greatest common divisor of a and b , we must have ⎟⎠ and ⎞⎜⎝⎛= δδ aa ⎟⎠⎞⎜⎝= δδ b ⎛ b , where the integers δ a =⎟⎠⎞⎜⎝⎛ δδ ba and δ b . We see that, are relatively prime; that is, ⇔−=⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛⇔−=+ czdbxaczdbyax δδδδ czdybxa −=⎥⎦⎤⎢⎣⎡ ⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛⇔ δδδ δ Clearly the last equation will have solutions if, and only if, is divisor of d-cz . Evidently the original equation is equivalent to the system of diophantine equations,
Page 18 of 27 ⇔ ( ) )2(1 dczt tybxa =+ =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛δ δδ czdt t ybxa −= =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛δ δδ e variables being x,y,z and t . Observe th th at each equation in the last system has solutions: the first has solutions since =⎟⎠⎞⎜⎝⎛ δδ ba ( ) ( . The second equation has solutions as well by virtue of )( ) ( ) === cbacbac δ , which is true by hypothesis. If ( ) , yx is an integer solution =⎟⎠⎞⎜⎝⎠⎝ δ ⎛+⎟⎞⎜⎛ ybxa δ , then obviously ( ) ∈ ttytx ,, Z Furthermore, let ( ) , zt b , is a solution to equation (1). e a particular solution to (2); then all the integer solutions to quation (2) are given by ,, e Z t ∈+=−= mmzzcmt δ But for a given integer value of t, ( ) , tytx is particular solution to equation (1); therefore (1), while (2) also ho , can be described by all the integer solutions to equation lds true ;, ⎠⎝⎠⎝ δδ natyynbtxx ⎟⎞⎜⎛+=⎟⎞⎜⎛−= where ∈ n Z and cmtt −= . We conclude that the lution set to the original equation can be described by, so ( ) ( ) mzznaycmtynbxcmtx δδδ +=⎟⎠⎞⎜⎝⎛+−=⎟⎠⎞⎜⎝⎛−−= ,, ; Where m,n are integer-valued parameters, ( ) , yx is a particular solution to the linear diophantine equation =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛ ybxa δδ and ( ) , zt a particular solution to dczt =+ δ . 4.. Of Formula 4 can not be both zeri)
This part is obvious, it is self-explanatory. ii)
First note that the integers D and o: for if that were the case we would have cbcbcaca − D ==− ; then none of ,,,,, ccbbaa could be zero, since if one them were zero, o have to be zero (for example, if = a , then another would als =⇔=− cacaca , which is not allowed by hypothesis, since at most one of the six coefficients can be zero. Thus, all six coefficients would be nonzero and so we would have Page 19 of 27 cba cba == ; but also, ( ) () cc
12 2111 , cc cccc ′′= , where c ′ and c ′ are relatively prime integers (i.e. ) and ( ) =′′ cc ( ) , cc is the greatest common divisor of and thus, c c ; ccbbaa ′′== , which implies (see remark 2) b ( ) ,, cbccaca , ′=′=′=′= λλμμ , for some integers μ and λ ; we see that ( ) ,, cccbca ′= , cc ′=′= λμ and in view of the assu n that greatest common divisor c is equal to 1, we conclude =′ c or -1; Likewise the hypothesis m of and ptio , ba ( ) = cba implies =′ c or -1. Obviously there are four combinations of values of c ′ and ses c ′ but in all ca ε =′ c = ε ′ , where c or -1. Consequently, ( ) ccbbaaccccbbaa εεεε =∧=∧=⇒=′′=== , ontrary to the assumption of part (ii). reatest common divisor positive integer. We have, dczccybcxc dzcybxa −=−−− C It is now clear that at least one of D , D must be nonzero and therefore their D exists and is, of course, a g dzcybxa dzcybxa =++ =++ + + = ⇔ a ⇔ ≠ c ( c ⇔ times 1 eq.plus 2 ) order for equahat be a divisor of D, in other words, condition 1 must hold true. st nd )4( )3(
23 1111
DyDxD dzcybxa =+ =++
We see that in tion (4) to have integer solutions it is necessary and sufficient t ( ) , DDD = Page 20 of 27 f is an integer solution to equation (4), then all integer solutions to (4) are given by ),( yx ∈⎟⎟⎠⎞⎜⎜⎝⎛+=⎟⎟⎠⎞⎜⎜⎝⎛−= mmDDyymDDxx ,, Z + (5) Substituting for x and y in equation (4) yields, ),( ybxadzcmDDbDDa +−=+⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎟⎠⎞⎜⎜⎝⎛+⎟⎟⎠⎞⎜⎜⎝⎛− and since the quantity in the brackets in equal to DDc (see note 1) we arrive at )( ybxadzcmDDc +−=+⎟⎟⎠⎞⎜⎜⎝⎛ (6) It is clear that the original diophantine system is equivalent to the pair of equations (5) and (6) in the variables m and z . For equation (6) to have integer solutions, it is necessary and sufficient that ⎟⎟⎠⎞⎜⎜⎝⎛= , cDDc δ be a divisor of the integer ybxad ( +− ); in other words, condition 2 must hold true. The integer solutions to (6) given by, ,1, λδλδ ⎟⎟⎠⎞⎜⎜⎝⎛+=⎟⎠⎞⎜⎝⎛−= DDcmzczm where λ is an integer-valued parameter and a particular solution to (6). Substituting for m and z in (5) we find ),( zm , λ⎟⎟⎠⎞⎜⎜⎝⎛+⎟⎟⎠⎞⎜⎜⎝⎛−= DDzDDxx , λ⎟⎟⎠⎞⎜⎜⎝⎛+⎟⎟⎠⎞⎜⎜⎝⎛+= DDzDDyy ,1 λδ ⎟⎟⎠⎞⎜⎜⎝⎛+= DDcmz □ Page 21 of 27 emark 1 . Note the assumption ),,(1),,( cbacba == . Obviously if we are given a system of two linear diophantine equations in three variables, the first thing to do would be check whether the greatest common devisor of the coefficients of the unknowns in each equation divides the corresponding constant on the other side of the equation. If either equation fails the test, system has no integer solutions. If on the other hand, both equation pass the test, we reduce each equation the (by dividing both sides with ) so that we have )( dord i d == icba iii Remark 2 . In the explanations of formula 4 we made use of the following fact from number theory: if four non zero integers δγβα ,,, satisfy the conditions δγβα = and =δγ then )( δβγα kk =∧= for some nonzero integer k. Indeed δγβα = implies βγαδ = ; since γ is relatively prime to δ and γ divides the product αδ , it must divide α ;this fact from number theory is typically covered in the first 2 or 3 weeks of an introductory course in elementary number theory. We have γα k = for some non zero integer ; and from k δβγβγδγβγαδ kk =≠⇒=⇒= )0since()( .
6. Chart of Special Cases A. The linear diophantine equation cbyax =+ with = ab . i) If ,00 ≠= banda then the equation has no solution if b is not a divisor of c . If ,on the other hand b is a devisor of c then the solution set consists of all pairs of the form ⎟⎠⎞⎜⎝⎛ cbm , , where Z (all lattice points on the horizontal line ∈ m ) bcy = . ii) If ,00 =≠ banda there are no solutions if a is not a divisor of c ; otherwise (if a divides c ), solution set ∈= mmacyxS ),,(),(: Z (all lattice points on the vertical line acx = ) iii) If there are no solutions unless == ba = c , in which case the solution set consist of all lattice points on the plane. Namely, ∈= nmnmyxS ,),,(),(: Z B. The linear diophantine equation dczbyax =++ with = abc . Let [ be the matrix of the coefficients. In each group below, we only present the solution for the first (as viewed from left to right) matrix (of the coefficients) in the group. The others are treated similarly. ] cba Page 22 of 27 i) Group
1: Exactly one of the coefficients is zero. Possible matrices are [ ] , , . cb [ ] ca [ ] ba [ : The equation describes a plane which is parallel to or contains the x -axis. If does not divide d , there are no solutions. If, on the other hand ] cb ),( cb ),( cb = δ divides d , the solution set is given by ∈⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛−= nmnbzncymzyxS ,;,,),,(: δδ Z and a solution to ),( zy δδδ dzcyb =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛ . ii) Group
2: Two of the coefficients are zero. The third non zero [ ] a , [ ] , [ ] b c [ a ] : If a is not a divisor of d there are no solutions. If a does divide d , solution set ∈⎟⎠⎞⎜⎝⎛= nmnmadzyxS ,;,,),,(: Z . The equation describes a plane parallel or coincident to the yz - plane. iii) Group [ ] There are no solutions unless , in which case = d ∈= λλ ,,),,,(),,(: nmnmzyxS Z (all lattice points in space). C. The linear diophantine system , with at least two of the coefficients being zero. Matrix of coefficients is ⎭⎬⎫=++ =++ dzcybxa dzcybxa ,,,,, cbacba ⎥⎦⎤⎢⎣⎡
222 111 cba cba
1. Exactly two of the six coefficients are zero i) Group1: Two zeros in a column. ⎥⎦⎤⎢⎣⎡
22 11 cb cb , , ⎥⎦⎤⎢⎣⎡
22 11 ca ca ⎥⎦⎤⎢⎣⎡
22 11 ba ba ⎥⎦⎤⎢⎣⎡
22 11 cb cb : Each equation describes a plane that is parallel to or contains the x -axis. If or equivalently =− cbcb ccbb = ; then the system has no solutions unless ddccbb == , in which case the problemis reduced to the single equation with (see part B, case (i)). dczbyax =++ = a Page 23 of 27
If , there are no solutions unless the integer ( ) is a common divisor of the integers ( ≠− cbcb cbcb − cdcd − ) and )( dbbd − ;if that is the case, solution set ∈⎟⎟⎠⎞⎜⎜⎝⎛ −−−−= mcbcb cbbdcbcb cdcdmzyxS ,,,),,(: Z . ii) Group
2: Two zeros in a row. ⎥⎦⎤⎢⎣⎡
222 1 cba c ⎥⎦⎤⎢⎣⎡
222 1 cbaa ⎥⎦⎤⎢⎣⎡
222 1 cba b ⎥⎦⎤⎢⎣⎡ ccba ⎥⎦⎤⎢⎣⎡ a cba ⎥⎦⎤⎢⎣⎡ b cba ⎥⎦⎤⎢⎣⎡
222 1 cba c : The first equation describes a plane parallel to of coincident with xy plane. If is a not a divisor of , the system has no integer solutions. If is a divisor of , the system will have solutions only if c d c d ),( ba =δ is a divisor of the integer ⎟⎟⎠⎞⎜⎜⎝⎛− cdcd ; in that case all the solutions are given by, ,,,),,(: ⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛−= cdmaymbxzyxS δδ where is a solution to ),( yx δδδ ⎟⎟⎠⎞⎜⎜⎝⎛−=⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛ cdcdybxa . iii) Group
3: Two zeros not both on the same row or column. ⎥⎦⎤⎢⎣⎡
22 11 ca cb ⎥⎦⎤⎢⎣⎡
22 11 ba cb ⎥⎦⎤⎢⎣⎡
22 11 cb ca ⎥⎦⎤⎢⎣⎡
22 11 ba ca ⎥⎦⎤⎢⎣⎡
22 11 cbba ⎥⎦⎤⎢⎣⎡
22 11 ca ba ⎥⎦⎤⎢⎣⎡
22 11 ca cb : If ),( cb =δ is not a divisor of , the system will have no solutions .If d δ is a divisor of the system will have solutions only if d ⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎟⎠⎞⎜⎜⎝⎛= , δδ bca is a divisor of the integer , where can be any particular solution to ; if that is the case, the solution set to the system can be described by, zcd − ),( zy dzcyb =+ λδδδδδ ⎟⎟⎠⎞⎜⎜⎝⎛⎟⎟⎠⎞⎜⎜⎝⎛−⎟⎟⎠⎞⎜⎜⎝⎛−=⎟⎟⎠⎞⎜⎜⎝⎛−= ,1: accmyybcxxS ,and Page 24 of 27 δδδ ⎟⎟⎠⎞⎜⎜⎝⎛⎟⎟⎠⎞⎜⎜⎝⎛−⎟⎟⎠⎞⎜⎜⎝⎛+= abbmzz ,where is a solution to ),( mx zcdmbcxa −=⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎟⎠⎞⎜⎜⎝⎛+ δ and λ is an integer-valued parameter.
2. Exactly three of the six coefficients are zero i) The two of the three zeros are on the same column and two among them lie on the same row. Possible matrices: ⎥⎦⎤⎢⎣⎡
22 1 cb c ⎥⎦⎤⎢⎣⎡ cbb ⎥⎦⎤⎢⎣⎡ b cb ⎥⎦⎤⎢⎣⎡ ccb ⎥⎦⎤⎢⎣⎡
22 1 ca c ⎥⎦⎤⎢⎣⎡ caa ⎥⎦⎤⎢⎣⎡ a ca ⎥⎦⎤⎢⎣⎡
00 0 cca ⎥⎦⎤⎢⎣⎡
22 1 ba b ⎥⎦⎤⎢⎣⎡ baa ⎥⎦⎤⎢⎣⎡
00 0 a ba ⎥⎦⎤⎢⎣⎡
00 0 bba ⎥⎦⎤⎢⎣⎡
22 1 cb c : The first equation describes a plane parallel to or coincident with xy -plane; the second equation describes a plane parallel to or containing the x - axis. The system will have no solutions only if not a divisor of . If on the other hand, , the system will have solutions only if is a divisor of the integer c d | dc b ccdd ⎟⎟⎠⎞⎜⎜⎝⎛− . In that case, Solution set ⎟⎟⎟⎟⎠⎞⎜⎜⎜⎜⎝⎛ −=
112 2112 ,,),,(: cdb ccddmzyxS ii) Two among the three zeros lies on the same row, but no two lie on the same column. Possible matrices: ⎥⎦⎤⎢⎣⎡
22 1 ba c ⎥⎦⎤⎢⎣⎡
22 1 ca b ⎥⎦⎤⎢⎣⎡ cba ⎥⎦⎤⎢⎣⎡
00 0 cba ⎥⎦⎤⎢⎣⎡
00 0 b ca ⎥⎦⎤⎢⎣⎡ a cb ⎥⎦⎤⎢⎣⎡
22 1 ba c : The first equation describes a plane parallel to or coincident with the xy -plane; the second equation describes a plane parallel to or containing the z -axis. If is not a divisor of , there are no solutions. If on the other hand, , the system will have solutions only if c d | dc |),( dba =δ . If that is the case, the solution set can be described by Page 25 of 27 ⎟⎟⎠⎞⎜⎜⎝⎛ ⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛−= mcdmaymbxzyxS ,,,),,(: δδ Z ; where is a solution to ),( yx δδδ dybxa =⎟⎠⎞⎜⎝⎛+⎟⎠⎞⎜⎝⎛ . iii) Three zeros on the row. ⎥⎦⎤⎢⎣⎡ cba ⎥⎦⎤⎢⎣⎡ cba ⎥⎦⎤⎢⎣⎡ cba : If there are no solutions, while if ≠ d = d , the system is reduced to with dzcybxa =++ ≠ cba ,which has already been covered by Formulas 1,2 or 3. 3. Exactly four of the six coefficients are zero i) Group ⎥⎦⎤⎢⎣⎡
00 00 cc ⎥⎦⎤⎢⎣⎡
00 00 bb ⎥⎦⎤⎢⎣⎡
00 00 aa : There are solutions only if and ; if so, there are solutions only if ⎥⎦⎤⎢⎣⎡
00 00 cc | dc | dc cdcd = ; if that is the case, Solution set ⎟⎟⎠⎞⎜⎜⎝⎛= ,,),,(: cdnmzyxS ,where ∈ nm , Z (lattice points on the plane cdz = ). ii) Group ⎥⎦⎤⎢⎣⎡ a c ⎥⎦⎤⎢⎣⎡
00 00 ca ⎥⎦⎤⎢⎣⎡ a c ⎥⎦⎤⎢⎣⎡ a c : The first equation described a plane parallel to or coincident with the xy -plane, while the second equation describes a plane parallel to or coincident with yz -plane. There are solutions only if and in which case, solution set | dc | da ⎟⎟⎠⎞⎜⎜⎝⎛= ,,),,(: dcmadzyxS ; Z ∈ m iii) Group ⎥⎦⎤⎢⎣⎡ cb ⎥⎦⎤⎢⎣⎡ ca ⎥⎦⎤⎢⎣⎡ ba ⎥⎦⎤⎢⎣⎡ cb ⎥⎦⎤⎢⎣⎡
000 0 ca ⎥⎦⎤⎢⎣⎡
000 0 ba Page 26 of 27 ⎦⎤⎢⎣ cb : If there are no solutions. If ⎡ ≠ d = d , the case reduces to part B(i). iv) Exactly five of the six coefficients are zero
00 000 c
00 000 c : If there are no solutions. If ⎥⎦⎤⎢⎣⎡
00 000 b ⎥⎦⎤⎢⎣⎡
00 000 a ⎥⎦⎤⎢⎣⎡
000 00 c ⎥⎦⎤⎢⎣⎡
000 00 b ⎥⎦⎤⎢⎣⎡
000 00 a ⎥⎦⎤⎢⎣⎡ ⎥⎦⎤⎢⎣⎡ ≠ d = d , the case reduces to part B(ii). . All coefficients are zero ⎢⎣
000 or is non zero, there are no solutions. If 5 ⎤⎡
000 : If either ⎥⎦ d d == dd , solution set in other words each lattice point in space is a eferences ] Kenneth Rosen, Elementary Number Theory with Applications, 2 nd edition, Prentice ] William J. Gilbert & Scott A. Vanstone, Classical Algebra, Waterloo University ( ) solution. knmzyxS ,,),,(: = ; knm ,, R [1Hall. [2Press.[1Hall. [2Press.