Math 546 – Congruence
Transcript of Math 546 – Congruence
Math 546 – Congruence The relation
�
x ! ymodn means that
�
x ! y is a multiple of n (or equivalently that n divides
�
x ! y ). For any integer n >1, the relation
�
x ! ymodn is an equivalence relation on the set of all integers.
�
x ! ymodn is reflexive since for any integer m,
�
n |(m !m) and so
�
m ! mmodn .
�
x ! ymodn is symmetric since if
�
x ! ymodn then
�
x ! y = kn for some integer k and hence,
�
y ! x = !k( )n and so
�
y ! xmodn .
�
x ! ymodn is transitive since if
�
x ! ymodn and
�
y ! zmod n , then
�
x ! y = kn, y ! z = qn for some integers k and q. But then
�
x ! z = x ! y( ) + y ! z( ) = kn + qn = (k + q)n , and so
�
x ! zmod n . Properties of
�
x ! ymodn . I. Suppose that
�
x ! ymodn and k is any integer. Then (i).
�
k + x ! k + ymod n (ii).
�
kx ! kymod n i.e., The result of adding or multiplying on both sides of a congruence by the same constant is also a congruence. Make sure that you can verify this result.
II. Suppose that
�
x ! ymodn and
�
a ! bmod n . Then (i).
�
a + x ! b + ymod n (ii).
�
ax ! bymod n i.e., the result of adding or multiplying corresponding sides of a congruence is again a congruence. Proof. (i). Since
�
x ! ymodn and
�
a ! bmod n , there exist integers k and q such that
�
x ! y = kn, a ! b = qn , and so
�
a + x( ) ! b + y( ) = kn ! qn = k ! q( )n and hence
�
a + x ! b + ymod n . (ii). Since
�
x ! ymodn , then by I(ii), we get
�
ax ! aymodn . Also since
�
a ! bmod n , we get from I(ii) that
�
ay ! bymod n . But now, since congruence modulo n is transitive, it follows from
�
ax ! aymodn and
�
ay ! bymod n that
�
ax ! bymod n .
III. For every positive integers n and m there exist integers q and r such that
�
m = nq + r. 0 ! r < n . (This effectively just says that if m is divided by n, then we get some quotient q and remainder r.) So it is clear that if a and b are integers that leave the same remainder when divided by n, then
�
a ! bmod n . Conversely, if
�
a ! bmod n , then a and b leave the same remainder when divided by n.
IV. Suppose that
�
x � ymodn and k is any positive integer. Then
�
xk� y
kmodn .
Proof. This follows from II(ii) by induction. For the result is clearly true when k = 1. And if, for some k ≥ 1, it is true that
�
xk� y
kmodn , then since
�
x ! ymodn it follows that
�
n �nk� x�x
kmodn � n
k+ 1� x
k +1 .
Example So now suppose that we want to find the remainder when
�
21000 is divided by 7.
We note that
�
37� 2mod 7 and so
�
23( )333
� 1333mod 7 � 2
999� 1mod 7 .
But then
�
2 !2999
" 2 !1mod 7# 21000
" 2 mod 7 . So the remainder is 2. A Harder Example What is the remainder when
�
7100 is divided by 17? This is harder but not too bad. We
might notice first that
�
72� �2 mod 17 since
�
51 =17 � 3. But now squaring both sides of the last congruence we get,
�
74! 4 mod 17 . Now squaring both sides again we get.
�
78� 16 mod 17 and since
�
16 � �1 mod 17 we get by transitivity that
�
78� �1 mod 17 .
But now squaring both sides of this last congruence gives us
�
716� 1mod 17 .
Hence we get
�
716( )
6
� 16mod 17 � 7
96� 1mod 17 . And now since
�
796! 6mod 67
and
�
74� 4 mod 17 , we get
�
7100
! d moo 17 . So the remainder when
�
7100 is divided by
17 is 4. Equivalence Classes For the relation
�
x � ymodn , the equivalence class of an integer m is simply the set of all those integers that leave the same remainder as m when divided by n. Example: For
�
x � ymod 6 ,
�
[ 5 ] = �, � 7, � 1, 5, 11, 17, 23,�{ } ,
�
[ 2 ] = !, !10, ! 4, 2, 8, 14, 20,!{ } Polynomials If
�
P(c) = c0
+ c1c + c
2c2
+!ckck is any polynomial with integer coefficients, then if
�
a � b mod n , it follows that
�
P(a) ! P(b) mod n . This follows directly from properties I and IV above. Example. Since
�
3m� d mod33 it follows that
�
135
+ 6�133
+ 7 � 25
+ 6 �23
+ 7 mod11 . (In this case the polynomial is
�
P(x) + x5
6x3
7 .