You are on page 1of 70

SMA3043 ELEMENTARY NUMBER THEORY

SEMESTER 1 2022/2023

DIVISIBILITY THEORY

PROF. MADYA DR ROHAIDAH MASRI


DR. NOR HAFIZAH MD HUSIN
THE DIVISION ALGORITHM

• The division algorithm is one of the first concepts relative to the operation of division.

• It is not actually an algorithm, but this is this theorem's traditional name.

Theorem 1 (Division Algorithm)

For any integers a & b, where bZ+, there exist unique integers q, r such that
a = bq + r 0rb.

Where.
a – dividend ; b – divisor
q – quotient ; r – remainder (in the division of a by b)

2
THE DIVISION ALGORITHM (Cont.)
Example.

If we divide 26 by 3, then we get a quotient of 8 and remainder of 2.


This can be expressed 26 = 3.8 + 2.
Eg:if we divide – 26 is by 3, then the remainder
It is a little trickier to see what is not – 2.
q and r should be if a < 0. however, the equation 26 = 3.8 + 2 can be used to our advantage:
– 26 = 3 (– 8) – 2 = [3 . (– 8) – 3] – 2 + 3 = 3(– 9) + 1

Therefore, q = –9 ; r = 1

Corollary 1

Let a, b  with b  0, then exist unique integers q and r such that


a = bq + r 0r|b|.

3
THE DIVISION ALGORITHM (Cont.)

Proof (Corollary 1):

(To show for a, b , b 0, a = bq + r , 0  r  | b | )

Consider b is negative.
Then,
|b|>0.
By Theorem 1,
 unique integers q’ & r such that,
a = | b |q’ + r 0r|b|

Note that,
| b | = - b , take q = - q’ in order to get a = bq + r , 0  r  | b | . 

4
THE DIVISION ALGORITHM (Cont.)

Example

Let b < 0, where b = -6 Note: 0  r < |-6| = 6

i. If a = 1 ,
then the division algorithm can be expressed as 1 = 0(-6) + 1 .

ii. If a = -2 ,
then the division algorithm can be expressed as – 2 = 1(-6) + 4 .

iii. If a = 61
then the division algorithm can be expressed as 61= (– 10)(-6) + 1 .

iii. If a = – 59
then the division algorithm can be expressed as – 59 = (10)(-6) + 1 .

5
THE DIVISION ALGORITHM (Cont.)
Application of Division Algorithm

1. The square of an integer leaves remainder 0 or 1 upon division by 4 .

If b = 2,
Then the possible remainder are : r = 0 and r = 1. (by D.A) Note: ( DA ) a = bq + r

When r = 0 ; a = 2q - even 0 r2


When r = 1 ; a = 2q + 1 - odd

If a2 ;
a2 = (2q)2 = 4q2 = 4k for some kZ

Or;
a2 = (2q + 1)2 = 4q2 + 4q + 1 = 4(q2 + q) + 1 = 4m + 1 for some mZ

6
THE DIVISION ALGORITHM (Cont.)
Application of Division Algorithm

Example. Example.

72 = 49 = 4(12) + 1 Write the square of 12, 15 and 21 in


terms of a = 4q + r where 0  r  2
52 = 25 = 4(6) + 1

62 = 36 = 4(9) + 0

2. The square of any an odd integer is of form (8k + 1).


Note that if b = 4,
Then the possible remainder are : r = 0, 1, 2, 3 (by D.A)

(cont.  )

7
DIVISION ALGORITHM (Cont.)
Application of Division Algorithm

In the division algorithm, any integers can be represented as one of four form:
• 4q
• 4q + 1 Odd
• 4q + 2
• 4q + 3 Odd

When we square the odd integers;

If (4q + 1)2 ;
(4q + 1)2 = 16q2 + 8q + 1 = 8(2q2 + q) + 1= 8k + 1 for some k= (2q2 + q) Z

Or;
(4q + 3)2 = 16q2 + 24q + 9 = 8(2q2 + 3q + 1) + 1= 8m + 1 for some m= (2q2 + 3q + 1) Z

8
THE DIVISION ALGORITHM (Cont.)
Application of Division Algorithm

Example.

Write the square of 15, 19 and 21 in terms of (8k + 1).

9
GREATEST INTEGER FUNCTION

Note:
Definition 1.
The greatest integer
function is very useful in
The greatest integer function for a real number x, denote by  x 
applications involving
the largest integer less than or equal to x, satisfying
data storage
x − 1   x   x and data transmission.

Notes:
•  x  = x if and only if x is an integer.
• If x is any real numbers, then x can be written as x =  x  + t where 0  t  1.

10
GREATEST INTEGER FUNCTION (Cont.)

Example.

9 
i. 2 = 
 4.5 
 = 4
 

 −9 
ii. 2 = 
 −4.5 
 = −5
 

iii. e  = 2.71828  = 2

iv.  −6  = −6

11
GREATEST INTEGER FUNCTION (Cont.)

Proposition 1

For x a real number and n integer:

i.  x + n  =  x  + n

 −  x  if  − x  =x
ii.  − x  = 
−  x  − 1 if  − x   x

 x    x  
iii. =
n   n  if n  1
   

12
GREATEST INTEGER FUNCTION (Cont.)

Facts:

Greatest integer function can be used to give explicit formulas for the
quotient and remainder in the division algorithm:
a  a 
q=  r = a−b 
b b

Example.

Given a = 22, b = 3, by using the greatest integer function give explicit formulas for
the division algorithm.

13
GREATEST INTEGER FUNCTION (Cont.)

Solution.

Given a = 22 , b = 3.

 22 
q =   = 7.33  = 7
3 
 22 
r = 22 − 3   = 22 − 3 7.33  = 22 − 3 ( 7 ) = 1
3 

Then, the division algorithm:


22 = 3(7) + 1

Exercise: Given a = 46, b = 3, by using the greatest integer function give explicit formulas for the division
algorithm.

14
DIVISORS AND MULTIPLES
Divisibility

Definition 2

Given two integers a and b we say a divides b if there is an integer c


such that b = ac. If a divides b, denoted by a | b . If a does not divide
b, denoted by That is
a | b  b = ac , cZ

We say, a is a divisor of b; a is a factor of b; or b is a multiple of a.

15
DIVISORS AND MULTIPLES
Divisibility

Example

i. Show that 4872 is divisible by 2.


ii. Determine whether 270 is divisible 4.

Solution:

i. Note that, 4872 is divisible by 2, since 4872 = 2 . 2436.


By definition 2,
a = 2; b = 4872 & c = 2436.
Therefore, 2 | 4872.

ii. Since there no xZ such that 270 = x . 4 ,


Then, by definition 2,
4 does not divide 270 @ 4 | 270

16
DIVISORS AND MULTIPLES (Cont.)
Divisibility

Theorem 2

Let a, b, c, d  Z. The following hold:


i. a | 0 , 1 | a and a|a
ii. a | 1 iff and a =  1

iii. If a | b and c | d then ac | bd


iv. If a | b and b | c then a | c
v. If a | b and b | a iff a =  b
vi. If a | b and b 0 then | a |  | b |

vii. If a | b and a | c then a | (bx + cy) for some x, y Z

17
DIVISORS AND MULTIPLES (Cont.)
Divisibility

Example.

Proof.

By Definition 2 (Divisibility)

By Definition 2 (Divisibility)

18
DIVISORS AND MULTIPLES (Cont.)
Divisibility

Example (Mathematical Induction Involving divisibility)

Using mathematical induction, show that:


8 | (52n + 7) for n  1 .

Solution:

Let S be a set of positive integers.


To show :
1. 1S
2. Assume kS , to show (k+1) S

19
DIVISORS AND MULTIPLES (Cont.)
Divisibility

1. To show 1S

For n = 1,
8 | (52(1) + 7)
= 8 | 32 Since 32 = 8(4) (from def. of divisible)

Then, 1S .

2. To show (k+1) S , if kS

Let kS.

Then, 8 | (52k + 7)
[To show 8 | (52(k+1) + 7) ]

20
DIVISORS AND MULTIPLES (Cont.)
Divisibility

8 | (52(k+1) + 7)
= 8 | (52k . 52 + 7)
= 8 | (52k . 52 + 7) + 7. 52 – 7 . 52

= 8 | 52 (52k + 7) + ( 7 – 7 . 52 )

Since 8 | (52k + 7) and 8 | -168 ; by theorem 2 (vii)

Then, 8 | (52(k+1) + 7).


(k+1)S.

Therefore, 8 | (52n + 7) for n  1 . 

21
DIVISORS AND MULTIPLES (Cont.)
Divisibility

Exercise (divisibility)

i. Using mathematical induction, show that:

ii. Prove that if a | b and a | c then a | (bx + cy) for some x, y Z

22
DIVISORS AND MULTIPLES (Cont.)
Common Divisors

Definition 3 (Common Divisor)

a is a common divisor of b and c if a | b and a | c for a, b, cZ

Notes:

• 1 is a common divisor of every integer.

• Every integer is a common divisor of b = c = 0.

23
DIVISORS AND MULTIPLES (Cont.)
Common Divisors

Example.

Determine the common divisors of 27 and 15. Justify your


answer.

Solution:

The possible divisors of 27: 1 , 3, 9, 27


The possible divisors of 15: 1, 3, 5, 15

Since 1 | 15 and 1 | 27 & 3 | 15 and 3 | 27


Then by definition 3 (definition of common divisor),
1 & 3 are common divisors of 27 and 15.

24
DIVISORS AND MULTIPLES (Cont.)
Common Divisors

Exercise.

Determine the common divisors of the following integers. Justify


your answer.
Answer:
i. 45 and 27. i. 1, 3, 9
ii. 1, 5
ii. 55 and 35 iii. 1, 2, 4, 12
iv. 1, 2, 7, 14
iii. 36 and 12

iv. 42 and 14

25
DIVISORS AND MULTIPLES (Cont.)
Greatest Common Divisors

Definition 4. (Greatest Common Divisor)

The greatest common divisor of two integers a and b, not both


zero, denoted by gcd (a, b) is the positive integer d satisfying the
following:

i. d | a and d | b
ii. If c | a and c | b then c  d

Note:

If c | a and c | b then c | d

26
DIVISORS AND MULTIPLES (Cont.)
Greatest Common Divisors

Example.

Determine the greatest common divisor of


the following:

i. – 12 and 30
ii. – 8 and – 36

Solution.

i. The positive divisors of – 12 are: 1, 2, 3, 4, 6, 12 and


the positive divisors of 30 are: 1, 2, 3, 5, 6, 10, 15, 30.
So, gcd (– 12, 30) = 6.

27
DIVISORS AND MULTIPLES (Cont.)
Greatest Common Divisors

Solution.

ii. The positive divisors of – 8 are 1, 2, 4, 8 and


the positive divisors of – 36 are: 1, 2, 3, 4, 6, 9, 12, 18, 36.
So, gcd (– 8, – 36) = 4.

Exercise.
Answer:
Determine the greatest common divisor of the following:
i. Gcd(45, 60) = 15
i. 45 and 60
ii. Gcd(– 9, 15) = 3
ii. – 9 and 15
iii. Gcd(36, 54) = 18
iii. 36 and 54

28
DIVISORS AND MULTIPLES (Cont.)
Greatest Common Divisors

Theorem 3.

Let a, b  Z, where a  0, b  0. Then there exist integers x and


y such that:
gcd (a, b) = ax + by .

Example.

i. gcd (– 12, 30) = 6 = (– 12) 2 + (30) 1


ii. gcd (–8, –36) = 4 = (–8) 4 + (–36) (–1) .

29
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime

Definition 5. (Relatively Prime)

Two integers a and b, not both zero, are said to be relatively prime
if gcd (a, b) = 1.

Example.

i. Since gcd(11, 36) = 1, then 11 and 36 are relatively prime.

ii. Since gcd(23, 52) = 1, then 23 and 52 are relatively prime.

30
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime

The following theorem characterizes relatively prime integers in terms of


linear combinations.

Theorem 4.

Let a, b  Z, not both zero. Then a and b are relatively prime if and only if
there exist integers x and y such that 1 = ax + by.

Proof. (next )

31
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime

Proof.
() Let a and b are relatively prime. (To show 1 = ax + by)

Then, gcd(a,b) = 1.
By Theorem 3, exist integers x, y such that
1 = ax + by .

() Let 1 = ax + by for x, yZ and d = gcd(a,b) (To show d = gcd(a,b) = 1)

Then, by definition 4, d | a and d | b.


Hence Theorem 2 yields d | (ax + by) or d | 1.

Since d is a positive integer, by Theorem 2, d = 1.


Then,
gcd(a,b) = 1 @ a and b are relatively prime. 

32
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime

Corollary 2. a/d and b/d are


a b said to be relatively
If gcd (a, b) = d, then gcd  ,  = 1. prime.
d d 

Example. Example.
Let a = – 8 , b = – 36 Let a = 4 , b = 6

We have gcd(– 8 , – 36) = 4 We have gcd(4 , 6) = 2


Then, Then,
 −8 −36  4 6
gcd  ,  = gcd ( −2, − 9 ) = 1 gcd  ,  = gcd ( 2,3 ) = 1
 4 4  2 2

33
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime

Note.

If a | c and b | c, is it always true that ab | c ?

No. For example, 4 | 36 and 6 | 36,


but 24 | 36

Corollary 3.

Let a, b c are integers.


If a | c and b | c, with gcd (a, b) = 1, then ab | c.

34
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime

Proof. (Corollary 3)

Let a | c and b | c, with gcd (a, b) = 1 (To show ab | c ).

Then, by definition 2 (divisible),


exist r, s Z such that
c = ar = bs ----------------- (1)
Since gcd (a,b) = 1, then, by Theorem 3;
1 = ax + by for some x, y in Z ------- (2)
Multiplying (2) by c;
c = c. 1 = c(ax + by) = acx + bcy ------- (3)
By substituting (1) into (3);
c = a(bs)x + b(ar)y
= ab(sx + ry) where (sx + ry)Z
Then, by definition 2,
ab | c.

35
DIVISORS AND MULTIPLES (Cont.)
Greatest Common Divisors

Note.

i. Given a, b  Z, not both zero. Then,


gcd (a, b) = gcd (– a, b) = gcd (a, – b) = gcd (–a, –b).

ii. Let a, b, c  Z, no two of which are zero, and d = gcd (a, b, c) .


Then:
d = gcd (gcd (a, b) , c)
= gcd (a, gcd (b, c))
= gcd (gcd (a, c) , b)

iii. For any integer k  0, gcd (ka, kb) = | k | gcd (a, b)

36
DIVISORS AND MULTIPLES (Cont.)
Euclid’s Lemma

Theorem 5. (Euclid’s Lemma)

If a | bc, with gcd (a, b) = 1, then a | c.

Proof.

Let a | bc, with gcd (a, b) = 1.


Then,
gcd (a, b) = 1 = ax + by (by Theorem 3)
By multiplying with c,
c = cax + cby ---------- (1)

Since a | bc,
we have, bc = ak. ------ (2)
So, (Cont. )

37
DIVISORS AND MULTIPLES (Cont.)
Euclid’s Lemma

Proof. (cont.)

By substituting (2) into (1);

c = cax + cby
= cax + (ak)y
= a (cx + ky )

Therefore, a | c . 

38
DIVISORS AND MULTIPLES (Cont.)
Euclid’s Lemma

Example.
Let a = 3, b = 4 & c = 3.
3 | 4(3) , with gcd(3, 4) = 1
Then, by Euclid’s Lemma, clearly 3 | 3.

Note.

If a & b are not relatively prime, the conclusion of Euclid’s Lemma


may fail to hold.

Eg. 12 | 9(8) where gcd(12,9)  1 and gcd(12,8)  1


we have 12 | 9 and 12 | 8

39
DIVISORS AND MULTIPLES (Cont.)
Euclid’s Lemma

Theorem 6.

Let a, b be integers, not both zero. For a positive integer


d, d = gcd(a, b) if and only if

i. d | a and d | b
ii. Whenever c | a and c | b then c | d .

40
DIVISORS AND MULTIPLES (Cont.)
Euclid’s Lemma

Proof (Theorem 6).


() Let d = gcd(a, b).

Then, d | a and d | b (by definition 4 –def GCD)


Hence, condition (i) holds.

Next to show condition (ii).


By Theorem 3, d = ax + by for some x, yZ .
Let c | a and c | b.
Then,
c | ax + by or c | d. ( (ii) holds)
( )
Let d be any positive integer which satisfying condition (i)
and (ii).
Given any common divisor c of a and b,

41
DIVISORS AND MULTIPLES (Cont.)
Euclid’s Lemma

Proof (Theorem 6).


( )
Let d be any positive integer which satisfying condition (i)
and (ii).
Given any common divisor c of a and b,
we have c | d (from the hypothesis).

This implies c  d,
Consequently d is the greatest common divisor of a and
b. 

42
DIVISORS AND MULTIPLES (Cont.)
Common Multiple

Definition 6 (Common Multiple)

Let a, b be two nonzero integers. An integer m is said to be a


common multiple of a and b whenever a | m and b | m.

Note:

• Zero is a common multiple of a and b.

• (ab) and – (ab) are both common multiples


of a and b.

43
DIVISORS AND MULTIPLES (Cont.)
Common Multiple

Example

Multiple of 2: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, ...

Multiple of 3: 3, 6, 9, 12, 15, 18, 21, 24

We can see that 6 is a common multiple of 2 & 3.


Then,
2 | 6 and 3 | 6.

12 is a common multiple of 2 & 3.


Then,
2 | 12 and 3 | 12.

44
DIVISORS AND MULTIPLES (Cont.)
Least Common Multiple

Definition 7 (Least Common Multiple)

Let a and b be two nonzero integers. The least common


multiple of a and b, denoted by lcm (a, b) is the positive integer
m satisfying the following:

i. a | m and b | m
ii. If a | c and b | c with c > 0, then m  c .

Example.
The positive common multiples of –12 and 30 are:
60, 120, 180, ......
Hence,
lcm(-12, 30) = 60.

45
DIVISORS AND MULTIPLES (Cont.)
Least Common Multiple

Example.

The positive common multiples of –8 and –36 are:


72, 216, 288, ......
Hence,
lcm(-8, -36) = 72.

46
DIVISORS AND MULTIPLES (Cont.)
Least Common Multiple

Note.

i. Given nonzero integers a and b, lcm (a, b) always exists and


lcm (a, b)  | ab |

ii. Let a, b  Z+. Then,


gcd (a, b) lcm (a, b) = ab .

iii. lcm (a, b) = ab if and only if gcd (a, b) = 1.

47
DIVISORS AND MULTIPLES (Cont.)
Least Common Multiple

Example (ii).

Given two positive integers 3054 and 12378 where gcd(3054, 12378) = 6.
Determine the lcm(3054, 12378).

Solution.

By (ii), gcd (a, b) . lcm (a, b) = ab


Then,
lcm ( 3054,12378 ) =
( 3054 )  (12378 )
= 6,300,402.
6

48
THE EUCLIDEAN ALGORITHM

• The Euclidean algorithm is one of an efficient methods for


computing the greatest common divisor (GCD).
 Involving repeated application of Division Algorithm.

• Let a and b be two nonzero integers.


Because gcd (| a | , | b |) = gcd (a, b) , we can assume that a  b.

• By applying the Division Algorithm:

Cont. 

49
THE EUCLIDEAN ALGORITHM

• If r1 = 0, then we stop. gcd (a, b) = b. If r1  0, we continue the


next step.

• If r2 = 0, then we stop. gcd (a, b) = r1.

• Continue the process until we obtain the remainder zero.

• Then, the last nonzero remainder, rn is the greatest common divisor


of a and b,
i.e., gcd (a, b) = rn (the last nonzero remainder), using the fact that:

gcd (a, b) = gcd (b, r1) = ... = gcd (rn-1, rn) = gcd (rn, 0)

50
THE EUCLIDEAN ALGORITHM

Example.

Determine the GCD of 68 and 14 and write your GCD = d in


terms of (ax + by).

Solution.

gcd (68, 14) :


68 = 14 (4) + 12
14 = 12 (1) + 2
12 = 2 (6) + 0
Then,
gcd (68, 14) = 2.

Cont. 

51
THE EUCLIDEAN ALGORITHM

Solution. (Cont.)

Next to write d = (ax + by).


To find integers x and y that satisfy 68x + 14y = 2

2 = 14 – 12 (1)
= 14 – [68 – 14 (4)] 1
= – 68 + 14(5)

So, gcd (68, 14) = 2 = 68(–1) + 14(5), where


x = –1, y = 5.

52
THE EUCLIDEAN ALGORITHM

Example.

Determine the GCD of 42823 and 6409 and write your GCD
= d in terms of (ax + by).

Solution.

gcd (42823, 6409) :


42823 = 6409 (6) + 4369
6409 = 4369 (1) + 2040
4369 = 2040 (2) + 289
2040 = 289 (7) + 17
289 = 17 (17) + 0
Then,
gcd (42823, 6409) = 17. Cont. 

53
THE EUCLIDEAN ALGORITHM

Solution. (Cont.)

Next to write d = (ax + by).


To find integers x and y that satisfy 42823x + 6409y = 17

17 = 2040 – 289 (7)


= 2040 – [4369 – 2040 (2)] 7
= 2040 (15) – 4369 (7)
= [6409 – 4369] 15 – 4369 (7)
= 6409 (15) – 4369 (22)
= 6409 (15) – [42823 – 6409 (6)] 22
= 6409 (147) – 42823 (22)

So, gcd (42823, 6409) = 17 = 42823 (–22) + 6409 (147) , where


x = –22, y = 147.

54
THE EUCLIDEAN ALGORITHM

Exercise.
Answer:
Using the Euclidean algorithm, calculate the greatest
common divisor of the following numbers and find integers i. gcd(2689,4001) = 1.
x, y such that d = (ax + by). 1 = = – 1117 . 4001 + 1662 . 2689
x = -1117 and y = 1662
i. 2689 and 4001
ii. 864 and 468 ii. gcd(864, 468) = 36.
iii. 1819 and 3587 36 = = 6 . 864 – 11 . 468.
x = 6 and y = -11

iii. gcd(3587, 1819) = 17.


17 = = 71 . 1819 – 36 . 3587
x = 71 and y = - 36

55
LINEAR DIOPHANTINE EQUATION
• Diophantine equations are named after the Greek mathematician Diophantus, c. 250, of Alexandria.

• The great work of Diophantus rests in his Arithmetica, which may be described as the earliest treatise in
Algebra.

• The term Diophantine equation usually refers to any equation in one or more unknowns that is to be
solved in the integers.

• The simplest type of Diophantine equation will be considered:


For a, b, c, d  Z, a, b, c are not both zero. and for which the variables x and y can only have integer
values.
the linear Diophantine equation in two unknowns: ax + by = c;
the linear Diophantine equation in three unknowns: ax + by + cz = d

• A solution of this equation is a pair of integers: x = x0, y = y0 that satisfy the equation.

• A linear Diophantine equation can have either a unique solution, many solutions or no solution.

56
LINEAR DIOPHANTINE EQUATION

Concerning a Diophantine equation three basic problems arise:

Question 1. Is the equation has solution?

Question 2. If it has solution, is the number of its solutions finite or infinite?

Question 3. If it has solution, determine all of its solutions.

Example.

i. 155x + 45y = 7 has no solution. Why?


ii. 60x + 33y = 9 has infinitely many solutions.

57
LINEAR DIOPHANTINE EQUATION

The following theorem gives us the solutions for the linear Diophantine equations.

Theorem 7

The linear Diophantine equation ax + by = c has a solution


if and only if
d | c, where d = gcd (a, b) . Furthermore, if x = x0, y = y0 is any particular
solution of the equation, then all other solutions are given by:
b a where t is arbitrary integer.
x = x0 +   t ; y = y0 −   t
d  d 

58
LINEAR DIOPHANTINE EQUATION

Proof. (1st part)

Suppose ax + by = c has a solution x = x0 and y = y0.


Let d = gcd (a, b) .
Then,
d | a  a = dr and d | b  b = ds for r, sZ
Next,
So, c = ax0 + by0
= (dr)x0 + (ds)y0
= d (rx0 + sy0)
Then, by definition 2 (divisible),
d | c.

Suppose d | c.
Then,
Then c = dt for tZ (by definition 2) (Cont. )

59
LINEAR DIOPHANTINE EQUATION

Proof. (1st part - Cont.)

Let gcd (a, b) = d = ax0 + by0 for some x0, y0  Z.


Thus,
c = (ax0 + by0) t
= ax0t + by0 t
= a(x0t) + b(y0 t)
Hence,
the Diophantine equation has a particular solution: x = x0t and y = y0t.

(2nd part.)

Let x = x0 and y = y0 is the particular solution.

60
LINEAR DIOPHANTINE EQUATION
(2nd part.) (cont.)

61
LINEAR DIOPHANTINE EQUATION
(2nd part.) (cont.)

62
LINEAR DIOPHANTINE EQUATION
(2nd part.) (cont.)

63
LINEAR DIOPHANTINE EQUATION
Example.

Determine all solutions in the positive integers of:


123x + 360y = 99.

Solution.

Using Euclidean Algorithm to find the gcd (123, 360) :


360 = 123 (2) + 114
123 = 114 (1) + 9
114 = 9 (12) + 6
9 = 6 (1) + 3
6 = 3 (2) + 0

Then, gcd (123, 360) = 3.


Therefore by Theorem 7, equation 123x + 360y = 99 has a solution since 3 | 99.

64
LINEAR DIOPHANTINE EQUATION
Solution. (Cont.)

Using "backtracking" to find x and y :


3=9–6
= 9 – [114 – 9 (12)]
= 9 (13) – 114
= [123 –114] 13 – 114
= 123 (13) – 114 (14)
= 123 (13) – [360 – 123 (2)] 14
= 123 (41) + 360 (–14)
Then,
99 = (3) (33) = 123 (1353) + 360 (–462)

Hence the particular solution: x0 = 1353, y0 = – 462.

65
LINEAR DIOPHANTINE EQUATION
Solution. (Cont.)

Using Theorem 7, the other solutions can be found:


 360 
x = 1353 +   t
 3 
= 1353 + 120t
 123 
y = −462 −   t
 3 
= −462 − 41t for tZ

Next to find the positive solutions, i.e., for x > 0 and y > 0 :

1353 + 120t > 0 −462 − 41t  0


t > -11 t < -12

Hence, there is no positive solutions.

66
LINEAR DIOPHANTINE EQUATION
Example.

Determine all solutions in the positive integers of:


172x + 20y = 1000.

Solution.

Using Euclidean Algorithm to find the gcd (172, 20) :


172 = 20 (8) + 12
20 = 12 (1) + 8
12 = 8 (1) + 4
8 = 4 (2) + 0

Then, gcd (172, 20) = 4.


Therefore by Theorem 7, equation 172x + 20y = 1000 has a solution since 4 | 1000.

67
LINEAR DIOPHANTINE EQUATION
Solution. (Cont.)

Using "backtracking" to find x and y :


4 = 12 – 8
= 12 – [20 – 12]
= 12 (2) – 20
= 2 [172 – 20(8) ] – 20
= 172 (2) + 20 (–17)
Then,
1000 = (4) (250) = 500 (172) + (–4250) (20)

Hence the particular solution: x0 = 500, y0 = – 4250.

68
LINEAR DIOPHANTINE EQUATION
Solution. (Cont.)

Using Theorem 7, the other solutions can be found:


 20 
x = 500 +   t
 4 
= 500 + 5t
 172 
y = −4250 −   t
 4 
= −4250 − 43 t for tZ

Next to find the positive solutions, i.e., for x > 0 and y > 0 :
−4250 − 43 t  0 Hence, t = -99. Therefore the Diophantine equation
500 + 5t > 0
36 has a unique solution x = 5, y =7 corresponding to the
t > -100 t  −98 value t = -99.
43

69
LINEAR DIOPHANTINE EQUATION
Exercise.

1. Determine all solutions in the integers of the following Diophantine equations:


i. 56x + 72y = 40.
ii. 24x + 138y = 18
iii. 221x + 35y = 11

2. Find all the solutions (x, y) to the following Diophantine equation 11x + 13y = 369 for
which x and y are both positive.

3. Solve the linear Diophantine Equations: 2x+4y=21, x,y ∈ Z.


Answer:
1. i. x = 20+9t ; y = -15-7t
ii. 18+23t ; y = -3-4t
iii. 176+35t ; y = -1111-221t
2. x = 2214 + 13t, y = −1845 − 11t.
The solutions are (x, y) = (4, 25), (17, 14), and
(20, 3).
3. No solution since gcd(2,4)=2 and 2 does not divide 21.

70

You might also like