SlideShare a Scribd company logo
1 of 70
Download to read offline
SMA3043 ELEMENTARY NUMBER THEORY
SEMESTER 2 2023/2024
DIVISIBILITY THEORY
2
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)
3
THE DIVISION ALGORITHM (Cont.)
Corollary 1
Let a, b  with b  0, then exist unique integers q and r such that
a = bq + r 0  r  | b | .
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.
It is a little trickier to see what
q and r should be if a < 0.
Eg:if we divide – 26 is by 3, then the remainder
is not – 2.
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
4
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 | . 
5
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 .
6
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)
When r = 0 ; a = 2q - even
When r = 1 ; a = 2q + 1 - odd
Note: ( DA ) a = bq + r
0  r  2
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
7
THE DIVISION ALGORITHM (Cont.)
Application of Division Algorithm
Example.
72 = 49 = 4(12) + 1
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.  )
Example.
Write the square of 12, 15 and 21 in
terms of a = 4q + r where 0  r  2
8
DIVISION ALGORITHM (Cont.)
Application of Division Algorithm
In the division algorithm, any integers can be represented as one of four form:
• 4q
• 4q + 1
• 4q + 2
• 4q + 3
Odd
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)  ℤ
Or;
(4q + 3)2 = 16q2 + 24q + 9 = 8(2q2 + 3q + 1) + 1= 8m + 1 for some m = (2q2 + 3q + 1)  ℤ
9
THE DIVISION ALGORITHM (Cont.)
Application of Division Algorithm
Example.
Write the square of 15, 19 and 21 in terms of (8k + 1).
10
GREATEST INTEGER FUNCTION
Definition 1.
The greatest integer function for a real number x, denote by
the largest integer less than or equal to x, satisfying
1
x x x
  
 
 
x
 
 
Notes:
Note:
The greatest integer
function is very useful in
applications involving
data storage
and data transmission.
• if and only if x is an integer.
• If x is any real numbers, then x can be written as
x x

 
 
where 0 1.
x x t t
   
 
 
11
GREATEST INTEGER FUNCTION (Cont.)
Example.
13
i. 6.5 6
2
 
 
 
 
 
 
13
ii. 6.5 7
2

 
   
 
 
 
 
iii. 2.71828 2
e  
   
   
iv. 11 11
  
 
 
v. 5 5

 
 
12
GREATEST INTEGER FUNCTION (Cont.)
Proposition 1
For x a real number and n integer:
i. x n x n
  
   
   
iii. if 1
x
x
n
n n
 
 
   
 
 
 
   
ii. −x = ቊ
− x if x ∈ ℤ
− x − 1 if x ∉ ℤ
13
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.
14
GREATEST INTEGER FUNCTION (Cont.)
Solution.
Given a = 22 , b = 3.
22
7.33 7
3
q
 
  
 
 
 
 
 
22
22 3 22 3 7.33 22 3 7 1
3
r
 
      
 
 
 
 
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.
15
DIVISORS AND MULTIPLES
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.
Divisibility
16
DIVISORS AND MULTIPLES
Example
i. Show that 4872 is divisible by 2.
ii. Determine whether 270 is divisible 4.
Divisibility
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
17
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
vii. If a | b and a | c then a | (bx + cy) for some x, y Z
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 |
iii. If a | b and c | d then ac | bd
18
DIVISORS AND MULTIPLES (Cont.)
Divisibility
Example.
Proof.
By Definition 2 (Divisibility)
By Definition 2 (Divisibility)
19
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
20
DIVISORS AND MULTIPLES (Cont.)
Divisibility
1. To show 1S
Let kS.
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
For n = 1,
Then, 8 | (52k + 7)
[To show 8 | (52(k+1) + 7) ]
21
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 . 
22
DIVISORS AND MULTIPLES (Cont.)
Divisibility
Exercise (divisibility)
i. Using mathematical induction, show that:
ii. Using mathematical induction, verify that for n any positive integer, 6n −1 is divisible by 5 .
iii. Prove that if a | b and a | c then a | (bx + cy) for some x, y Z
23
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.
24
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.
25
DIVISORS AND MULTIPLES (Cont.)
Common Divisors
Exercise.
Determine the common divisors of the following integers. Justify
your answer.
i. 45 and 27.
ii. 55 and 35
iii. 36 and 12
iv. 42 and 14
Answer:
i. 1, 3, 9
ii. 1, 5
iii. 1, 2, 4, 12
iv. 1, 2, 7, 14
26
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
27
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.
28
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.
Determine the greatest common divisor of the following:
i. 45 and 60
ii. – 9 and 15
iii. 36 and 54
Answer:
i. Gcd(45, 60) = 15
ii. Gcd(– 9, 15) = 3
iii. Gcd(36, 54) = 18
29
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) .
30
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.
31
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime
The following theorem characterizes relatively prime integers in terms of
linear combinations.
Theorem 4.
Let a, b  ℤ, 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 )
32
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. 
33
DIVISORS AND MULTIPLES (Cont.)
Relatively Prime
Corollary 2.
If gcd (a, b) = d, then gcd , 1.
a b
d d
 

 
 
a/d and b/d are
said to be relatively
prime.
Example.
Let a = – 8 , b = – 36
We have gcd(– 8 , – 36) = 4
Then,
 
8 36
gcd , gcd 2, 9 1
4 4
 
 
   
 
 
Example.
Let a = 4 , b = 6
We have gcd(4 , 6) = 2
Then,
 
4 6
gcd , gcd 2,3 1
2 2
 
 
 
 
34
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.
35
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.
36
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)
37
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. )
38
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 . 
39
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
40
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 .
41
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,
42
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. 
43
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.
44
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.
45
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.
46
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.
47
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.
48
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,
 
   
3054 12378
lcm 3054,12378 6,300,402.
6

 
49
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. 
50
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)
51
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. 
52
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.
53
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. 
54
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.
55
THE EUCLIDEAN ALGORITHM
Exercise.
Using the Euclidean algorithm, calculate the greatest
common divisor of the following numbers and find integers
x, y such that d = (ax + by).
i. 2689 and 4001
ii. 864 and 468
iii. 1819 and 3587
Answer:
i. gcd(2689,4001) = 1.
1 = = – 1117 . 4001 + 1662 . 2689
x = -1117 and y = 1662
ii. gcd(864, 468) = 36.
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
56
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.
57
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.
ii. 60x + 33y = 9 has infinitely many solutions.
Why?
58
LINEAR DIOPHANTINE EQUATION
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:
0 0
;
b a
x x t y y t
d d
   
   
   
   
The following theorem gives us the solutions for the linear Diophantine equations.
where t is arbitrary integer.
59
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. )
60
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.
61
LINEAR DIOPHANTINE EQUATION
(2nd part.) (cont.)
62
LINEAR DIOPHANTINE EQUATION
(2nd part.) (cont.)
63
LINEAR DIOPHANTINE EQUATION
(2nd part.) (cont.)

64
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.
65
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.
66
LINEAR DIOPHANTINE EQUATION
Solution. (Cont.)
Using Theorem 7, the other solutions can be found:
360
1353
3
x t
 
   
 
1353 120t
 
123
462
3
y t
 
    
 
462 41t
   for tℤ
Next to find the positive solutions, i.e., for x > 0 and y > 0 :
1353 + 120t > 0
t > -11
462 41 0
t
  
t < -12
Hence, there is no positive solutions.
67
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.
68
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.
69
LINEAR DIOPHANTINE EQUATION
Solution. (Cont.)
Using Theorem 7, the other solutions can be found:
20
500
4
x t
 
   
 
500 5t
 
172
4250
4
y t
 
    
 
4250 43t
   for tℤ
Next to find the positive solutions, i.e., for x > 0 and y > 0 :
500 + 5t > 0
t > -100
4250 43 0
36
98
43
t
t
  
 
Hence, t = -99. Therefore the Diophantine
equation has a unique solution x = 5, y =7
corresponding to the value t = -99.
70
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
iv. 24x + 138y = 40
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 ∈ ℤ.
Answer:
1. i. x = 20+9t ; y = -15-7t
ii. 18+23t ; y = -3-4t
iii. 176+35t ; y = -1111-221t
iv. No solution
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.

More Related Content

Similar to Chapter 2 Lecture Notes_ Divisibility.pdf

Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmeticJanani S
 
Form 5 Additional Maths Note
Form 5 Additional Maths NoteForm 5 Additional Maths Note
Form 5 Additional Maths NoteChek Wei Tan
 
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
ADVANCED   ALGORITHMS-UNIT-3-Final.pptADVANCED   ALGORITHMS-UNIT-3-Final.ppt
ADVANCED ALGORITHMS-UNIT-3-Final.pptssuser702532
 
3.complex numbers Further Mathematics Zimbabwe Zimsec Cambridge
3.complex numbers  Further Mathematics Zimbabwe Zimsec Cambridge3.complex numbers  Further Mathematics Zimbabwe Zimsec Cambridge
3.complex numbers Further Mathematics Zimbabwe Zimsec Cambridgealproelearning
 
Class-10-Mathematics-Chapter-1-CBSE-NCERT.ppsx
Class-10-Mathematics-Chapter-1-CBSE-NCERT.ppsxClass-10-Mathematics-Chapter-1-CBSE-NCERT.ppsx
Class-10-Mathematics-Chapter-1-CBSE-NCERT.ppsxSoftcare Solution
 
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docxSection 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docxbagotjesusa
 
Assignments for class XII
Assignments for class XIIAssignments for class XII
Assignments for class XIIindu thakur
 
Cryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxCryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxAbhinav816839
 
A Solutions To Exercises On Complex Numbers
A Solutions To Exercises On Complex NumbersA Solutions To Exercises On Complex Numbers
A Solutions To Exercises On Complex NumbersScott Bou
 
matrices and determinantes
matrices and determinantes matrices and determinantes
matrices and determinantes gandhinagar
 

Similar to Chapter 2 Lecture Notes_ Divisibility.pdf (20)

Number theory
Number theoryNumber theory
Number theory
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmetic
 
CH04.ppt
CH04.pptCH04.ppt
CH04.ppt
 
Form 5 Additional Maths Note
Form 5 Additional Maths NoteForm 5 Additional Maths Note
Form 5 Additional Maths Note
 
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
ADVANCED   ALGORITHMS-UNIT-3-Final.pptADVANCED   ALGORITHMS-UNIT-3-Final.ppt
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
 
3.complex numbers Further Mathematics Zimbabwe Zimsec Cambridge
3.complex numbers  Further Mathematics Zimbabwe Zimsec Cambridge3.complex numbers  Further Mathematics Zimbabwe Zimsec Cambridge
3.complex numbers Further Mathematics Zimbabwe Zimsec Cambridge
 
Topik 1
Topik 1Topik 1
Topik 1
 
Algebra
Algebra Algebra
Algebra
 
Ch04
Ch04Ch04
Ch04
 
Class-10-Mathematics-Chapter-1-CBSE-NCERT.ppsx
Class-10-Mathematics-Chapter-1-CBSE-NCERT.ppsxClass-10-Mathematics-Chapter-1-CBSE-NCERT.ppsx
Class-10-Mathematics-Chapter-1-CBSE-NCERT.ppsx
 
SMT1105-1.pdf
SMT1105-1.pdfSMT1105-1.pdf
SMT1105-1.pdf
 
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docxSection 0.7 Quadratic Equations from Precalculus Prerequisite.docx
Section 0.7 Quadratic Equations from Precalculus Prerequisite.docx
 
Lecture-1.pptx
Lecture-1.pptxLecture-1.pptx
Lecture-1.pptx
 
Assignments for class XII
Assignments for class XIIAssignments for class XII
Assignments for class XII
 
Cryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxCryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docx
 
Em01 ba
Em01 baEm01 ba
Em01 ba
 
Metrix[1]
Metrix[1]Metrix[1]
Metrix[1]
 
A Solutions To Exercises On Complex Numbers
A Solutions To Exercises On Complex NumbersA Solutions To Exercises On Complex Numbers
A Solutions To Exercises On Complex Numbers
 
matrices and determinantes
matrices and determinantes matrices and determinantes
matrices and determinantes
 
M112rev
M112revM112rev
M112rev
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Recently uploaded (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 

Chapter 2 Lecture Notes_ Divisibility.pdf

  • 1. SMA3043 ELEMENTARY NUMBER THEORY SEMESTER 2 2023/2024 DIVISIBILITY THEORY
  • 2. 2 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)
  • 3. 3 THE DIVISION ALGORITHM (Cont.) Corollary 1 Let a, b  with b  0, then exist unique integers q and r such that a = bq + r 0  r  | b | . 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. It is a little trickier to see what q and r should be if a < 0. Eg:if we divide – 26 is by 3, then the remainder is not – 2. 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
  • 4. 4 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 | . 
  • 5. 5 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 .
  • 6. 6 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) When r = 0 ; a = 2q - even When r = 1 ; a = 2q + 1 - odd Note: ( DA ) a = bq + r 0  r  2 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
  • 7. 7 THE DIVISION ALGORITHM (Cont.) Application of Division Algorithm Example. 72 = 49 = 4(12) + 1 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.  ) Example. Write the square of 12, 15 and 21 in terms of a = 4q + r where 0  r  2
  • 8. 8 DIVISION ALGORITHM (Cont.) Application of Division Algorithm In the division algorithm, any integers can be represented as one of four form: • 4q • 4q + 1 • 4q + 2 • 4q + 3 Odd 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)  ℤ Or; (4q + 3)2 = 16q2 + 24q + 9 = 8(2q2 + 3q + 1) + 1= 8m + 1 for some m = (2q2 + 3q + 1)  ℤ
  • 9. 9 THE DIVISION ALGORITHM (Cont.) Application of Division Algorithm Example. Write the square of 15, 19 and 21 in terms of (8k + 1).
  • 10. 10 GREATEST INTEGER FUNCTION Definition 1. The greatest integer function for a real number x, denote by the largest integer less than or equal to x, satisfying 1 x x x        x     Notes: Note: The greatest integer function is very useful in applications involving data storage and data transmission. • if and only if x is an integer. • If x is any real numbers, then x can be written as x x      where 0 1. x x t t        
  • 11. 11 GREATEST INTEGER FUNCTION (Cont.) Example. 13 i. 6.5 6 2             13 ii. 6.5 7 2                iii. 2.71828 2 e           iv. 11 11        v. 5 5     
  • 12. 12 GREATEST INTEGER FUNCTION (Cont.) Proposition 1 For x a real number and n integer: i. x n x n            iii. if 1 x x n n n                   ii. −x = ቊ − x if x ∈ ℤ − x − 1 if x ∉ ℤ
  • 13. 13 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.
  • 14. 14 GREATEST INTEGER FUNCTION (Cont.) Solution. Given a = 22 , b = 3. 22 7.33 7 3 q                22 22 3 22 3 7.33 22 3 7 1 3 r                  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.
  • 15. 15 DIVISORS AND MULTIPLES 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. Divisibility
  • 16. 16 DIVISORS AND MULTIPLES Example i. Show that 4872 is divisible by 2. ii. Determine whether 270 is divisible 4. Divisibility 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
  • 17. 17 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 vii. If a | b and a | c then a | (bx + cy) for some x, y Z 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 | iii. If a | b and c | d then ac | bd
  • 18. 18 DIVISORS AND MULTIPLES (Cont.) Divisibility Example. Proof. By Definition 2 (Divisibility) By Definition 2 (Divisibility)
  • 19. 19 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
  • 20. 20 DIVISORS AND MULTIPLES (Cont.) Divisibility 1. To show 1S Let kS. 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 For n = 1, Then, 8 | (52k + 7) [To show 8 | (52(k+1) + 7) ]
  • 21. 21 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 . 
  • 22. 22 DIVISORS AND MULTIPLES (Cont.) Divisibility Exercise (divisibility) i. Using mathematical induction, show that: ii. Using mathematical induction, verify that for n any positive integer, 6n −1 is divisible by 5 . iii. Prove that if a | b and a | c then a | (bx + cy) for some x, y Z
  • 23. 23 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.
  • 24. 24 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.
  • 25. 25 DIVISORS AND MULTIPLES (Cont.) Common Divisors Exercise. Determine the common divisors of the following integers. Justify your answer. i. 45 and 27. ii. 55 and 35 iii. 36 and 12 iv. 42 and 14 Answer: i. 1, 3, 9 ii. 1, 5 iii. 1, 2, 4, 12 iv. 1, 2, 7, 14
  • 26. 26 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
  • 27. 27 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.
  • 28. 28 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. Determine the greatest common divisor of the following: i. 45 and 60 ii. – 9 and 15 iii. 36 and 54 Answer: i. Gcd(45, 60) = 15 ii. Gcd(– 9, 15) = 3 iii. Gcd(36, 54) = 18
  • 29. 29 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) .
  • 30. 30 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.
  • 31. 31 DIVISORS AND MULTIPLES (Cont.) Relatively Prime The following theorem characterizes relatively prime integers in terms of linear combinations. Theorem 4. Let a, b  ℤ, 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 )
  • 32. 32 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. 
  • 33. 33 DIVISORS AND MULTIPLES (Cont.) Relatively Prime Corollary 2. If gcd (a, b) = d, then gcd , 1. a b d d        a/d and b/d are said to be relatively prime. Example. Let a = – 8 , b = – 36 We have gcd(– 8 , – 36) = 4 Then,   8 36 gcd , gcd 2, 9 1 4 4             Example. Let a = 4 , b = 6 We have gcd(4 , 6) = 2 Then,   4 6 gcd , gcd 2,3 1 2 2        
  • 34. 34 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.
  • 35. 35 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.
  • 36. 36 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)
  • 37. 37 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. )
  • 38. 38 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 . 
  • 39. 39 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
  • 40. 40 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 .
  • 41. 41 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,
  • 42. 42 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. 
  • 43. 43 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.
  • 44. 44 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.
  • 45. 45 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.
  • 46. 46 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.
  • 47. 47 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.
  • 48. 48 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,       3054 12378 lcm 3054,12378 6,300,402. 6   
  • 49. 49 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. 
  • 50. 50 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)
  • 51. 51 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. 
  • 52. 52 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.
  • 53. 53 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. 
  • 54. 54 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.
  • 55. 55 THE EUCLIDEAN ALGORITHM Exercise. Using the Euclidean algorithm, calculate the greatest common divisor of the following numbers and find integers x, y such that d = (ax + by). i. 2689 and 4001 ii. 864 and 468 iii. 1819 and 3587 Answer: i. gcd(2689,4001) = 1. 1 = = – 1117 . 4001 + 1662 . 2689 x = -1117 and y = 1662 ii. gcd(864, 468) = 36. 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
  • 56. 56 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.
  • 57. 57 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. ii. 60x + 33y = 9 has infinitely many solutions. Why?
  • 58. 58 LINEAR DIOPHANTINE EQUATION 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: 0 0 ; b a x x t y y t d d                 The following theorem gives us the solutions for the linear Diophantine equations. where t is arbitrary integer.
  • 59. 59 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. )
  • 60. 60 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.
  • 64. 64 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.
  • 65. 65 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.
  • 66. 66 LINEAR DIOPHANTINE EQUATION Solution. (Cont.) Using Theorem 7, the other solutions can be found: 360 1353 3 x t         1353 120t   123 462 3 y t          462 41t    for tℤ Next to find the positive solutions, i.e., for x > 0 and y > 0 : 1353 + 120t > 0 t > -11 462 41 0 t    t < -12 Hence, there is no positive solutions.
  • 67. 67 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.
  • 68. 68 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.
  • 69. 69 LINEAR DIOPHANTINE EQUATION Solution. (Cont.) Using Theorem 7, the other solutions can be found: 20 500 4 x t         500 5t   172 4250 4 y t          4250 43t    for tℤ Next to find the positive solutions, i.e., for x > 0 and y > 0 : 500 + 5t > 0 t > -100 4250 43 0 36 98 43 t t      Hence, t = -99. Therefore the Diophantine equation has a unique solution x = 5, y =7 corresponding to the value t = -99.
  • 70. 70 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 iv. 24x + 138y = 40 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 ∈ ℤ. Answer: 1. i. x = 20+9t ; y = -15-7t ii. 18+23t ; y = -3-4t iii. 176+35t ; y = -1111-221t iv. No solution 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.