06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

“mcs” — 2017/3/3 — 11:21 — page 354 — #362<br />

354<br />

Chapter 9<br />

Number Theory<br />

Problem 9.62.<br />

Definition. Define the order of k over Z n to be<br />

ord.k; n/ WWD minfm > 0 j k m D 1 .Z n /g:<br />

If no positive power of k equals 1 in Z n , then ord.k; n/ WWD 1.<br />

(a) Show that k 2 Z n iff k has finite order in Z n.<br />

(b) Prove that <strong>for</strong> every k 2 Z n , the order of k over Z n divides .n/.<br />

Hint: Let m D ord.k; n/. Consider the quotient and remainder of .n/ divided by<br />

m.<br />

Problem 9.63.<br />

The general version of the Chinese Remainder Theorem (see Problem 9.58) extends<br />

to more than two relatively prime moduli. Namely,<br />

Theorem (General Chinese Remainder). Suppose a 1 ; : : : ; a k are integers greater<br />

than 1 and each is relatively prime to the others. Let n WWD a 1 a 2 a k . Then <strong>for</strong><br />

any integers m 1 ; m 2 ; : : : ; m k , there is a unique x 2 Œ0::n/ such that<br />

<strong>for</strong> 1 i k.<br />

x m i .mod a i /;<br />

The proof is a routine induction on k using a fact that follows immediately from<br />

unique factorization: if a number is relatively prime to some other numbers, then it<br />

is relatively prime to their product.<br />

The General Chinese Remainder Theorem is the basis <strong>for</strong> an efficient approach<br />

to per<strong>for</strong>ming a long series of additions and multiplications on “large” numbers.<br />

Namely, suppose n was large, but each of the factors a i was small enough to be<br />

handled by cheap and available arithmetic hardware units. Suppose a calculation<br />

requiring many additions and multiplications needs to be per<strong>for</strong>med. To do a single<br />

multiplication or addition of two large numbers x and y in the usual way in<br />

this setting would involve breaking up the x and y into pieces small enough to be<br />

handled by the arithmetic units, using the arithmetic units to per<strong>for</strong>m additions and<br />

multiplications on (many) pairs of small pieces, and then reassembling the pieces<br />

into an answer. Moreover, the order in which these operations on pieces can be<br />

per<strong>for</strong>med is contrained by dependence among the pieces—because of “carries,”

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!