Mathematics for Computer Science

(avery) #1

Chapter 8 Number Theory306


Problem 8.64.
The general version of the Chinese Remainder Theorem(see Problem 8.58) extends
to more than two relatively prime moduli. Namely,


Theorem(General Chinese Remainder).Supposea 1 ;:::;akare integers greater
than 1 and each is relatively prime to the others. LetnWWDa 1 a 2 ak. Then for
any integersm 1 ;m 2 ;:::;mk, there is a uniquex 2 Œ0::n/such that


xmi .modai/;

for 1 ik.


The proof is a routine induction onkusing a fact that follows immediately from
unique factorization: if a number is relatively prime to some other numbers, then it
is relatively prime to their product.
The General Chinese Remainder Theorem is the basis for an efficient approach
to performing a long series of additions and multiplications on “large” numbers.
Namely, supposenwas large, but each of the factorsaiwas small enough to be
handled by cheap and available arithmetic hardware units. Suppose a calculation
requiring many additions and multiplications needs to be performed. To do a sin-
gle multiplication or addition of two large numbersxandyin the usual way in
this setting would involve breaking up thexandyinto pieces small enough to be
handled by the arithmetic units, using the arithmetic units to perform additions and
multiplications on (many) pairs of small pieces, and then reassembling the pieces
into an answer. Moreover, the order in which these operations on pieces can be
performed is contrained by dependence among the pieces—because of “carries,”
for example. And this process of breakup and reassembly has to be performed for
each addition and multiplication that needs to be performed on large numbers.
Explain how the General Chinese Remainder Theorem can be applied to per-
form a long series of additions and multiplications on “large” numbers much more
efficiently than the usual way described above.


Problem 8.65.
In this problem we’ll prove that for all integersa;mwherem > 1,


amam.m/ .modm/: (8.45)

Note thataandmneed not be relatively prime.
AssumemDpk 11 pknnfor distinct primes,p 1 ;:::;pnand positive integers
k 1 ;:::;kn.

Free download pdf