Sideway
output.to from Sideway
`-=[]โŸจโŸฉ\;',./~!@#$%^&*()_+{}|:"<>? ๐‘Ž๐‘๐‘๐‘‘๐‘’๐‘“๐‘”โ„Ž๐‘–๐‘—๐‘˜๐‘™๐‘š๐‘›๐‘œ๐‘๐‘ž๐‘Ÿ๐‘ ๐‘ก๐‘ข๐‘ฃ๐‘ค๐‘ฅ๐‘ฆ๐‘ง ร…โ€‰โˆ’โ€‚ร—โ€ƒโ‹…โˆ“ยฑโˆ˜๊žŠ๏นฆโˆ—โˆ™ โ„ฏ ๐”ธ๐”นโ„‚๐”ป๐”ผ๐”ฝ๐”พโ„๐•€๐•๐•‚๐•ƒ๐•„โ„•๐•†โ„™โ„šโ„๐•Š๐•‹๐•Œ๐•๐•Ž๐•๐•โ„ค๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐‘€๐‘๐‘‚๐‘ƒ๐‘„๐‘…๐‘†๐‘‡๐‘ˆ๐‘‰๐‘Š๐‘‹๐‘Œ๐‘ โˆผโˆฝโˆพโ‰โ‰‚โ‰ƒโ‰„โ‰…โ‰†โ‰‡โ‰ˆโ‰‰โ‰Œโ‰โ‰ โ‰ก โ‰คโ‰ฅโ‰ฆโ‰งโ‰จโ‰ฉโ‰ชโ‰ซ โˆˆโˆ‰โˆŠโˆ‹โˆŒโˆ โŠ‚โŠƒโŠ„โŠ…โІโЇ ๐›ผ๐›ฝ๐›พ๐›ฟ๐œ€๐œ๐œ‚๐œƒ๐œ„๐œ…๐œ†๐œ‡๐œˆ๐œ‰๐œŠ๐œ‹๐œŒ๐œŽ๐œ๐œ๐œ‘๐œ’๐œ“๐œ” โˆ€โˆ‚โˆƒโˆ…โฆฐโˆ†โˆ‡โˆŽโˆžโˆโˆดโˆต โˆโˆโˆ‘โ‹€โ‹โ‹‚โ‹ƒ โˆงโˆจโˆฉโˆช โˆซโˆฌโˆญโˆฎโˆฏโˆฐโˆฑโˆฒโˆณ โˆฅโ‹ฎโ‹ฏโ‹ฐโ‹ฑ โ€– โ€ฒ โ€ณ โ€ด โ„ โ— สน สบ โ€ต โ€ถ โ€ท ๏น ๏น‚ ๏นƒ ๏น„ ๏ธน ๏ธบ ๏ธป ๏ธผ ๏ธ— ๏ธ˜ ๏ธฟ ๏น€ ๏ธฝ ๏ธพ ๏น‡ ๏นˆ ๏ธท ๏ธธ โœ   โ   โŽด  โŽต  โž   โŸ   โ    โก โ†โ†‘โ†’โ†“โ†คโ†ฆโ†ฅโ†งโ†”โ†•โ†–โ†—โ†˜โ†™โ–ฒโ–ผโ—€โ–ถโ†บโ†ปโŸฒโŸณ โ†ผโ†ฝโ†พโ†ฟโ‡€โ‡โ‡‚โ‡ƒโ‡„โ‡…โ‡†โ‡‡ โ‡โ‡‘โ‡’โ‡“โ‡”โ‡Œโ‡โ‡โ‡•โ‡–โ‡—โ‡˜โ‡™โ‡™โ‡ณโฅขโฅฃโฅคโฅฅโฅฆโฅงโฅจโฅฉโฅชโฅซโฅฌโฅญโฅฎโฅฏ
Draft for Information Only

Content

Classical Linear Diophantine Equation
โ€ƒLinear Diophantine Equation
โ€ƒLinear Bivariate Diophantine Equation
โ€ƒTheorem A
โ€ƒโ€ƒProof of A.1
โ€ƒโ€ƒโ€ƒEuclidean Algorithm
โ€ƒโ€ƒโ€ƒExtended Euclidean Algorithm
โ€ƒโ€ƒโ€ƒ For example
โ€ƒโ€ƒProof of A.2
โ€ƒโ€ƒProof of A.3
โ€ƒTheorem B
โ€ƒโ€ƒProof of B

Classical Linear Diophantine Equation

Source: An Introduction to Diophantine Equations - A Problem-Based Approach

Linear Diophantine Equation

A linear Diophantine equation is a first-degree equation of the form
aโ‚xโ‚+aโ‚‚xโ‚‚+โ€ฆ+aโ‚™xโ‚™=c
where aโ‚, aโ‚‚, โ€ฆ, aโ‚™, c are fixed integers
in which nโ‰ฅ1 and coefficients aโ‚, aโ‚‚, โ€ฆ, aโ‚™ are all different from zero.

Linear Bivariate Diophantine Equation

A linear bivariate Diophantine equation is a first-degree equation with two variables of the form
ax+by=c
where a, b, c are fixed integers
in which coefficients a, b are all different from zero.

Theorem A

Let a, b, c be integers, a and b nonzero. Consider the linear Diophantine equation.
ax+by=c

  1. The equation is solvable in integers if and only if d=gcd(a,b) divides c.
  2. If (x,y)=(xโ‚€,yโ‚€) is a particular solution to the equation, then every integer solution is of the form
    x=xโ‚€+(b/d)t, y=yโ‚€-(a/d)t where t is an integer.
  3. If c=gcd(a,b) and |a| or |b| is different from 1, then a particular solution (x,y)=(xโ‚€,yโ‚€) to (xโ‚€+(b/d)t, yโ‚€-(a/d)t) can be found such that |xโ‚€|<|b| and |yโ‚€|<|a|.

Proof of A.1

For ax+by=c
Since d=gcd(a,b), d divide a and b.
โ‡’(ax+by)/d=c/dโ‡’(a/d)x+(b/d)y=c/d

If d does not divide c then the equation is not solvable in integers since c/d is alway not an integer.

If d divides c then the equation is solvable in integers since c/d is alway an integer.

After dividing both sides of the equation by d/c,
โ‡’(ax+by)/(c/d)=c/(c/d)โ‡’a(dx/c)+b(dy/c)=dโ‡’a(x/c)+b(y/c)=1
the equation can then be solved by extended Euclidean algorithm.

Suppose u and v are two integers for which u>v and gcd(u,v)=d. From Euclidean algorithm, assume u=vq+r for integers u, v, q, and r.
If v|u, then gcd(u,v)=d=v and r=0.
If vโˆคu, then gcd(u,v)=d and rโ‰ 0.
โ‡’u/d=(vq+r)/dโ‡’u/d=(v/d)q+r/dโ‡’gcd(u,v)=gcd(v,r)=d
In other words, r is always divided by d.

Euclidean Algorithm

Through Euclidean algorithm, a larger integer, u can be broken down into two parts, with one part is the multiple, q of the smaller integer, v and the other part is the remainder, r. Since the remainder is always less than the smaller integer and be divided by d also. Therefore the gcd of two integers, u and v can be determined by repeating the mechanism of Euclidean algorithm with v and r systematically until the remainder equals to 0.

  • u=vqโ‚€+rโ‚€; 0โ‰คrโ‚€<v
  • v=rโ‚€qโ‚+rโ‚; 0โ‰คrโ‚<rโ‚€
  • rโ‚€=rโ‚qโ‚‚+rโ‚‚; 0โ‰คrโ‚‚<rโ‚
  • rโ‚=rโ‚‚qโ‚ƒ+rโ‚ƒ; 0โ‰คrโ‚ƒ<rโ‚‚
  • โ‹ฎ
  • rโ‚™โ‚‹โ‚„=rโ‚™โ‚‹โ‚ƒqโ‚™โ‚‹โ‚‚+rโ‚™โ‚‹โ‚‚; 0โ‰คrโ‚™โ‚‹โ‚‚<rโ‚™โ‚‹โ‚ƒ
  • rโ‚™โ‚‹โ‚ƒ=rโ‚™โ‚‹โ‚‚qโ‚™โ‚‹โ‚+rโ‚™โ‚‹โ‚; 0โ‰คrโ‚™โ‚‹โ‚<rโ‚™โ‚‹โ‚‚
  • rโ‚™โ‚‹โ‚‚=rโ‚™โ‚‹โ‚qโ‚™+rโ‚™ where rโ‚™=0

The mechanism of Euclidean algorithm eventually terminates, since the remainders get smaller and smaller and end at zero. that is
v>rโ‚€>rโ‚>rโ‚‚>rโ‚ƒ>โ€ฆ>rโ‚™โ‚‹โ‚„>rโ‚™โ‚‹โ‚ƒ>rโ‚™โ‚‹โ‚‚>rโ‚™โ‚‹โ‚>rโ‚™=0

 Since rโ‚™=0, rโ‚™โ‚‹โ‚ divides rโ‚™โ‚‹โ‚‚ , therefore Euclidean algorithm also assure that
d=gcd(u,v)=gcd(v,rโ‚€)=gcd(rโ‚€,rโ‚)=gcd(rโ‚,rโ‚‚)=โ€ฆ=gcd(rโ‚™โ‚‹โ‚„,rโ‚™โ‚‹โ‚ƒ)=gcd(rโ‚™โ‚‹โ‚ƒ,rโ‚™โ‚‹โ‚‚)=gcd(rโ‚™โ‚‹โ‚‚,rโ‚™โ‚‹โ‚)=rโ‚™โ‚‹โ‚

Extended Euclidean Algorithm

The gcd(u,v) can then be determined through extended Euclidean algorithm as an integer combination of a and b. That is gcd(u,v)=ux+vy=d in which d is one of the remainders from Euclidean Algorithm. Rearranging equations from Euclidean Algorithm

  • rโ‚€=u-vqโ‚€โ‡’xโ‚€=1, yโ‚€=-qโ‚€
  • rโ‚=v-rโ‚€qโ‚=-rโ‚€qโ‚+v=-(u-vqโ‚€)qโ‚+v=-uqโ‚+vqโ‚€qโ‚+v=-uqโ‚+v(1+qโ‚€qโ‚)โ‡’xโ‚=-qโ‚, yโ‚=(1+qโ‚€qโ‚)
  • rโ‚‚=rโ‚€-rโ‚qโ‚‚=(u-vqโ‚€)-(-uqโ‚+v(1+qโ‚€qโ‚))qโ‚‚=u(1+qโ‚qโ‚‚)-v(qโ‚€+(1+qโ‚€qโ‚)qโ‚‚)โ‡’xโ‚‚=1+qโ‚qโ‚‚, yโ‚‚=-(qโ‚€+(1+qโ‚€qโ‚)qโ‚‚)
  • rโ‚ƒ=rโ‚-rโ‚‚qโ‚ƒ=(-uqโ‚+v(1+qโ‚€qโ‚))-(u(1+qโ‚qโ‚‚)-v(qโ‚€-(1+qโ‚€qโ‚)qโ‚‚))qโ‚ƒ=-u(qโ‚-(1+qโ‚qโ‚‚))+v((1+qโ‚€qโ‚)-(qโ‚€-(1+qโ‚€qโ‚)qโ‚‚))qโ‚ƒ) โ‡’xโ‚ƒ=-(qโ‚+(1+qโ‚qโ‚‚)), yโ‚ƒ=((1+qโ‚€qโ‚)-(qโ‚€-(1+qโ‚€qโ‚)qโ‚‚))qโ‚ƒ)
  • โ‹ฎ
  • rโ‚™โ‚‹โ‚=rโ‚™โ‚‹โ‚ƒ-rโ‚™โ‚‹โ‚‚qโ‚™โ‚‹โ‚=gcd(u,v)
  • rโ‚™=rโ‚™โ‚‹โ‚‚-rโ‚™โ‚‹โ‚qโ‚™=0

Define the integers xโ‚– and yโ‚– recurively by

  • xโ‚–=xโ‚–โ‚‹โ‚‚-xโ‚–โ‚‹โ‚qโ‚– where xโ‚‹โ‚‚=1; xโ‚‹โ‚=0
  • yโ‚–=yโ‚–โ‚‹โ‚‚-yโ‚–โ‚‹โ‚qโ‚– where yโ‚‹โ‚‚=0; yโ‚‹โ‚=1

Therefore the variables xโ‚– and yโ‚– can be determined in terms of qโ‚–

  • xโ‚€=xโ‚‹โ‚‚-xโ‚‹โ‚qโ‚€=(1)-(0)qโ‚€=1;  yโ‚€=yโ‚‹โ‚‚-yโ‚‹โ‚qโ‚€=(0)-(1)qโ‚€=-qโ‚€
  • xโ‚=xโ‚‹โ‚-xโ‚€qโ‚=(0)-(1)qโ‚=-qโ‚;  yโ‚=yโ‚‹โ‚-yโ‚€qโ‚=(1)-(-qโ‚€)qโ‚=1+qโ‚€qโ‚
  • xโ‚‚=xโ‚€-xโ‚qโ‚‚=(1)-(-qโ‚)qโ‚‚=1+qโ‚qโ‚‚;  yโ‚‚=yโ‚€-yโ‚qโ‚‚=(-qโ‚€)-(1+qโ‚€qโ‚)qโ‚‚=-qโ‚€-(1+qโ‚€qโ‚)qโ‚‚
  • xโ‚ƒ=xโ‚-xโ‚‚qโ‚ƒ=(-qโ‚)-(1+qโ‚qโ‚‚)qโ‚ƒ;  yโ‚ƒ=yโ‚-yโ‚‚qโ‚ƒ=(1+qโ‚€qโ‚)-(qโ‚€-(1+qโ‚€qโ‚)qโ‚‚)qโ‚ƒ
  • โ‹ฎ

The variables xโ‚– and yโ‚– are always opposite in sign and changed alternately. The remainder rโ‚– can therefore be calculated from the equation rโ‚–=uxโ‚–+vyโ‚– accordingly. That is

  • rโ‚€=uxโ‚€+vyโ‚€
  • โ‹ฎ
  • rโ‚™โ‚‹โ‚=uxโ‚™โ‚‹โ‚+vyโ‚™โ‚‹โ‚=gcd(u,v)
  • rโ‚™=uxโ‚™+vyโ‚™=0โ‡’u/v=-yโ‚™/xโ‚™

Assume u=(u/gcd(u,v)) and v=(v/gcd(u,v)). Then

  • rโ‚€=(u/gcd(u,v))xโ‚€+(v/gcd(u,v))yโ‚€
  • โ‹ฎ
  • rโ‚™โ‚‹โ‚=(u/gcd(u,v))xโ‚™โ‚‹โ‚+(v/gcd(u,v))yโ‚™โ‚‹โ‚=1
  • rโ‚™=(u/gcd(u,v))xโ‚™+(v/gcd(u,v))yโ‚™=0โ‡’(u/gcd(u,v))/(v/gcd(u,v))=-yโ‚™/xโ‚™

Therefore |xโ‚™|=v/gcd(u,v) and |yโ‚™|=u/gcd(u,v). In other words, |xโ‚™โ‚‹โ‚|<v and  |yโ‚™โ‚‹โ‚|<u are always true unless n=0 and qโ‚€=1, that is unless u=v=1

  • u=vqโ‚€+rโ‚€โ‡’rโ‚€=u-vqโ‚€โ‡’xโ‚€=1, yโ‚€=-qโ‚€

For example

364x+110y=46

gcd(182*2,55*2)=gcd(364,110)=2

Euclidean algorithm

  • u=vqโ‚€+rโ‚€; 0โ‰คrโ‚€<vโ‡’364=110*3+34โ‡’qโ‚€=3, rโ‚€=34
  • v=rโ‚€qโ‚+rโ‚; 0โ‰คrโ‚<rโ‚€โ‡’110=34*3+8โ‡’qโ‚=3, rโ‚=8
  • rโ‚€=rโ‚qโ‚‚+rโ‚‚; 0โ‰คrโ‚‚<rโ‚โ‡’34=8*4+2โ‡’qโ‚‚=4, rโ‚‚=2
  • rโ‚=rโ‚‚qโ‚ƒ+rโ‚ƒ; 0โ‰คrโ‚ƒ<rโ‚‚โ‡’8=2*4+0โ‡’qโ‚ƒ=4, rโ‚ƒ=0

Extended Euclidean algorithm

The variables xโ‚– and yโ‚–

  • xโ‚€=1;  yโ‚€=-qโ‚€=-3
  • xโ‚=-qโ‚=-3;  yโ‚=1+qโ‚€qโ‚=1+3(3)=10
  • xโ‚‚=1+qโ‚qโ‚‚=1+3(4)=13;  yโ‚‚=-qโ‚€-(1+qโ‚€qโ‚)qโ‚‚=-3-(1+3(3))4=-43
  • xโ‚ƒ=-qโ‚-(1+qโ‚qโ‚‚)qโ‚ƒ=-3-(1+3(4))4=-55;  yโ‚ƒ=(1+qโ‚€qโ‚)-(qโ‚€-(1+qโ‚€qโ‚)qโ‚‚)qโ‚ƒ=(1+3(3))-(-3-(1+3(3))4)4=182

The equation of gcd(u,v)

  • rโ‚€=uxโ‚€+vyโ‚€=364(1)+110(-3)=364-330=34
  • rโ‚=uxโ‚+vyโ‚=364(-3)+110(10)=-1092+1100=8
  • rโ‚‚=uxโ‚‚+vyโ‚‚=364(13)+110(-43)=4732-4730=2
  • rโ‚ƒ=uxโ‚ƒ+vyโ‚ƒ=364(-55)+110(182)=20020-20020=0

The solutions from equation of gcd(u,v)

364(13)+110(-43)=2
โ‡’364(13)(23)+110(-43)(23)=2(23)
โ‡’364(299)+110(-989)=46
โ‡’108836-108790=46

Therefore solution to equation 364x+110y=46 is

(x,y)=(299,-989)
โ‡’(x,y)=(299+110t/2,-989-364t/2)=(299+55t,-989-182t)

Proof of A.2

Suppose f(x,y)=ax+by=c and gcd(a,b)=d

Since f(x,y)=c=ax+byโ‡’f(xโ‚€,yโ‚€)=axโ‚€+byโ‚€=c

Add and subtract (ab/d)/t

โ‡’f(xโ‚€,yโ‚€)=axโ‚€+(ab/d)/t-(ab/d)/t+byโ‚€=c

โ‡’f(xโ‚€,yโ‚€)=a(xโ‚€+(b/d)/t)+b(yโ‚€-(ab/d)/t)=c

Proof of A.3

If c=gcd(a,b) and |a| or |b| is different from 1, then a particular solution (x,y)=(xโ‚€,yโ‚€) to (xโ‚€+(b/d)t, yโ‚€-(a/d)t) can be found such that |xโ‚€|<|b| and |yโ‚€|<|a|.

From proof 1, the range of variables xโ‚– and yโ‚– are bounded such that, in general, |xโ‚€|<|b| and |yโ‚€|<|a|.

1=|xโ‚€|<|xโ‚|<|xโ‚‚|<|xโ‚ƒ|<โ€ฆ<|xโ‚™โ‚‹โ‚‚|<|xโ‚™โ‚‹โ‚|<|xโ‚™|=|v/gcd(u,v)|
|qโ‚€|=|yโ‚€|<|yโ‚|<|yโ‚‚|<|yโ‚ƒ|<โ€ฆ<|yโ‚™โ‚‹โ‚‚|<|yโ‚™โ‚‹โ‚|<|yโ‚™|=|u/gcd(u,v)|

Since c=gcd(a,b)>0,

If rk:n=0=0, then either a|b or b|a.

If rk:n>0=0, then gcd(a,b)=c exists.

Besides,since

  • u=vqโ‚€+rโ‚€โ‡’rโ‚€=u-vqโ‚€โ‡’xโ‚€=1, yโ‚€=-qโ‚€

 unless n=0 and qโ‚€=1, that is unless u=v=1

Theorem B

The equation aโ‚xโ‚+aโ‚‚xโ‚‚+โ€ฆ+aโ‚™xโ‚™=c where aโ‚, aโ‚‚, โ€ฆ, aโ‚™, c are fixed integers is solvable if and only if gcd(aโ‚, aโ‚‚, โ€ฆ, aโ‚™)|c

In case of solvability, one can choose n-1 solutions such that each solution is an integer linear combination of those n-1 solutions.

Proof of B

Let d= gcd(aโ‚, aโ‚‚, โ€ฆ, aโ‚™). If c is not divisible by d, then aโ‚xโ‚+aโ‚‚xโ‚‚+โ€ฆ+aโ‚™xโ‚™=c is not solvable. Since the left hand side of equation is divisble by d, while the right hand side is not.
aโ‚xโ‚+aโ‚‚xโ‚‚+โ€ฆ+aโ‚™xโ‚™=c
โ‡’(aโ‚xโ‚+aโ‚‚xโ‚‚+โ€ฆ+aโ‚™xโ‚™)/d=c/d
โ‡’(aโ‚/d)xโ‚+(aโ‚‚/d)xโ‚‚+โ€ฆ+(aโ‚™/d)xโ‚™=c/d

 


ยฉsideway

ID: 190300007 Last Updated: 3/7/2019 Revision: 0 Ref:

close

References

  1. B. Joseph, 1978, University Mathematics: A Textbook for Students of Science &amp; Engineering
  2. Wheatstone, C., 1854, On the Formation of Powers from Arithmetical Progressions
  3. Stroud, K.A., 2001, Engineering Mathematics
  4. Coolidge, J.L., 1949, The Story of The Binomial Theorem
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 9

Culture

Chinese 1097

English 339

Travel 38

Reference 79

Hardware 55

Computer

Hardware 259

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 290new

Unicode 504

HTML 66new

Common Color 1new

Html Entity (Unicode) 1new

Html 401 Special 1

CSS 65new

Selector 1

SVG 46

ASP.NET 270

OS 447new

MS Windows

Windows10 1new

.NET Framework 1

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 207new

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2026 Sideway . All rights reserved Disclaimers last modified on 06 September 2019