1 Chapter 2 Remodulization of Congruences Proceedings NCUR VI. è1992è, Vol. II, pp. 1036í1041. Jeærey F. Gold Department of Mathematics, Department of Physics University of Utah Don H. Tucker Department of Mathematics University of Utah Introduction Remodulization introduces a new method applied to congruences and systems of congruences. We prove the Chinese Remainder Theorem using the remodulization method and establish an eæcient method to solve linear congruences. The following is an excerpt of Remodulization of Congruences and its Applications ë2ë. Deænition 1 If a and b are integers, then a mod b = fa; a æ b; a æ 2b;:::g. We write x ç amodb, meaning that x is an element of the set a mod b. The common terminology is to say that x is congruent toa modulo b. These sets are frequently called residue classes since they consist of those numbers which, upon division by b, leave a remainder èresidueè of a. 1
2 CHAPTER 2. REMODULIZATION OF CONGRUENCES 2 Deænition 2 If a1;a2;::: ;a n ;b are integers, then ëa1;a2;::: ;a n ëmodb =èa1 mod bè ë èa2 mod bè ëæææëèa n mod bè : Theorem 1 Suppose a, b, andc are integers and cé0, then a mod b =ëa; a + b;::: ;a+èc, 1èbë modcb : Proof. We write a mod b = f a, 2cb; a, è2c, 1èb; ::: a, èc +1èb a, cb; a, èc, 1èb; ::: a, b a; a + b; ::: a +èc, 1èb; a + cb; a +èc +1èb; ::: a +è2c, 1èb; a +2cb; a +è2c +1èb; ::: a +è3c, 1èb; g and rewriting the rows a mod b = f a, 2cb; a + b, 2cb; ::: a +èc, 1èb, 2cb a, cb; a + b, cb; ::: a +èc, 1èb, cb a; a + b; ::: a +èc, 1èb; a + cb; a + b + cb; ::: a +èc, 1èb + cb; a +2cb; a + b +2cb; ::: a +èc, 1èb +2cb; g Then, forming unions on the extended columns, the result follows. We refer to this process as remodulization by a factor c. Suppose it is desired to express 1 mod 2 in terms of modulo 8, then, 1 mod 2 is remodulized by the factor 4, i.e., 1mod2=ë1; 3; 5; 7ë mod 8 : It is convenient to create a notation for the expression We write it as Reindexing the symbol S, ë a; a + b;::: ;a+èc, 1èbë modcb : c,1 ë ëa + kbë modcb : k=0 cë a mod b = ëèa, bè+kbë modcb : The Chinese Remainder Theorem ærst appeared in the ærst century A.D. The Chinese mathematician Sun-Tsçu sought a solution to the following problem:
3 CHAPTER 2. REMODULIZATION OF CONGRUENCES 3 What numbers n, when divided by 3, 5, and 7, have remainders 2, 3, and 2, respectively? This problem also appeared in the Introductio Arithmeticae, written by Nicomachus of Gerasa, a Greek mathematician circa 100 A.D. The problem asks one to ænd the solution to a system of congruences èyè 8 é é: x ç a1 mod b1 x ç a2 mod b2. x ç a n mod b n where 0 ç a j éb j, and the b j are pairwise relatively prime. The idea is to remodulize each congruence in order to obtain a common modulus, thereby making the solution set the intersection of the resulting classes. These can be determined by direct observation of the sets of residues in the remodulized forms. Since the b j are pairwise relatively prime, the smallest common modulus is the product of the b j ; therefore we remodulize the j th congruence by the factor Performing these operations gives: 1 b k = c j ; then b j c j = C = b j x j ç 1 b j ë b k Simplifying the notation, we ænd ëèa j, b j è+b j mëmod c ë j x j ç ëèa j, b j è+b j mëmodc : The solution set to èyè is the intersection of the sets of initial elements mod C, i.e., èzè në x ç j=1 " cjë b k b k ëèa j, b j è+b j mëmodc Thus, for the original problem of Sun-Tsçu, we have: 8 é : x ç 2mod3 x ç 3mod5 x ç 2mod7 è :
4 CHAPTER 2. REMODULIZATION OF CONGRUENCES 4 Since the b j are prime, the least common modulus is 3 æ 5 æ 7=105. The congruences are then remodulized by 35, 21, and 15, respectively. The resulting remodulizations are ë2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104ë mod 105 ; ë3, 8, 13, 18, 23, 28, 33, 38, 43, 48, 53, 58, 63, 68, 73, 78, 83, 88, 93, 98, 103ë mod 105 ; and ë2, 9, 16, 23, 30, 37, 44, 51, 58, 65, 72, 79, 86, 93, 100ë mod 105, where the intersection, 23 mod 105, is the complete solution set among the integers. This ultimately raises the question as to whether èzè në x ç j=1 " cjë ëèa j, b j è+b j mëmodc always contains exactly one element, given that 0 ç a j é b j and the b j are pairwise relatively prime. In the same example, if we remodulize to the product 105, we ænd that the solution set corresponding to the ærst two congruences ç x ç 2mod3 x ç 3mod5 is characterized as ë8; 23; 38; 53; 68; 83; 98ë mod 105, which does not appear to be ëunique"; however, this is equivalent to 8 mod 15, which, in the example given, has been remodulized by the factor 7. The solution 8 mod 15 is obtained by solving the ærst two congruences directly by the method described. As it happens, if one uses the smallest possible modulus, the answer to our question is yes. è Theorem 2 èchineseremaindert heoremè The system èyè of congruences, where the b j are pairwise relatively prime, has as solution set èzè në x ç j=1 " cjë ëèa j, b j è+b j mëmodc where c j = C b j and C = b k. Moreover, the intersection contains only one element, i.e., one residue class. è
5 CHAPTER 2. REMODULIZATION OF CONGRUENCES 5 Proof. In order to show that this element exists, we consider the following: ç x ç a1 mod b1 x ç a2 mod b2 where 0 ç a1 é b1 and 0 ç a2 é b2 and gcdèb1;b2è = 1. Remodulizing the congruences by the factors b2 and b1, respectively, x ç ëa1;a1 + b1;::: ;a1 +èb2, 1è b1 ëmodb1b2 x ç ëa2;a2 + b2;::: ;a2 +èb1, 1è b2 ëmodb1b2 it is required to show that the sets of initial elements intersect, i.e., there exist integers k and h where 1 ç k ç b2, 1 and 1 ç h ç b1, 1, such that a1 + kb1 = a2 + hb2. Rewriting this equation, we require integers k and h such that kb1, hb2 = a2, a1. Since b1 and b2 are relatively prime, èa2, a1è is divisible by gcdèb1;b2è. Now notice that if k and h are solutions to kb1, hb2 = 1, then kèa2, a1è and hèa2, a1è are solutions to the required equation. Euclid's algorithm insures that such integers k and h exist. It follows that the ærst pair of congruences have a solution. We wishnowto show that the pair has a unique solution modulo b1b2. We know that a solution exists, that is, there exists an integer x such that x 2fa1;a1 + b1;::: ;a1 +èb2, 1èb1g ë fa2;a2 + b2;::: ;a2 +èb1, 1èb2g: Now suppose that the two initial sets intersect in two elements, say and x1 = a1 + çb1 = a2 + kb2 x2 = a1 + çb1 = a2 + hb2 : Subtracting the second formulation from the ærst for each x i, so that a1, a2 = kb2, çb1 = hb2, çb1 ; èk, hèb2 =èç, çèb1 : Since b1 and b2 are relatively prime it must be that k, h = mb1 and ç, ç = nb2 ; for some integers m and n. In other words, k = h + mb1 and ç = ç + nb2
6 CHAPTER 2. REMODULIZATION OF CONGRUENCES 6 so that x1 becomes This says that x1 = a1 +èç + nb2èb1 = a2 +èh + mb1èb2 = a1 + çb1 + nb2b1 = a2 + hb2 + mb1b2 : a1 + çb1 = a2 + hb2 +èm, nèb1b2 ; which isx2. This implies that m, n = 0 ; i.e., m = n, and hence Therefore, k = h + mb1 ç = ç + mb2 : x1 = a1 + çb1 = a1 +èç + mb2èb1 = a1 + çb1 + mb1b2 = x2 + mb1b2 : This means that x1 and x2 are in the same residue class mod b1b2; i.e., they are congruent mod b1b2 and the solution set is given as the unique class x ç d mod b1b2 ; where d ç x1 mod b1b2 ç x2 mod b1b2 from above. In the event there exist three congruences, we solve the ærst two congruences and combine this result with the third congruence, i.e., ç x ç d mod b1 b2 x ç a3 mod b3 and repeat the argument since b1b2 and b3 are relatively prime. The induction works and both the existence and the uniqueness are established. Suppose we want to solve cx ç a mod b for x, where 1 é c é b and a is divisible by gcdèc; bè èotherwise no solution existsè. We consider the case where gcdèc; bè = 1. By remodulizing amodbby the factor c, we obtain cx ç ëa; a + b;::: ;a+èc, 1è b ëmodcb: Since the set fa; a+b; : : : ; a+èc,1è bg forms a complete residue system mod c, there exists an element in this set, call it d, which is divisible by c. Since cx ç ëa; a + b;::: ;d;::: ;a+èc, 1èbë modcb we ænd that the only congruence solvable is cx ç d mod cb. The remaining congruences, cx ç ëa; a + b;::: ;d, b; d + b; : : : ; a +èc, 1è b ëmodcb
7 CHAPTER 2. REMODULIZATION OF CONGRUENCES 7 are not solvable, since in each case the factor c is pairwise relatively prime with the elements fa; a+b;::: ;d,b; d+b; : : : ; a+èc,1èbg, and thus does not divide them. In the congruence cx ç d mod cb, dividing through by c, x ç d c mod cb c or x ç d c mod b: Note that d c éb. To illustrate this procedure, consider the following example. Suppose 5x ç 3 mod 7. This is solvable since 3 is divisible by gcdè5; 7è=1. Remodulizing 3 mod 7by the factor 5 gives 5x ç ë3; 10; 17; 24; 31ë mod 5 æ 7 so that 5x ç 10 mod 35 is the only possible solution and, upon dividing all three terms by 5, x ç 2mod7: Note that 5x ç ë3; 17; 24; 31ë mod 35 does not yield any solutions, since in this case gcdè5; 35è = 5 does not divide any number in the set f3; 17; 24; 31g. The remodulization method also provides a way of ænding solutions to systems of congruences using linear congruences. Suppose we have the following system, ç x ç a1 mod b1 x ç a2 mod b2 where b1 éb2 and b1 and b2 are relatively prime. Theideaistomultiply the ærst congruence by b2 and the second congruence by b1, i.e., ç b2 x ç a1b2 mod b1b2 b1x ç a2b1 mod b1b2 so that we obtain a common modulus. By subtracting the second linear congruence from the ærst, we obtain a single linear congruence, èb2, b1èx ç èa1b2, a2b1è modb1b2 : The unique solution èmodulo b1b2è is insured, since gcdèb2, b1;b1b2è = 1. If the system consists of more than two congruences, then the solution of the ærst two congruences is combined with the third, and so on, to obtain a solution for the entire system.
8 CHAPTER 2. REMODULIZATION OF CONGRUENCES 8 Corollary 1 A system of linear congruences 8 é é: c1x ç a1 mod b1 c2x ç a2 mod b2. c n x ç a n mod b n where 1 éc j éb j,theb j are pairwise relatively prime, and the a j are divisible by gcdèc j ;b j è,can be reduced to a system 8 é é: x ç d1 mod b1 x ç d2 mod b2. x ç d n mod b n : By Theorem 2, the solution to this system is në x ç j=1 " cjë ëèd j, b j è+b j mëmodc where c j = 1 b j b k and C = b k, and the intersection contains only one residue class. è References ë1ë Burton, David M. Elementary Number Theory, Second Edition. Wm. C. Brown Publishers, Dubuque, Iowa, ë2ë Gold, J. F. and Don H. Tucker. Applications. To be submitted. Remodulization of Congruences and Its ë3ë Ore, Oystein. Number Theory and Its History. New York, Dover Publications, Inc., ë4ë Stewart, B. M. Theory of Numbers. The MacMillan Co., New York, 1952.