Ma8551-Algebra & Number Theory (Iii Cse, It) Class Notes Unit-Iii Divisibility Theory and Canonical Decompositions
Ma8551-Algebra & Number Theory (Iii Cse, It) Class Notes Unit-Iii Divisibility Theory and Canonical Decompositions
Ma8551-Algebra & Number Theory (Iii Cse, It) Class Notes Unit-Iii Divisibility Theory and Canonical Decompositions
CLASS NOTES
UNIT-III DIVISIBILITY THEORY AND CANONICAL DECOMPOSITIONS
Division algorithm – Base – b representations – Number patterns – Prime and composite
numbers – GCD – Euclidean algorithm – Fundamental theorem of arithmetic – LCM.
DIVISIBILITY:
An integer b is divisible by an integer ‘a’ (a 0) if there is an integer x such that b=ax and we
write it as a|b. If b is not divisible by a, then we write it as a | b.
Theorem:
1. Prove the following:
(1). a|b implies a|bc for any integer
Proof:
Given a|b by definition b=ax …..(1) for some integer x
Multiply (1) by c
bc = acx
bc = a(cx), where z = cx an integer
bc=az a|bc
Proof:
Assume that a / b and b / c
Proof:
1
By definition, b=ax1, where x1 is an integer.
Multiply both side by x, bx =a x x1….(1)
Assume that a|c then c = ay1 , for someinteger y1
cy = ayy1 (2)
Proof:
Given a|b by definition b=ax …..(1) for some integer x
b|a a=by (2) for some integer y
(5). If m 0, a|b ma | m b
Proof:
Given a|b by definition b=ax …..(1) for some integer x.
2
THE DIVISION ALGORITHM:
Let a be any integer and b be a positive integer. Then there exist unique q and r such that
a = b q + r , where 0 r < b , and where a is dividend, b is divisor, q is quotient and r is remainder.
Proof:
Existence Part
Let S = a − bn : n Z and a − bn 0
To show that r b :
We will prove by contradiction .
Assume r b. Then r − b 0. But r − b = ( a − bq ) − b = a − b ( q + 1) .
Uniqueness Proof:
Let there be two sets of integers q, r and q ', r ' such that
a = bq + r − − − − − (1)
and a = bq '+ r ' − − − − − (2)
3
Assume that q q ', from (1) and (2)
bq + r = bq '+ r ' b ( q − q ') = r '− r − − − − − (3)
with r '− r b − − − − − (4)
sin ce r ' b and r b
Examples:
Find the quotient and the remainder
1. when 207 is divided be 15 : 207 = 15 13 + 12, q = 13 and r = 12
4
i.e., x = bq1 + r and y = bq2 + r
x − y = b(q1 − q2 ) b ( x − y ) .
i =1
Ai =
1i n
Ai −
1 i j n
Ai Aj +
1i j k n
Ai Aj Ak − ...... + (−1)n +1
i =1
Ai
Problem:
1. Find the number of positive integer 2076 and divisible by neither 4 or 5.
Soln:
Let A = x N / x 2076 and divisible by 4 , B = x N / x 2076 and divisible by 5
then A B = A + B − A B
= 2076 / 4 + 2076 / 5 − 2076 / 20
= 519 + 415 − 103 = 831
Thus, among the first 2076 positive integer, there are 2076-831=1245 integers not divisible by 4 or 5.
2. Find the number of positive integers in the range 1976 through 3776 that are divisible by13.
Soln:
1976
The number of positiveintegers 1976 that are divisible by 13 = = 152 = 152
13
3776
The number of positiveintegers 3776 that are divisible by 13 = = 290.46 = 290
13
The number of positiveintegers1976 to 3776 that are divisible by 13
= 290 − 152 + 1
= 139 [ 1976 is included in the list of numbers divisible by 13]
5
A B C = S1 − S2 + S3
Now
3000
A = = 1000 = 1000
3
3000
B = = 600 = 600
5
3000
C = = 428.57 = 428
7
S1 = A + B + C = 1000 + 600 + 428 = 2028
3000
AB = = 200 = 200
3 5
3000
A C = = 142.85 = 142
3 7
3000
B C = = 85.71 = 85
5 7
S2 = A B + A C + B C = 200 + 142 + 85 = 427
3000
Now S3 = A B C = = 28.57 = 28
3 5 7
A B C = S1 − S2 + S3 = 2028 − 427 + 28 = 1629
= k 2 + 2k + 1 + k + 1 = ( k 2 + k ) + ( 2k + 2 ) = Even number
hence p(n)=n 2 + n is even integer n.
Soln:
n 2 - n = n (n -1) It is two consecutive number. So it is divisible by 2
To Prove : n 5 - n is divisible by 6
n5 -n = n (n4 −1) = n (n2 −1)(n2 + 1) = n(n −1)(n + 1)(n2 + 1) = (n −1)n(n + 1)(n2 + 1)
Now, as we know that product of 3consecutive natural numbers is always divisible by3and that of 2
consecutive natural numbers is always divisible by2 so this expression is always divisible by6.
6
6. Show that 30|n5 -n, where n is an arbitrary integer
Soln:
First we prove n 5 - n is divisible by 6
n5 -n = n (n4 −1) = n (n2 −1)(n2 + 1) = n(n −1)(n + 1)(n2 + 1) = (n −1)n(n + 1)(n2 + 1)
Now, as we know that product of 3consecutive natural numbers is always divisible by3 and that of 2
consecutive natural numbers is always divisible by 2 so this expression is always divisible by6.
Now to prove divisibility by5, first we write the factorization as under
(
n (n − 1) (n + 1) (n 2 + 1) = n (n − 1) (n + 1) ( n 2 − 4 ) + 5 )
= n (n − 1) (n + 1) ( ( n − 2 )( n + 2 ) + 5 )
= n (n − 1) (n + 1)(n − 2)( n + 2) + 5n (n − 1) (n + 1)
We see that second term is divisible by 5and first term is also divisible by5 as it is product of 5
consecutive natural numbers. Hence, the given expression is divisible by 5×6=30.
Soln:
Let n, n+1, n+2 be the three consecutive integers.
Given n 3 + ( n + 1) + ( n + 2 ) is a cube k 3
3 3
n 3 + n3 + 3n 2 + 3n + 1 + n 3 + 3n 2 2 + 3n 22 + 23 = k 3
3n 3 + 9n 2 + 15n + 9 = k 3
3 ( n 3 + 3n 2 + 5n + 3) = k 3
3 | k3 3 | k k k
Since 3 is a prime,3 | k
Base-b representation:
The expression ak b k + ak −1b k −1 + ..... + a1b + a0 is the base-b representation of theinteger N.
Accordingly, we write N = ( ak ak −1.....a1a0 )b in base b.
7
Hexadecimal Expansion:
The base 16 expansion of an integer is called its hexadecimal expansion. Hexadecimal Expansion
uses the sixteen digits 0,1,2,3,…9,A,B,C,D,E,and F. Where the letters A to F represent the digits 10
to 15 respectively (in decimal notation).
Problem:
1. Express ( 101011111) 2 in base 10.
Soln:
(101011111) 2
= 1(28 ) + 0(27 ) + 1(2 6 ) + 0(25 ) + 1(2 4 ) + 1(2 3 ) + 1(2 2 ) + 1(21 ) + 1(20 )
= 256 + 64 + 16 + 8 + 4 + 2 + 1 = 351
Soln:
We know A=10,B=11,E=14
( 3AB0E ) 16
= 3(164 ) + A(163 ) + B(162 ) + 0(161 ) + E (160 )
= 3(164 ) + 10(163 ) + 11(162 ) + 0(161 ) + 14(160 )
= 196608 + 40960 + 2816 + 14 = 240398
8
b 2 + 4b + 4 = 49
b 2 + 4b − 45 = 0
( b + 9 )( b − 5 ) = 0
sin ce b −9,
b = 5
Number Patterns:
Consider the following number patter,
1 9 + 2 = 11
12 9 + 3 = 111
123 9 + 4 = 1111
1234 9 + 5 = 11111
In general,
123(n) 9 + ( n + 1) = 11111
n +1 ones
1. Add two more rows to the following pattern, and write conjecture formula for the nthrow:
9 9 + 7 = 88
98 9 + 6 = 888
987 9 + 5 = 8888
9876 9 + 4 = 88888
98765 9 + 3 = 888888
Soln:
The next two rows of the given patterns are,
987654 9 + 2 = 8888888
9876543 9 + 1 = 88888888
The general pattern is
98765.....(10 − n) 9 + (8 − n) = 888.....88
( n +1) Eights
9
Soln:
nth row is : 102 n − 10n + 1 = 999 9 000 0 1
n times (n-1) times
So, we have a prime p which is not in the list of n primes. Thus, we have n+1 primes p1 , p2 , p 3 ,..., pn , pn +1
Which contradicts the assumption there are only n primes.
So, our assumption of finiteness is wrong. Hence the number of primes is infinite.
10
To prove it is true for k+1:
If k+1 is a prime, then k+1 is a prime factor of k+1.
If k+1 is not a prime, then k+1 must be a composite number.
So, it must have factor d, where d k . Then by the induction hypothesis, d has a prime factor p.
Since p | d and d | k+1, we have p | k+1. So p is a factor of k+1.
Hence by second principle of induction the statement is true for every integer >1
Every integer n 2 has a prime factor.
Proof:
Given n is a composite number.
Then there exist positive integer a and b such that n=ab, where 1<a<n, 1<b<n.
We will prove a n or b n.
Suppose a n and b n
Then a b n n = n
a b n
Theorem:
n n n
( )
( n ) = n −1+ n − + −
i j pi p j
+ ... + ( −1)
n n
i pi
i j k pi p j p k i j k ... r p i p j p k ....p r
Problem:
1. Show that 101 is a prime.
Soln:
11
Given number is 101. First we find all prime 101 = 10.
The primes are 2,3,5,7. Since none of these are a factor of 101.So 101 is prime number.
2. Determine if 1601 is a prime number.
Soln:
We know that if n has no prime factors n , then n is a prime consider prime number 1601
prime number ≤ 40 (approx.)
2,3,5,7,11,13,17,19,23,29,31 and 37 and which are not factors of 1601
Therefore, 1601 is a prime
3. Find the number of primes 100
Soln:
12
1. Theorem:
For every positive integer n, there are n consecutive integers that are composite numbers.
Proof:
Consider the n consecutive integers
( n + 1)!+ 2, ( n + 1)!+ 3,....., ( n + 1)!+ ( n + 1) Where n 1.
Let 2 k n + 1
2| ( n + 1)!+ 2 ,3| ( n + 1)!+ 3 ,....., ( n + 1) | ( n + 1)!+ ( n + 1)
( n + 1)!+ 2, ( n + 1)!+ 3,....., ( n + 1)!+ ( n + 1) are n consecutive integer which
are composite numbers.
Soln:
By theorem, for every integer n, there are n consecutive integers that are composite numbers. Then
the six consecutive composite numbers are
( n + 1)!+ 2, ( n + 1)!+ 3, ( n + 1)!+ 4, ( n + 1)!+ 5, ( n + 1)!+ 6, ( n + 1)!+ 7
put n = 6
The six consecutive composite numbers are5042, 5043,5044,5045,5046, and 5047
3. Prove that any prime of the form 3k+1 is of the form 6k+1.
Soln.:
Let the prime p=3k+1, then k must be even.
[if k is odd, then 3k is odd 3k+1 is even 3k+1 is not prime]
k=2k, then p=3(2k)+1=6k+1.
Hence any prime of the form 3k+1 is of the form 6k+1.
4. Show that product of k consecutive integers is divisible by k!
Proof:
Let ( n + 1) , ( n + 2 ) , , ( n + k ) be the 'k' consecutive integer.
13
Product of 'k' consecutive integer = ( n + 1)( n + 2 ) ( n + k )
n!
= ( n + 1)( n + 2 ) ( n + k )
n!
=
( n + k )!
n!
k!( n + k )!
Product of 'k' consecutive integer= = k! n + rCr = Integer
k! n!
Hence the product of k consecutive integers is divisible by k!
Greatest Common Divisor(GCD)
Definition:
The greatest common divisor of two integer a and b, not both zero, is the largest positive integer
that divides both a and b. It is denoted by gcd (a,b) or (a,b).
For example, (3,15)=3,(12,18)=6,(-15,20)=5
Since (a,-b)=(-a,b)=(-a,-b)=(a,b)we confine our discussion of gcd to positive integers.
Definition:
A positive integer d is the gcd of integers a and b if
(i). d | a and d | b
(ii).If c | a and c | b, then c | d , where c is a positive integer.
Relatively Prime:
If ( a, b ) = 1 , then the integers a and b are said to be relatively prime.
1. (Euler) Prove that the GCD of the positive integers a and b is linear combination of a &b.
Proof:
LetS be the set of positive linear combination of a and b; that is S = ma + nb / ma + nb 0, m, n Z
To show that S has a least element:
Since a 0, a = 1 a + 0 bS , S is non empty. So, by the well-ordering principle,
S has a least positive element d.
To show that d = ( a, b ) :
Since d belongs to S, d = a + b for some integer and .
(1).First we will show that d / a and d / b :
By the division algorithm, there exist integers q and r such that a = dq + r ,
where 0 r d . Substituting for d.
14
r = a − dq
= a − ( a + b ) q
= (1 − q ) a + ( − q ) b
This shows r is a linear combination of a and b.
If r 0, then r S . Since r d , r is less than the smallest element in S.
Which is a contrdiction . So r = 0; thus, a = dq, so d|a.
Similarly, d|b. Thus d is common divisor of a and b.
(2).To show that any positive common divisior d ' of a and b is d :
Since d ' | a, and d ' | b d ' | ( a + b )
that is d ' | d . So d ' d .
Thus, by parts (1) and (2), d = ( a, b )
2.Two positive integer a and b are relatively prime if and only iff there are integers
α and β such that a + b =1.
Proof:
Assume that a and b are relatively prime, then (a,b)=1
We know that, there exist integer α and β such that
(a, b) = a+ b
1= a+ b
Conversely, assume that there exist integers α and β such that a+ b=1.
Let d=(a,b). Then d|a and d|b.
d | ( a+ b) d|1 d=1
(a,b)=1 a and b are relatively prime.
15
we have p | pb + ab p | b ( p + a ) p | b 1 p | b
a b
4. If d=(a,b), then , = 1
d d
Proof:
Since d is gcd of a and b d is positive integer
d=(a,b) there exist integers α and β such that d= a+ b
a b
1= +
d d
a b
by the above theorem and are relatively prime
d d
a b
, =1
d d
5. If (a,b)=1=(a,c) then (a,bc)=1
Proof:
(a,b)=1 there exist integers α and β such that a+ b=1-----(1)
(a,c)=1 there exist integers and such that a+ c=1 − − − − − (2)
Using (2) in (1),
a + b(1) = 1
a + b( a+ c) = 1
a + ab+ bc=1
( + b ) a+ ( ) bc=1 (a,bc)=1
6. Prove that (a, a − b) = 1 if and only if (a, b) = 1
Proof:
Let ( a, b ) = 1
Then there exist integer l and m such that
la + mb = 1
la + ma + mb − ma = 1
(l + m)a − m(a − b) = 1
(l + m)a + (−m)(a − b) = 1 ( a, a − b ) = 1
16
Conversely, let ( a, a − b ) = 1. To prove : ( a, b ) = 1
Then there exist integer and such that
a + ( a − b) = 1
a + a − b = 1
( + ) a + (− )b = 1 ( a, b ) = 1
Hence the proof.
7. If d = ( a, b ) and d' is any common divisor of a and b, then d'|d.
Proof:
Since d = ( a, b ) , , α and β such that d = a + b.
also since d' is common divisor of a &b. d' | a &d' | b
d' | ( αa+βb ) ; so d'|d.
17
Problem:
1. Find the GCD of 1819 & 3587.
Soln:
(3587,1819) = 11819 + 1768
(1819,1768) = 11768 + 51
(1768,51) = 34 51 + 34
(51,34) = 1 34 + 17
(34,17) = 2 17 + 0
gcd of 1819,3587 is 17
18
( 4076,1024 ) = 4 = 1004 − 50 20
=1004 − 50 (1024 − 11004 )
= 511004 − 50 1024
= 51( 4076 − 3 1024 ) − 50 1024
= 51 4076 + ( −203) 1024
5. Apply Euclidean Algorithm to express the gcd of (1976, 1776) as a linear combination of
1976, 1776.
Soln.:
By successive application of division algorithm, we get:
1976 = 11776 + 200
1776 = 8 200 + 176
200 = 1176 + 24
176 = 7.24 + 8
24 = 3 8 + 0
Since the last nonzero remainder is (1976,1776 ) = 8
(1976,1776 ) = 8 = 176 − 7 24
=176 − 7 ( 200 − 1 176 )
= 8 176 − 7 200
= 8 (1776 − 8 200 ) − 7 200
= 8 1776 − 71 200
19
(15, 28,50 ) = (15,50, 28 )
= ( (15,50 ) , 28 )
= ( 5, 28 ) = 1
1 is the GCD (15, 28,50 )
Proof:
First, we will show by strong induction that n either is a prime or can be expressed as a product of
primes.
Let P(n) denote the statement that n is a prime or can be expressed as a product of primes.
20
Thus by strong induction, the result holds for every integer n 2
(ii) To Establish the Uniqueness of the Factorization:
Let n be a composite number with two factorization into primes; n = p1 p2 pr = q1q2 qs
we will show that r = s and every p i equals some q j ,where 1 i, j r ; that is, the primes q1 , q2 ,.....qs
are a permutation of the primes p1 p2 pr
Assume, for convenience that r s. since
p1 p2 pr = q1q2 qs , p1 / q1q2 qs , p1 = qi for some i. Dividing both sides p1 , we get:
p2 ..... pr = q1q2 ...qi −1q i qi +1 ...q s
Now, p2 divides the RHS , so p2 = q j for some j. cancel p2 form both sides :
p3 .....p r = q1q2 ...qi −1q i qi +1...q j −1q j q j +1qs
Since r s, continuing like this, we can cancel pt with some qk . This yields a 1 on the LHS at the end.
Then the RHS cannot be left with any primes, since a product of primes can never yield a 1; thus, we
must have exhausted all qk ' s by now. therefore, r = s and hence the primes q1 , q2 ,.....qs are the same as
the primes p1 p2 pr in some order. Thus, the factorization on n is unique, except for the order in
which the primes as written.
Note:
(i). Every composite number n can be factored into primes. Such a product is the prime power
decomposition of n.
(ii). If the primes occur in increasing order, then it is called a Canonical decomposition.
Problem:
1. Using canonical decomposition of 168 and 180 find their GCD.
168 = 23 3 7 180 = 22 32 5
GCD = (168, 280 ) = 22 3 = 12
= ( 7 )( 73)
21
Problem:
1. Using canonical decomposition of 1050 and 2574.
Soln.:
1050 = 2 3 5 7
2574 = 2 32 1113
1050, 2574 = 2 3 2
52 7 1113 = 450450
2. Using canonical decomposition of 168 and 180 find their GCD and LCM.
Soln.:
168 = 23 3 7 180 = 22 32 5
GCD = (168, 280 ) = 22 3 = 12
LCM = 168, 280 = 23 32 5 7 = 2520
22
Relation between GCD and LCM:
Theorem:
ab
a,b =
Let a and b be positive integers. Then
( a,b )
(or)
Prove that the product of gcd and lcm of any two positive integers a and b is equal to their
products.
Proof:
Let a = p1a1p2a2 .....pnan , b=p1b1pb22 .....pbnn be the canonical decomposition of a and b. Then
( a, b ) = p1mina1,b1pmina2 ,b2
.....p n n n
min a ,b
2
a, b ( a, b ) = p1 1 1 1 1p 2 2 2 2 2.....p n n n n n
max a ,b + min a ,b max a ,b + min a ,b max a ,b + min a ,b
(
= p1a1 p 2a2 .....p nan )( p b1 b2 bn
1 p 2 .....p n )
= ab
ab
Hence a,b =
( a,b )
Problem:
1. Using (252, 360) compute [252, 360].
Since GCD of (252,360) = 36
ab
a, b =
( a, b )
252 360
252, 360 = = 2520
36
23
2. For positive integer n, find (n, n+1) and [n, n+1]
Soln.:
Since n and n+1 are the two consecutive integer. For any two consecutive integers are relatively
primes. So (n, n+1)=1.
By formula, a, b = ab = n(n+1) = n +n 2
( a, b ) 1
a = −12,11
Since a is positive integer, a = 11
24