You are on page 1of 76

M A R I K I NA P O LY T E C HN IC CO L L E G E

G R A D U AT E S C H O O L
M A S T E R O F A RT S I N T E A C H I N G M A J O R I N M AT H E M AT I C S

A LGEBRA AND G EOMETRY

L ESSON 2 D IVISIBILITY,
D IVISION A LGORITHM, &
C ONGRUENCES – A R EVIEW
P re pa red B y : R E Y N A L D O C . R I V E R A , J R . , M . S1c .
https://www.quantamagazine.org/mathematical-trio-advances-centuries-old-number-theory-problem-20221129/
INTRODUCTION

• Back in elementary school, we learned four fundamental


operations on numbers (integers), namely, addition (+),
subtraction (−), multiplication (× or ·), and division (÷ or / ).
• For any two integers a and b, their sum a + b, differences
a − b and b − a, and product ab are all integers, while their
quotients a ÷ b (or a/b) and b ÷ a are not necessarily
integers.
• The notion of divisibility is the central concept of one of the
most beautiful subjects in advanced mathematics: number
theory, the study of properties of integers.
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
DIVISIBILITY

3
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
DIVISIBILITY
If a and b are integers and b ≠ 0 then a is divisible by b if,
and only if, a equals b times some integer q.
Instead of “a is divisible by b,” we can say that
a i s a m u l t i p l e o f b

b i s a f a c t o r o f a
ba=
b i s a d i v i s o r o f a
 b d i v i d e s a.

The notation is read “b divides a.” Symbolically, if a and b are
integers and b ≠ 0: if and only if there exists an integer q such that
a=bq .
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
DIVISIBILITY

a −8 = −4
b a  = q, q  10 = 5
2
b 2
10 = 2 ( 5 ) −8 = 2 ( −4 )
 a = bq

0 =0 21 = −7
3 −3
0 = 3(0) 21 = −3 ( −7 )

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


If b does not divide a, then write b l a .
This indicates that there exist unique integers q and r such
that a = b q + r where 0 < r < b.
THEOREM (DIVISIBILITY PROPERTIES)
If a, b, c, q, a, b, n, m, and d are integers then the following statements hold:
1. b 0 o r b q = 0, w h e r e q = 0
( e v e r yt h i n g d i v i d e s z e r o )
2. 1 n where q = b
( o n e d i v i d e s e v e r yt h i n g )
3. n n o r n q = n w h e r e q = 1, n  0
( e v e r yt h i n g d i v i d e s i t s e l f )
4. n - n o r n q = -n w h e r e q = - 1
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
5 . b  1 i f f b= ± 1 w h e r e q= 1
(1 an d -1 are th e o n ly d iviso rs o f 1 )
6 . b n  a b a n ( m u l t i p l i c a t i o n p r o p e r t y)
7. ab an and a  0  b n
( c a n c e l l a t i o n p r o p e r t y) *
8. b n and n m  b m
(tran sitivity)*
9. b n and b m  b (a n + b m) f o r a a n d b
( l i n e a r i t y p r o p e r t y) *
F o r i n t e g e r s a , b, c , d t h e f o l l o w i n g h o l d :
1 0 . I f a b, t h e n a b c.
1 1 . I f a b a n d c d , t h e n a c b d.
1 2 . I f a b a n d a  0, b  0, t h e n a  b .
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
e x amp l e & S o lution
1. Find all natural numbers n for which (n+2)│(n2 – 7).

n2 − 7 = n − 2 − 3 n + 2 = positive divisors/factors of 3
n+2 n+2 n + 2 = 1, 3
n−2 n + 2 = 1  n = −1
n+2 n 2
−7 n + 2 = 3 n =1
− n2 + 2n
− 2n − 7 Answer : n = 1
− −2n − 4
−3 Checking:
( ) − 7  3 -6
1 + 2 12
( )
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
e x amp l e & S o lution
2. Find all integers a ≠ 3 for which (a – 3) │(a3 – 1).
a 3 − 1 = a 2 + 3a + 9 + 26 a − 3 = divisors/factors of 26
a−3 a−3 a − 3 = 1, 2, 13, 26 C h e c k i n g :
a −3 =1 a = 4 ( -2 3 − 3 ) ( -2 3 ) − 1  -2 6 -1 2 1 6 8
3

a 2 + 3a + 9
a − 3 = −1  a = 2 ( -1 0 − 3 ) ( -1 0 ) − 1  -13 -1 0 0 1
3

a − 3 a3 −1 a−3= 2 a = 5 (1 − 3 ) (13 − 1)  -2 0
− a 3 − 3a 2 a − 3 = −2  a = 1 ( 2 − 3 ) ( 23 − 1)  -1 7
3a 2 − 1 a − 3 = 13  a = 16 ( 4 − 3 ) ( 4 3 − 1)  1 6 3
− 3a 2 − 9 a a − 3 = −13  a = −10 ( 5 − 3) ( 53 − 1)  2 1 2 4
9a − 1 a − 3 = 26  a = 29 (1 6 − 3 ) (1 63 − 1)  1 3 4 0 9 5
− 9 a − 27
a − 3 = −26  a = −23 ( 2 9 − 3) ( 2 9 − 1)  2 6 2 4 3 8 8
3

26
Answer : a = -23, -10,1, 2, 4, 5,16, 29
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
G ro u p a c t i v i t y n o. 1

1. Find all positive integers x for which x3 + 2x – 4 is


divisible by x + 2.
2. Find all integers n for which (3n – 1)│(2n2 – 5n + 7).
3. Determine all integers x for which (2x2 + 1)│(x3 – x + 5).

10
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
DIVISION
ALGORITHM
11
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
THEOREM (THE DIVISION ALGORITHM)
Let a be any integer and b a positive integer. Then
there exist unique integers q and r such that
a = bq + r

dividend remainder
divisor quotient
where 0 ≤ r < b.
COROLLARY. For any integers a and b, with b ≠ 0, then
there exist unique integers q and r such that
a = b q + r, where 0 ≤ r < │b│.
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
THEOREM (THE DIVISION ALGORITHM)
7 = −7 , −7 = 7
3 −3 3 −3
They are equal values but NOT in their quotient and remainder.

2 3 −3 −2
3 7 −3 − 7 3 −7 −3 7
−6 − ( −9 ) − ( −9 ) −6
1 2 2 1
q=2 q=3 q = −3 q = −2
r =1 r=2 r=2 r =1

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


SOME BASIC IDEAS:
1) an odd number is of the form 2k + 1 or 2k –1, for some
integer k;
2) an even number is of the form 2m, for some integer m;
3) the sum of two odd numbers is an even number;
4) the sum of two even numbers is an even number;
5) the sum of an odd and even number is an odd number;
6) the product of two odd numbers is an odd number;
7) a product of integers is even if and only if at least one of its
factors is even.
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
1. Find the quotient q and the remainder r when
Answer
a. 42 is divided by -9. q = -4, r=6
b. -93 is divided by -14. q = 7, r=5
c. -13 is divided by 21. q = -1, r=8
d. 17 is divided by -25. q = 0, r = 17

15
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
Example
2. Find the greatest common divisor of 6 and (n – 7), and the
values of integer n:
S olution: U sing D ivision Algorithm
n−7 r
= q +  n − 7 = 6 q + r , r = 0,1, 2, 3, 4, 5
6 6

If r = 0, then n = 6 q + 7, q  . If r = 1, then n = 6 q + 8, q  .

g c d ( 6, n − 7 ) = g c d ( 6, 6 q + 7 − 7 ) g c d ( 6, n − 7 ) = g c d ( 6, 6 q + 8 − 7 )
= g c d ( 6, 6 q ) = g c d ( 6, 6 q + 1)
=6 =1
16
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )
S olution:
If r = 2, then n = 6 q + 9, q  . If r = 4, then n = 6 q + 11, q  .

g c d ( 6, n − 7 ) = g c d ( 6, 6 q + 9 − 7 ) g c d ( 6, n − 7 ) = g c d ( 6, 6 q + 1 1 − 7 )
= g c d ( 6, 6 q + 2 ) = g c d ( 6, 6 q + 4 )
=2 =2

If r = 3, then n = 6 q + 10, q  . If r = 5, then n = 6 q + 12, q  .


g c d ( 6, n − 7 ) = g c d ( 6, 6 q + 1 0 − 7 ) g c d ( 6, n − 7 ) = g c d ( 6, 6 q + 1 2 − 7 )
= g c d ( 6, 6 q + 3 ) = g c d ( 6, 6 q + 5 )
=3 =1
17
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )

Answer : For q  ,
g c d ( 6, n − 7 ) = 1 i f n = 6 q + 8 o r 6 q + 2, 6 q + 1 2 o r 6 q ,

g c d ( 6, n − 7 ) = 2 i f n = 6 q + 9 o r 6 q + 3, 6 q + 1 1 o r 6 q + 5

g c d ( 6, n − 7 ) = 3 i f n = 6 q + 1 0 o r 6 q + 4

g c d ( 6, n − 7 ) = 6 i f n = 6 q + 7 o r 6 q + 1

NOT E:greatest common divisor / factor is alw ays positive


g c d ( a , b ) = g c d ( − a , −b ) = g c d ( − a , b ) = g c d ( a , − b ) = d

18
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
Example
3. Find the greatest common divisor of (9n+17) and (7n+11).
Solution:
1 2
7n + 1 1 9n + 1 7 n − 7 2n + 6
− 7n + 1 1 − 2n − 1 4
2n + 6 20 g c d ( 2 0, n − 7 ) = ?

3
2n + 6 7 n + 1 1 n − 7 = q + r  n − 7 = 2 0q + r
− 6n + 1 8 20 20
n− 7 w h e r e r = 0, 1, 2, 3, . . . , 1 8, 1 9
19
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )

Solution:
Let n = 20k + r + 7, r = 0, 1, 2,..., 19.

Substituting all possible remainders, we obtain that the


remainder, r = 7.

Hence, n = 20k + 7 and the greatest common divisor is 20.


(20, 20k) = 20.

20
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
Example
4. Reduce the fraction 1 6 n + 6 0 .
1 1n + 4 1
1 5
1 1n + 4 1 1 6 n + 6 0 n + 3 5n + 1 9 g cd ( n + 3, 4 ) = ?
− 1 1n + 4 1 − 5n + 1 5
5n + 1 9 4

2 b y D iv is io n A lg o rith m
n + 3 = q + r  n + 3 = 4q + r
5n + 1 9 1 1n + 4 1
4 4
− 1 0n + 3 8
n+3 w h er e r = 0,1, 2, 3
21
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )
L e t r = 0,th e n n = 4 q − 3 . C h e c k in g :
I f q = 2, t h e n n = 5 .
1 6 ( 4q − 3 ) + 6 0 6 4q − 4 8 + 6 0 16 (5) + 60 16 ( 2 ) + 3
= =
1 1 ( 4q − 3 ) + 4 1 4 4q − 3 3 + 4 1 11(5) + 41 11( 2 ) + 2
6 4q + 1 2 80 + 60 = 32 + 3
= 55 + 41 22 + 2
4 4q + 8
4 (1 6q + 3 )
140 = 35
= 96 24
4 ( 1 1q + 2 ) 4 (35) 35
=
1 6q + 3 4 ( 24) 24
=
1 1q + 2 35 = 35
24 24 22
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )
L e t r = 1,th e n n = 4 q − 2 . 2
2 0q + 9 4 4q + 1 9
1 6 ( 4q − 2 ) + 6 0 6 4q − 3 2 + 6 0 − 4 0q + 1 8
=
1 1 ( 4q − 2 ) + 4 1 4 4q − 2 2 + 4 1 1 2 0q + 9
6 4q + 2 8 1 2 0q + 9
=
4 4q + 1 9 − 2 0q + 9
g cd ( 0,1 ) = 1
0
1
4 4q + 1 9 6 4q + 2 8 In this case the 16n + 60 and
− 4 4q + 1 9 11n + 41 are relatively prime and
2 0q + 9 the fraction cannot be reduced.
23
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )
L e t r = 2,th e n n = 4 q − 1 . C h e c k in g :
I f q = − 2, t h e n n = − 9 .
1 6 ( 4q − 1) + 6 0 6 4q − 1 6 + 6 0 16 ( −9) + 60 32 ( −2 ) + 22
= =
1 1 ( 4q − 1) + 4 1 4 4q − 1 1 + 4 1 11( −9) + 41 22 ( −2 ) +15
6 4q + 4 4 −144 + 60 = −64 + 22
= −99 + 41 −44 +15
4 4q + 3 0
−84 = −42
2 ( 3 2q + 2 2 ) −58 −29
=
2 ( 2 2q + 1 5 ) −2 ( 42) 42
=
3 2q + 2 2 −2 ( 29) 29
=
2 2q + 1 5 42 = 42
29 29 24
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )
L e t r = 3,th e n n = 4 q. 5
1 6 ( 4q ) + 6 0 6 4q + 6 0 4q + 3 2 0q + 1 9
=
1 1 ( 4q ) + 4 1 4 4q + 4 1 − 2 0q + 1 5 q
1 4 4 4q + 3
4 4q + 4 1 6 4q + 6 0 − 4q
− 4 4q + 4 1 3
2 0q + 1 9 g cd ( 3, 4 ) = 1
2
2 0q + 1 9 4 4q + 4 1 In this case the 16n + 60 and
11n + 41 are relatively prime and
− 4 0q + 3 8
the fraction cannot be reduced.
4q + 3 25
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
E x a m p l e ( C O N T. )

Answer:

1 6 n + 6 0 1 6q + 3
If n = 4 q − 3, th e n = ; and
1 1n + 4 1 1 1q + 2
1 6 n + 6 0 3 2q + 2 2
if n = 4 q − 1, th e n = .
1 1n + 4 1 2 2 q + 1 5

26
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
G ro u p a c t i v i t y n o. 2
I. Find the quotient q and the remainder r when
1. 45 is divided by 17.
2. -26 is divided by 9.
3. 14 is divided by -31.
4. -38 is divided by -43.
5. -52 is divided by -11.
6. 27 is divided by -8.

27
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
G ro u p a c t i v i t y n o. 2
2. Find the greatest common divisor of the following and the
values of integer n:
a. -4 and (2n + 3)

b. 7 and (2 – n)

3. Reduce the fraction and find the value of integer n.

a. 9 n + 1 2 2 b. 1 6 n + 6 0
4n + 5 5 1 1n + 4 1
28
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
CONGRUENCE

29
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
CONGRUENCE MODULO m
DEFINITION
• Let m be a positive integer.
Then an integer a is congruent to an integer b modulo m if
m |(a − b).
• In symbols, write
a ≡ b (mod m);
m is the modulus of the congruence relation.
• If a is not congruent to b modulo m, then a is incongruent
to b modulo m; then write a ≡ b (mod m).
30
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example

Since 6|(37 − 7),


37 ≡ 7 (mod 6);
likewise, 5|(48 − 13), so
48 ≡ 13 (mod 5);
also
27 ≡ −5 (mod 16).
But 22 ≡ 4 (mod 7), since
7 |(22 − 4);
likewise,
19 ≡ −7(mod 6).
31
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE
THEOREM 1
a ≡ b (mod m) if and only if a = b + km for some integer k.
PROOF
Suppose a ≡ b (mod m).
Then m |(a − b), so a − b = km for some integer k; that is,
a = b + km.
Conversely, suppose a = b + km for some integer k.
Then a − b = km , so m |(a − b) and consequently,
a ≡ b (mod m). QED
32
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example

37 ≡ 2 (mod 5) and 37 = 2 + 75;


a ≡ b (mod m) and a = b + km
on the other hand,
58 = −5 + 97, so 58 ≡ −5 (mod 7)
a = b + km so a ≡ b (mod m)

33
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE

• The following are equivalent to each other and may be


used interchangeably.
i. a ≡ b (mod m); 13 ≡ 1 (mod 2)
ii. m |(a − b); 2 |(13 − 1)
iii. a = b + km. 13 = 1 + (6)(2)

34
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE
THEOREM 2
(a) a ≡ a (mod m). (Reflexive property)
(b) If a ≡ b (mod m), then b ≡ a (mod m).
(Symmetric property)
(c) If a ≡ b (mod m) and b ≡ c (mod m), then a ≡ c (mod m).
(Transitive property)
(d) If a ≡ b (mod m) and c ≡ d (mod m), then
a + c ≡ b + d (mod m) and
ac ≡ bd (mod m).
35
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE

(e) If a ≡ b (mod m), then


a ± c ≡ b ± c (mod m) and
a c ≡ b c (mod m).
(f) If a ≡ b (mod m), then
ak ≡ bk (mod m)
for any positive integer k.

36
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE
THEOREM 3
a ≡ b (mod m) if and only if a and b leave the same
remainder when divided by m.
example
33 ≡ 13 (mod 5);
both 33 and 13, when divided by 5,
leave the same remainder 3.

On the other hand,


when 32 and −3 are divided by 7,
the remainders are the same, 4,
so 32 ≡ −3 (mod 7).
37
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
COROLLARY
The integer r is the remainder when a is divided by m if
and only if a ≡ r (mod m), where 0 ≤ r < m. By this corollary,
every integer a is congruent to its remainder r modulo m; r
is called the least residue of a modulo m.

Examples
The least residues of 22, 4, and -2 modulo 5 are 2, 4, and 3,
respectively. Since,

22 ≡ 2 (mod 5), 4 ≡ 4 (mod 5) , -2 ≡ 3 (mod 5)


38
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
Examples
r  x (mod 5)
x -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
r 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0

The least residue of -10, -5, 0, 5, and 10 modulo 5 is 0.


The least residue of -9, -4, 1, and 6 modulo 5 is 1.
The least residue of -8, -3, 2, and 7 modulo 5 is 2.
The least residue of -7, -2, 3, and 8 modulo 5 is 3.
The least residue of -6, -1, 4, and 9 modulo 5 is 4.
39
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
COMPLETE SET OF RESIDUES MODULO m
A set of m integers is a complete set of residues
modulo m if every integer is congruent modulo m to exactly
one of them.
example
The set {−8, 13, 2, 27} is a complete set of residues
modulo 4 since
−8 ≡ 0 (mod 4),
13 ≡ 1 (mod 4),
2 ≡ 2 (mod 4),
and 27 ≡ 3 (mod 4).
40
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example

r  x (mod 4)
x -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
r 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3
The sets {-8, -7, -6, -5}, {-4, -3, -2, -1},
{0, 1, 2, 3}, {4, 5, 6, 7},…
are complete sets of residues modulo 4 since
r = {0, 1, 2, 3}
41
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE
THEOREM 4
If ac ≡ bc (mod m) and gcd(c, m) = d, then a ≡ b (mod m/d ).

Examples
a) Verify that 8  37 ≡ 8  7(mod 12).
gcd(8, 12) = 4, cancel 8 from both sides:
37 ≡ 7(mod 12/4)
37 ≡ 7 (mod 3)
12/4 |(37 − 7)
3|(37 − 7) 42
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE
THEOREM 4
If ac ≡ bc (mod m) and gcd(c, m) = d, then a ≡ b (mod m/d ).

Examples
b) Verify that 6  92 ≡ 6  (-4)(mod 32).
gcd(6, 32) = 2, cancel 6 from both sides:
92 ≡ -4 (mod 32/2)
92 ≡ -4 (mod 16)
32/2 |(92 − (-4))
16|(92 − (-4)) 43
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
1. Find the remainder when
1! + 2! + 3! +    + 2015! is divided by 8.
Solution:
1!(mod 8)  1 (1 + 2 + 6 ) ( m o d 8 )  9 ( m o d 8 )
2!(mod 8)  2 1
3!(mod 8)  6 Thus, the remainder is 1.
4!(mod 8)  24(mod 8)  0
5!(mod 8)  120(mod 8)  0
44
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. Find the remainder when 23145 is divided by 17.
Solution:
2 31  2 3( m o d 1 7)  6
2 3  6  3 6( m o d1 7 )  2
2 2

( )
2
 ( 2 )  4( m o d1 7 )  4
2
23  23
4 2

 (23 )
2
 ( 4 )  1 6( m o d1 7 )  1 6
8 4 2
23

 (23 )
2
 (1 6 )  2 5 6( m o d1 7)  1
16 8 2
23
45
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. Find the remainder when 23145 is divided by 17.
Solution:
2 3  ( 2 3 )  (1) ( m o d 1 7 )  1
2 2
32 16

2 36 4  1( m o d1 7)  1
23128
 1 ( m o d1 7)  1
1 2 8 +1 6 +1
23145
 23 ( m o d 1 7)
 2 3  2 3  2 3 ( m o d 1 7)
128 16 1

 1  1  6 ( m o d 1 7)
23145
 6 ( m o d1 7 ) So, the remainder is 6.
46
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
3. Find the last two digits of 14823.
Solution:
1 4  1 4( m o d 1 0 0)  1 4
1

1 4  1 9 6( m o d1 0 0)  9 6
2

1 4  ( 9 6 )  9 2 1 6( m o d1 0 0)  1 6
4 2

1 4  (1 6 )  2 5 6( m o d1 0 0)  5 6
8 2

 ( 5 6 )  3 1 3 6( m o d1 0 0)  3 6
16 2
14
 ( 3 6 )  1 2 9 6( m o d1 0 0)  9 6
32 2
14
47
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
3. Find the last two digits of 14823.
Solution:
 ( 9 6 )  9 2 1 6( m o d1 0 0)  1 6
64 2
14
 (1 6 )  2 5 6( m o d1 0 0)  5 6
128 2
14
 ( 5 6 )  3 1 3 6( m o d 1 0 0)  3 6
256 2
14
 ( 3 6 )  1 2 9 6( m o d 1 0 0)  9 6
512 2
14
5 1 2 + 2 5 6 + 6 4 +1
14 823
14 ( m o d 1 0 0)
 14 512
1 4 256
1 4 64
 1 4 ( m o d 1 0 0)
1

48
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
3. Find the last two digits of 14823.
Solution:
14 823
14 512
1 4 256
1 4
 1 4 ( m o d 1 0 0)
64 1
or
 9 6  3 6  1 6  1 4( m o d 1 0 0)  3 4 5 6  2 2 4( m o d 1 0 0)
 5 6  2 4( m o d 1 0 0)
 7 7 4 1 4 4( m o d1 0 0)
 1 3 4 4( m o d 1 0 0)
14 823
 4 4( m o d 1 0 0)  4 4( m o d 1 0 0)

Hence, 44 is the last two digits.


49
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
G ro u p a c t i v i t y n o. 3

1. Find the remainder when 1! + 2! + 3! +    + 2024! is


divided by 21.

2. Find the remainder when 192024 is divided by 28.

3. Find the last two digits of 37465.

4. Find the last three digits of 23527.

50
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
APPLICATIONS

51
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
APPLICATION OF DIVISION ALGORITHM

❑ Euler devised a method for solving Linear


Diophantine Equations that employs the
Division Algorithm, but not the Euclidean
algorithm.

❑ Euler’s Method involves solving the LDE for


the variable with the smaller coefficient of
the linear equation ax + by = c.

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example

Solve the following using Euler’s method.

1. Find the general solution of LDE


11x – 6y = 8.

2. Find the positive integral solution(s) of LDE


7x + 19y = 268.

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
1. Find the general solution of LDE 11x – 6y = 8.
S olution:
g c d (1 1, -6 ) = 1, 1 8, s o l u t i o n e x i s t s

Step 1. S olve for x or y w ith 1 1x – 6 y = 8


smaller coefficient -6 y = -1 1x + 8
regardless the sign. 6 y = 1 1x − 8
1 1x − 8
y=
6
5x − 2
y = x −1+ (1)
6

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
1. Find the general solution of LDE 11x – 6y = 8.
S olution:
Step 2. Equate rational part 5x − 2
o f (1) t o a n o t h e r
Let z = . ( 2)
6
variable as 6z = 5x − 2
parameter, then 5x = 6z + 2
back to Step 1. 6z + 2
x=
5
z+2
x= z+ ( 3)
5

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
1. Find the general solution of LDE 11x – 6y = 8.
S olution:
z+2
Step 3. Do Steps 1 and 2 Let w = . ( 4)
until there is no 5
rational expression 5w = z + 2
in the last z = 5w − 2 (5)
e q u a t i o n ( 5).
( 4)
(5)
z+2
Step 4. Use backward x= z + ( 3)
s u b s t i t u t i o n , ( 4) , (5) 5
x = 5w − 2 + w
i n ( 3 ) t o s o l v e f o r x.
 x = 6w − 2 (6)
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
1. Find the general solution of LDE 11x – 6y = 8.
S olution:
( 2)
Step 5. Use backward (6)
5x − 2
substitution, y = x −1+ (1)
( 6 ) , ( 2 ) , ( 5 ) i n (1) 6
(5)
t o s o l v e f o r y.
y = 6w − 2 − 1 + z
y = 6 w − 3 + 5w − 2
y = 1 1w − 5 (7)

 x = 6 w − 2 a n d y = 1 1w − 5, w 
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
1. Find the general solution of LDE 11x – 6y = 8.
S olution:
Checking
1 1x − 6 y = 8, x = 6 w − 2 a n d y = 1 1w − 5

1 1x − 6 y = 8
1 1 ( 6 w − 2 ) − 6 (1 1w − 5 ) = 8
6 6w − 2 2 − 6 6w + 3 0 = 8
8=8

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
2. Find the positive integral solution(s) of LDE 7x+19y=268.
S olution:
g c d ( 7,1 9 ) = 1, 1 268, solution exists

7x +19 y = 268 -5 y + 2
-1 9 y + 2 6 8
Let z = . ( 2)
x= 7
7 7 z = -5 y + 2
-5 y + 2 5 y = -7 z + 2
x = -2 y + 3 8 + (1) -7 z + 2
7 y=
5
-2z + 2
y = -z + ( 3)
5
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. Find the positive integral solution(s) of LDE 7x+19y=268.
S olution:
-2 z + 2
Let w = . ( 4) w
Let k = . (6)
5 2
5 w = -2 z + 2 w = 2k (7)
2 z = - 5w + 2
-5 w + 2 Backward substitution
z=
2 T o s o l v e f o r y,
w
z = -2 w + 1 − (5)
2

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
2. Find the positive integral solution(s) of LDE 7x+19y=268.
S olution:
Backward substitution T o s o l v e f o r y, u s i n g
T o s o l v e f o r z, u s i n g ( 4 ) , (8 ) , ( 7 ) i n ( 3) .
( 6) , ( 7 ) i n (5) . ( 4)
(6) (8)
(7) -2z + 2
w y=- z + ( 3)
z = -2 w +1− (5) 5
2 (7)
z = - 2 ( 2k ) + 1 − k
y = - ( - 5k + 1) + w
z = - 5k + 1 (8) y = 5k − 1 + 2 k
y = 7k − 1 (9)
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. Find the positive integral solution(s) of LDE 7x+19y=268.
S olution: C h e c k i n g : U s i n g ( 9 ) a n d (1 0 ) ,
T o s o l v e f o r x, u s i n g
7x +19 y = 268
( 9 ) , ( 2 ) , ( 8 ) i n (1) .
( 2)
7 ( -1 9 k + 4 1) + 1 9 ( 7 k − 1) = 2 6 8
(9) -1 3 3k + 2 8 7 + 1 3 3k − 1 9 = 2 6 8
-5 y + 2
x = -2 y + 3 8 + (1) 268 = 268
7
(8) T o solve for positive
x = -2 ( 7 k − 1) + 3 8 + z
integers the, x and y
should be greater than 0.
x = -1 4 k + 2 + 3 8 + ( -5k + 1)
x = -1 9 k + 4 1  0 a n d
x = -1 9 k + 4 1 (1 0 ) y = 7k − 1  0
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. Find the positive integral solution(s) of LDE 7x+19y=268.
S olution:
S olve for k  . If k = 1, t h e n I f k = 2, t h e n
-1 9 k + 4 1  0 a n d 7 k − 1  0
x = - 1 9 (1) + 4 1 x = -1 9 ( 2) + 4 1
-1 9 k  -4 1 a n d 7 k  1
x = 2 2, x = 3,
41 1
k and k  y = 7 (1) − 1 y = 7 ( 2) −1
19 7
1 41 y = 6. y =13.
k
7 19
1
k2
3  ( 2 2, 6 ) a n d ( 3,1 3 )
7 19
k = 1, 2
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. Find the positive integral solution(s) of LDE 7x+19y=268.
G raphical S olution:
( 3,1 3 )
7x +19 y = 268

( 2 2, 6 )

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


LINEAR CONGRUENCES
Recall the expression ax ≡ b (mod m) means that there
is k integer such that
ax = b + m k.
Hence, the congruencial equation in x,
ax ≡ b (mod m) is soluble iff the LDE
ax + m (-k) = b is soluble.
It is clear then that the congruence
ax ≡ b (mod m)
has a solution iff (a, m)|b.
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
LINEAR CONGRUENCES

THEOREM 4 .

The linear congruence ax ≡ b (mod m) is


solvable if and only if d | b , where d = (a, m).
If d | b , then it has d incongruent solutions.

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
I. Determine the number of incongruent solutions of
each linear congruence and its incongruent
solutions. Note: 0 ≤ t < d.
1. 42x ≡ 24 (mod 36)
2. 13x ≡ 25 (mod 31)

II. Using congruences, solve each LDE.


3. 3x +4y = 5
4. 7x – 11y = -12
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
1. 42x ≡ 24 (mod 36)
Since (42, 36) = 6 and 624 there are d = 6
incongruent solutions modulo 36.
0≤t<6 t x
42x ≡ 24 (mod 36) 0 4
1 10
7x ≡ 4 (mod 6) (by Theorems 4 and 2)
2 16
x ≡ 4 (mod 6)
3 22
x = 4 + 6t 4 28
 x={4, 10, 16, 22, 28, 34} 5 34
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
2. 13x ≡ 25 (mod 31)
(13, 31) = 1, 124 , d = 1 incongruent solution
13x ≡ 25 (mod 31)
-18x ≡ -6 (mod 31) 0≤t<1
3x ≡ 1 (mod 31) (by Theorem 4) t x
30x ≡ 10 (mod 31) (by Theorem 2) 0 21
- x ≡ 10 (mod 31)
x ≡ -10 (mod 31) (by Theorem 2)
x ≡ 21 (mod 31) (least residue)
x = 21 + 31t
 x = {21} ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example
3. 3x + 4y = 5 Replace x with 3 + 4t in
3x = 5 – 4y 3x + 4y = 5
3x = 5 + 4(- y) 3(3 + 4t) + 4y = 5
3x ≡ 5(mod 4) 9 + 12t + 4y = 5
- x ≡ 1(mod 4) 4y = 5 – 9 – 12t
x ≡ - 1(mod 4) 4y = - 4 – 12t
x ≡ 3(mod 4) y = - 1 – 3t
x = 3 + 4t  x = 3 + 4t ,
y = - 1 – 3t
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example

Checking:
3. 3x + 4y = 5
3(3 + 4t) + 4(-1 – 3t) = 5
9 + 12t – 4 –12t = 5
9–4=5
5=5

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


example
4. 7x – 11y = -12 Replace x with 3 + 11t in
7x = -12 + 11y 7x – 11y = -12
7x ≡ -12(mod 11) 7(3 + 11t) – 11y = -12
7x ≡ 10(mod 11) 21 + 77t – 11y = -12
-4x ≡ 10(mod 11) -11y = -12 – 21 – 77t
12x ≡ -30(mod 11) -11y = -33 – 77t
x ≡ 3(mod 11) y = 3 + 7t
x = 3 + 11t  x = 3 + 11t,
y = 3 + 7t
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
example

Checking:
4. 7x – 11y = -12
7(3 + 11t) – 11(3 + 7t) = -12
21 + 77t – 33 – 77t = -12
21 – 33 = -12
-12 = -12

ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.


G ro u p a c t i v i t y n o. 4
I. Find the general solution of each LDE:
1) 19 x + 8y = 46 2) 15 x – 23y = -4
II. Find the positive integral solution(s) of the following:
3) 12 x + 7 y = 214 4) 9 x + 13 y = 231
III. Two positive integers x and y satisfy
1 1 1 1 1 1
5) + = 6) + =
x + 2 y −1 7 x − 2 y +1 7
xy
Find the values of .
x+ y
74
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
G ro u p a c t i v i t y n o. 4
7. A four digit number has remainder 13 when divided
by 16, and has remainder 122 when divided by 125.
Find the minimum value of such four digit numbers.
8. A dragonfly has six feet and a spider has 8 feet.
Given that a certain group of dragonflies and spiders
have in total 132 feet, find the maximum total number of
dragonflies and spiders.
9. If a four digit number and the sum of its all digits have
a sum 2006, find the four digit number.
75
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
G ro u p a c t i v i t y n o. 4
10. Find the incongruent solutions of each
congruence.
a. 16x ≡ 12 (mod 20)
b. 40x ≡ 56 (mod 16)
11. Using congruences, solve each LDE.
a. 17x + 11y = -4
b. -8x + 13y = 12
76
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.

You might also like