Professional Documents
Culture Documents
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
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
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 )
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
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
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
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
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.
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)
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
33
ALGEBRA AND GEOMETRY • PROF. R.C. RIVERA, JR., M.Sc.
PROPERTIES OF CONGRUENCE
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
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.
Examples
The least residues of 22, 4, and -2 modulo 5 are 2, 4, and 3,
respectively. Since,
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)
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
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
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
( 2 2, 6 )
THEOREM 4 .
Checking:
3. 3x + 4y = 5
3(3 + 4t) + 4(-1 – 3t) = 5
9 + 12t – 4 –12t = 5
9–4=5
5=5
Checking:
4. 7x – 11y = -12
7(3 + 11t) – 11(3 + 7t) = -12
21 + 77t – 33 – 77t = -12
21 – 33 = -12
-12 = -12