You are on page 1of 19

MA8551- ALGEBRA & NUMBER THEORY (III CSE, IT)

CLASS NOTES
UNIT-IV LINEAR DIOPHANTINE EQUATIONS AND CONGRUENCES
Linear Diophantine Equation
The linear Diophantine equations are the simplest class of Diophantine equations.
The general form of a linear Diophantine equation (LDE) is two variables x and y is
ax  by  c, where a, b, c areintegers.
Theorem
The linear Diophantine equation ax  by  c is solvable if and only if d | c, where d  (a, b) . If
x0, y0 is a particular solution of the linear Diophantine equation, then all its solutions are given by

b a
x  x0    t and y  y0    t , t  Z
d  d 
1. Determine whether the LDE 2 x  3 y  4 z  5 is solvable?
Solution:
The gcd (2,3, 4)  1
i.e., (2,3, 4)  1 and 1/ 5
The given LDE is Solvable.
2. Find the general solution of the LDE 15x  21y  39
Solution:
15 x  21y  39  a  15, b  21, c  39.
d  (15, 21) and d / 39  d  3
So, the given LDE is solvable.
15 x  21 y  39
 5 x  7 y  13        (1)
then (5, 7)  d  1
 d /13
a  5, b  7, d  1

We find x0  3, y0  4 is a solution of (1) is

b a
x  x0  t and y  y0  t , t Z
d d

1
7 5
x  3  t and y  4  t , t  Z
1 1
x  3  7t and y  4  5t , t  Z
3. Find the general solution of the LDE 6 x  8 y  12 z  10
Solution:
Given the LDE is 6 x  8 y  12 z  10      (1)

Here a1  6, a2  8, a3  12, c  10

 (a1 .a2 , a3 )  (6,8,12)  2 and c  10

 d  (a1 .a2 , a3 )  2
Since 2 | 10, d | c
So, the given LDE is solvable.
Since 8 y  12 z is a linear combination of 8and 12, it must bea multiple of (8,12)  4
 8 y  12 z  4u        (2)
 (1)  6 x  4u  10        (3)
First we solve the LDE (3) in two variables x and u
Here a  6, b  4, c  10
(a, b)  (6, 4)  2
d  (a, b)  2 and c  10
Since 2 | 10, d | c
So, the given LDE (3) is solvable.

We find x0  1, u0  1 is a solution of (3) is

b a
x  x0  t and u  u0  t, t Z
d d
4 6
x  1 t and u  1  t , t  Z
2 2
x  1  2t and u  1  3t , t  Z
Substituting for u in (2), we get
 8 y  12 z  4(1  3t )

2
a b 
Since d=    4 and 4  2.8  (1).12 is a linear combination of 8 and 12.
 8, 12 
Multiplying by (1  3t ), we get
4(1  3t )  2(1  3t ).8  (1)(1  3t ).12
 (2  6t ).8  (1  3t ).12
 a solution of (2) is

y0  2  6t and z0  1  3t , t  Z
So, the generalsolution of (2) is
b a
y  y0  t' and z  z0  t ', t '  Z
d d
12 8
y  2  6t  t' and z  1  3t  t ', t '  Z
4 4
y  2  6t  3t ' and z  1  3t  2t ', t '  Z
Thus the general solution of (1) is
x  1  2t , y  2  6t  3t ', z  1  3t  2t ', t '  Z
Congruence modulo m
If an integer m ( 0) divides the difference a  b , we say that a is congruent to b modulo m.
(i.e) a  b(mod m).

4. Solve the congruence 4 x  5(mod 6).

Solution:
4 x  5(mod 6)
Here a  4, b  5, m  6
(a, m)  (4, 6)  2
 2 / 5 (i.e) (a, m) / b
 The congruence has no solution.

5. Show that n2+ n  0(mod 2) for any positive integer n.


Proof:
a  b (mod k )  a  b  km, m  z
a  b is divisible by k

3
n  even  2m
n2  n  (2m)2  (2m)

 4m2  2m
 2(2m2  m)

n2  n is divisible by 2
n  odd  2m  1

n2  n  (2m  1)2  (2m  1)


 4m 2  4m  1  2m  1

 4m 2  6m  2
 2(2m2  3m  1)

n2  n is divisible by 2
 n2  n  0(mod 2)
6. Let a  b (mod m) and c  d (mod m), then prove that ac  bd (mod m).
Solution:
Since a  b (mod m) and c  d (mod m),
a  b  lm and c  d  km for some inegers l and m.
Then ac  bd  (ac  bc)  (bc  bd )
 c ( a  b )  b (c  d )
 clm  bkm
 (cl  bk )m
So ac  bd (mod m)
7. Let a  b (mod m) and c  d (mod m), then prove that a  c  b  d (mod m).
Solution:
Since a  b (mod m) and c  d (mod m),
a  b  lm and c  d  km for some inegers l and m.
Then a  c  (b  lm)  (d  km)
 (b  d )  (l  k )m
 b  d (mod m)
8.If ac  bc (mod m) and (c, m)  1, then prove that a  b (mod m).
Solution:

4
Suppose ac  bc (mod m), where (c, m)  1.
Then m | (ac  bc)  m | c(a  b).
we know that : If a and b are relatively prime, and if a | bc, then a | c.
But (m, c)  1, m | (a  b), (i.e) a  b (mod m)
Complete residue system.
A set x1 , x2 ,...., xm is a complete residue system mod m if for integer y , there is one and only one x j

such that y  x j (mod m) .

9. Solve x7  1  0(mod 7)
Solution:
The complete residuesystem (CRS ) is 0,1, 2,3, 4,5, 6
But 4  3 (mod 7)
5   2 (mod 7)
6   1 (mod 7)
The CRS is {0, 1, 2, 3}
The CRS does not satisfy the congruence x 2  1  0(mod 7)
 The given congruence has no solution.

10.Find the remainder when 1653 is divided by 7.


Solution:
First reduce the base to its least residue
16  2(mod 7).
We know that If a  b (mod m), then a n  b n (mod m) for any positiveinteger n

1653  253 (mod 7).


Now express a suitable power of 2 congruent mod ulo 7 to a number less than 7,

23  1 (mod 7)
 253  23(17)  2
 (23 )17 .22
117.4(mod 7)
 4(mod 7)

So1653  4(mod 7), by the transitive property.


Thus, when1653 is divided by 7, the remainder is 4.

5
11. Find the remainder when 1! 2! 3! ....  300! is divided by 13.
Solution:
For divisibility by 13, we consider mod 13.
For r  13, r ! will contain 13 as a facor.
 r !  0(mod13)
1! 2! 3! 4! ......  12! .....  300!
1! 2! 3! 4! ......  12! 0  0  (mod13)
 1! 2! 3! 4! ......  12!(mod13)
 1  2  6  24  120  ....  12!(mod13)
But 2  24  26  0(mod13)
5!  120  3(mod13)
6!  5!6  3.6 (mod13)
 18(mod13)
 5(mod13)
7!  6!7  5.7 (mod13)
 35(mod13)
 9 (mod13)
8!  7!8  9.8(mod13)
 72(mod13)
 7 (mod13)
9!  8!9  7.9(mod13)
 63(mod13)
11(mod13)
10!  9!10  11.10(mod13)
 110(mod13)
 6 (mod13)
11!  10!11  6.11(mod13)
 66(mod13)
1(mod13)
12!  11!12  1.12(mod13)
 12(mod13)
1! 2! 3! 4! ......  12! .....  300!  1  6  0  3  5  9  7 11  6 1 12(mod13)

6
 61(mod13)  9(mod13)
 the remainder is9 when1! 2! 3! 4! ...... 12! .....  300! is divided by13.

12. Find the remainder when 3181 is divided by 17 using modular exponentitation.
Solution:
32  9(mod17); 34  4(mod17); 38  1(mod17); 316  1(mod17)
332  1(mod17); 364  1(mod17);
3128  1(mod17)

 3181  3128.332.316.34.31
1.1.1.13.3 (mod 17)
 5(mod17)
Thus the desired remainder is 5.

13. Find the remainder when 331 is divided by 7.

32  2 (mod 7)
(32 )3  23 (mod 7)  1(mod 7)
36  1(mod 7)

 331  (36 )5 .3
15.3 (mod 7)
 3(mod 7)
Thus the remainder is 3.

14. Prove that 42n + 10n  1(mod 25).


Solution:
42 n  10n  1(mod 25)
proof by mathematicalinduction
n  0
(40  0)  1  1  1  0
 0 is divisible by 25
statement is true for n  0.

n  1, (42  10)  1  25
 25 is divisible by 25

7
statement is true for n  1.
Assume that the statement is true for n  k

(ie), 42 k  10k  1  25l


Consider 42 k  2  10(k  1)  1
 42 k .16  10k  10  1
 16(25l  10k  1)  10k  9
 16(25l )  160k  16  10k  9
 16(25l )  150k  25
 25(16l  6k  1)
 25( y)

42 k  2  10(k  1)  1 is divisible by 25
Statement is true for n  k  1
By principle of mathematical induction,
Statement is true for all n.

15. Find the remainder when (n2  n  41)2 is divisible by 12.


Solution:
First notice that product of four consecutive integers is divisible by12,
(ie), (n  1)n(n  1)(n  2)  0(mod12)
(n2  n  41)2  (n 2  n  5)2 (mod12)

 (n4  2n3  11n2  10n  25) (mod12)


 n(n3  2n2  n  2)  1 (mod12)

 n  n2 (n  2)  (n  2)   1 (mod12)
 n((n  2)(n2  1)  1 (mod12)
 (n  1)n(n  1)(n  2)  1 (mod12)
1 (mod12)
Thus when (n2  n  41)2 is divided by12, the remainder is 1.
16. Compute the remainder when 3247 is divisible by 25.

Solution:

We have to find the remainder when 3247 is divisible by 25.

8
We have 32  9(mod 25)

34  92  81  6 (mod 25)

38  62  36  11 (mod 25)

316  112  121  21 (mod 25)

332  212  16 (mod 25)

364  162  6 (mod 25)

3128  62  11 (mod 25)

3247  3128643216 4 21

 3128.364 .332 .316.34 .32 .3

3247  11.6.16.21.6.9.3 (mod 25)

 11 (96) (21) (54)3 (mod 25)

 11 (4) (4) (4) 3 (mod 25)

 44.48 (mod 25)

 (6) (2) (mod 25)

12 (mod 25)

 the remainder is 12 when 3247 is divisible by 25.

17.Find the remainder when 3181 is divided by 17 using modular exponentitation.


Solution:
32  9(mod17); 34  4(mod17); 38  1(mod17); 316  1(mod17)
332  1(mod17); 364  1(mod17); 3128  1(mod17)

9
 3181  3128.332.316.34.31
1.1.1.13.3 (mod 17)
 5(mod17)
Thus the desired remainder is 5.

18.Find the remainder when 1653 is divided by 7.


Solution:
First reduce the base to its least residue
16  2(mod 7).
We know that If a  b (mod m), then a n  b n (mod m) for any positiveinteger n

1653  253 (mod 7).


Now express a suitable power of 2 congruent mod ulo 7 to a number less than 7,

23  1 (mod 7)
 253  23(17)  2
 (23 )17 .22
117.4(mod 7)
 4(mod 7)

So1653  4(mod 7), by the transitive property.


Thus, when1653 is divided by 7, the remainder is 4.

19.Prove that p is a prime iff (p – 1)! +1  0(mod p).


Proof:
Suppose p is not a prime then p  p1 p2
where 1  p1 & p2  p  1

since 1  p1  p1  1, we find p1 is a factor of ( p  1)!


(ie) p1 ( p  1)! Also p1 p
we are given ( p  1)! 1  0(mod p)
 p ( p  1)!  1
 p1 ( p  1)!  1

Thus p1 ( p  1)!  1 & p1 ( p  1)!


p1  ( p  1)! 1  ( p  1)!
 p1 1

10
which is not possible  p1  1
Hence p must be prime.

Linear Congruence
A congruence of the form ax  b (mod m), where m is a positive integer and a,b are integers and
x is a variable, is called a linear congruence.
Chinese remainder theorem.
Let m1 , m2 ,...., mr denote r positive integers that are relatively prime in pairs and let a1 , a2 ,...., ar

be any r integers. Then the congruence x  ai (mod mi ), i  1, 2,...., r have common solution.

State and prove Chinese remainder theorem.


Let m1 , m2 ,...., mr denote r positive integers that are relatively prime in pairs and let a1 , a2 ,...., ar

be any r integers. Then the congruence x  ai (mod mi ), i  1, 2,...., r have common solution.

Proof:
First we prove the existence of the solution

Let n  m1 . m2 .m3. ...mk


n
Let ni  , i  1, 2,3,...., k.
mi

Since m1 . m2 .m3. ...mk are pairwise relatively prime


(ni , mi )  1, i  1, 2,3,...., k
Also ni  0(mod m j ), i  j

1.First we construct a solution to the linear system.


Since (ni , mi )  1, the congruence ni yi  1(mod mi ) has a unique solution yi , i  1, 2,3,...., k
Let x  a1 n1 y1  a2 n2 y2  .......  ak nk yk
Now, we will show that x is a solution of the system of congrunces.
Since ni  0 (mod mk ) for i  k , all terms except the k th term in this are
congruent to 0 modulo mk

Since nk yk  1(mod mk ), we see that x  ak nk yk  ak (mod mk ),for k  1, 2,3,..., n


Thus x satisfies every congruence in the system.
Hence x is a solution of the linear system.
2. Next toshow that the solution is unique modulo n  m1 .m2 .....mk .
Let x1 , x2 be two solutions of the system
To prove x1  x2 (mod n)

11
Since x1  a j (mod m j ) and x2  a j (mod m j ), j  1, 2,3,...., k
we have x1  x2  0(mod m j )
 m j | x1  x2 for every j

Since m1 , m2 ,..., mk are pairwise ralatively prime,


LCM [ m1 , m2 ,..., mk ]  m1 , m2 ,..., mk | x1  x2
 n | x1  x2  x1  x2 (mod n)
Hence the solution is unique mod m1 , m2 ,..., mk .
20. Use the Chinese remainder theorem to solve x  1(mod 3), x  2(mod 4), x  3(mod 5).
(OR)
Find the least positive integer that leaves the remainder 1 when divided by 3, 2 when divided by
4 and 3 when divided by 5.
Solution:
Given system is x  1(mod 3)
x  2 (mod 4)
x  3(mod 5)
Here a1  1, a2  2, a3  3
m1  3, m2  4, m3  5

We find m1 , m2 , m3 are pairwise relatively prime

Let n  m1 m2 m3  3.4.5  60

n 3.4.5
and n1    20
m1 3
n 3.4.5
n2    15
m2 4

n 3.4.5
n3    12
m3 5

1.Wefind y1 , y2 , y3 from the congrunces

n1 y1  1(mod m1 )
n2 y2  1(mod m2 )
n3 y3  1(mod m3 )

12
We have n1 y1  1(mod m1 ),
20 y1 1(mod 3),
Since 20.2  40  1(mod 3), we see y1  2 is a solution

We have n2 y2  1(mod m2 ),
15 y2 1(mod 4),
Since 15.3  45  1(mod 4) , we see y2  3 is a solution

We have n3 y3  1(mod m3 ),
12 y3 1(mod 5),
Since 12.3  36  1(mod 5), we see y3  3 is a solution

2. Then solution is x  a1n1 y1  a2 n2 y2  a3 n3 y3 (mod n)


 x  1.20.2  2.15.3  3.12.3 (mod 60)
 x  40  90  72 (mod 60)
 x  238(mod 60)
 x  58(mod 60)
 58is the unique solution (mod 60)
 thesolution of the systemis x  58(mod 60) and it is the uniquesolution.
21. Solve the congruence x  1(mod 4), x  0(mod3), x  5(mod 7).
Solution:
Here a1  1, a2  0, a3  5
m1  4, m2  3, m3  7
m  m1 . m2 . m3
 4.8.7
 84
m 84 m 84 m 84
  21,   28,   12
m1 4 m2 3 m3 7

m 
 , m1   (21, 4)  1
 m1 
m 
 , m2   (28,3)  1
 m2 
m 
 , m3   (12, 7)  1
 m3 

13
we knowthat
m 
  b j 1(mod m j )
 mj 

m
For m1    b1 1(mod m1 )
 m1 
(21)b1  1(mod 4)  4 / 21b1  1
 21b1  1  4k , k is an integer
21b1  1  4k
1  4k
b1 
21
put k  5, b1  1

m
For m2    b2 1(mod m2 )
 m2 
(28)b2  1(mod 3)  3 / 28b2  1
 28b2  1  3k , k is an integer
28b 2  1  3k
1  3k
b2 
28
put k  9, b2  1

m
For m3    b3 1(mod m3 )
 m3 
(12)b3  1(mod 7)  7 /12b3  1
 12b3  1  7k2 , k2 is an integer
12b3  1  7k2
1  7 k2
b3 
12
put k2  5, b3  3

By chinese remainder theorem,


3
m
x    ai bi (mod m)
i 1  mi 

14
m m m 
  a1b1  a2b2  a3b3  (mod m)
 m1 m2 m3 
  (2111)  (28  0 1)  (12  5  3)  (mod84)
 (21  180) (mod84)
 201(mod84)
22. Determine whether the system
x  3(mod10); x  8(mod15); x  5(mod84) has a solution and find themall if it exists.
Solution:
The first congruence x  3(mod10) is equivalent to the simultaneous congruences
x  3(mod 2) -------(1)
x  3(mod 5) --------(2)
The congruence x  8(mod15)is equivalent to,
x  8(mod 3)      (3)
x  8(mod 5)      (4)
The congruence x  5(mod84)is equivalent to,
x  5(mod 3)      (5)

x  5(mod 4)      (6)
x  5(mod 7)      (7)
The congruence (1) &(6)
x  3(mod 2)
x  5(mod 4) reduces to x 1(mod 4)      (8)
The congruence (3) &(5)
x  8(mod 3)
x  5(mod 3) reduces to x  2 (mod 3)      (9)
The congruence (2) & (4)
x  3(mod 5)
x  8(mod 5) reduces to x  3(mod 5)      (10)
From (7)  x  2 (mod 7)      (11)
we have solve thecongruence of (8),(9),(10) &(11)

15
Here a1  1, a2  2, a3  3, a4  5
m1  4, m2  3, m3  5, m4  7

m  m1 . m2 . m3 . m4

 4.3.5.7
 420

m m m m
 105,  140,  84,  60
m1 m2 m3 m4
we knowthat
m 
  b j 1(mod m j )
 mj 

m
For m1    b1 1(mod m1 )
 m1 
(105)b1  1(mod 4)  4 /105b1  1
 105b1  1  4k1 , k1 is an integer
105b1  1  4k1
1  4k1
b1 
105
put k1  26, b1  1

m
For m2    b2 1(mod m2 )
 m2 
(140)b2  1(mod 3)  3 /140b2  1

 140b2  1  3k2 , k2 is an integer


140b2  1  3k2

1  3k2
b2 
140
put k2  93, b2  2

m
For m3    b3 1(mod m3 )
 m3 
(84)b3  1(mod 5)  5 / 84b3  1

16
 84b3  1  5k3 , k3 is an integer
84b3  1  5k3
1  5k3
b3 
84
m
For m4    b4 1(mod m4 )
 m4 
(60)b4  1(mod 7)  7 / 60b4 1

 60b4  1  7k4 , k4 is an integer

84b 4  1  7k4

1  7 k4
b4 
84
put k4  17, b3  2

By chinese remainder theorem,


4
m
x    ai bi (mod m)
i 1  mi 

m m m m 
  a1b1  a2b2  a3b3  a4b4  (mod m)
 m1 m2 m3 m4 
  (105 11)  (140  2  2)  (84  3  4)  (60  5  2)  (mod 420)

 (105  560  1008  600) (mod 420)

 2273(mod 420)  173(mod 420)

2x2 linear system


A 2  2 linear system is a system of linear congruences of the form,
ax  by  e( mod m)
cx  dy  f ( mod m)
A solution of the linear system is a pair x  x0 (mod m), y  y0 (mod m) that satisfies
both congruences.

17
Theorem
The linear system of congruences ax  by  e( mod m) and cx  dy  f ( mod m) has a unique
solution if and only if (, m)  1, where   ad  bc(mod m) .

23. Verify that the linear system 2x+3y4(mod13) and 3x +4y 5 (mod 13) has a unique solution
modulo 13.
Solution:
We know that the system has a unique solution modulo m if and only if (, m)  1
23
  ad  bc   1  12(mod 13).
34

Since (12,13)=1
Therefore the system has a unique solution modulo 13.
24.Solve the linear system
5 x  6 y  10(mod13)
6 x  7 y  2(mod13).
Solution:
5 x  6 y  10 (mod13)
6 x  7 y  2 (mod13)
 a  5, b  6, c  6, d  7, e  10, f  2.
m  13,   ad  bc
 35  36
 71(mod13)  7(mod13)
(, m)  (13,1)  1.
Hence unique solution.

10 6
x0   1 (mod13)        (1)
2 7

5 10
y0   1 (mod13)        (2)
6 2

 1  1(mod13)
7 1  1(mod13)
  1  2(mod13)

18
(1) 

x0   1 (70  12)(mod13)  2(70  12)(mod13)


  8(mod13)
 5(mod13)
(2) 

y0   1 (10  60)(mod13)  2(50)(mod13)


 2.2 (mod13)
 4 (mod13)
 x  5(mod13)
y  4 (mod13).

19

You might also like