06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

“mcs” — 2017/3/3 — 11:21 — page 356 — #364<br />

356<br />

Chapter 9<br />

Number Theory<br />

To prove the Lemma, consider the following array with a infinite rows:<br />

0 a 2a 3a : : :<br />

b b C a b C 2a b C 3a : : :<br />

2b 2b C a 2b C 2a 2b C 3a : : :<br />

3b 3b C a 3b C 2a 3b C 3a : : :<br />

:<br />

:<br />

:<br />

: : : :<br />

.a 1/b .a 1/b C a .a 1/b C 2a .a 1/b C 3a : : :<br />

Note that every element in this array is clearly makeable.<br />

(a) Suppose that n is at least as large as, and also congruent mod a to, the first<br />

element in some row of this array. Explain why n must appear in the array.<br />

(b) Prove that every integer from 0 to a<br />

integers in the first column of this array.<br />

1 is congruent modulo a to one of the<br />

(c) Complete the proof of the Generalized Postage Lemma by using parts (a)<br />

and (b) to conclude that every integer n > ab a b appears in the array, and<br />

hence is makeable.<br />

Hint: Suppose n is congruent mod a to the first element in some row. Assume n is<br />

less than that element, and then show that n ab a b.<br />

(d) (Optional) What’s more, ab a b is not makeable. Prove it.<br />

(e) Explain why the following even more general lemma follows directly from the<br />

Generalized Lemma and part (d).<br />

Lemma. (Generalized 2 Postage) If m and n are positive integers and gWWDgcd.m; n/ ><br />

1, then with m and n cent stamps, you can only make amounts of postage that<br />

are multiples of g. You can actually make any amount of postage greater than<br />

.mn=g/ m n that is a multiple of g, but you cannot make .mn=g/ m n cents<br />

postage.<br />

(f) Optional and possibly unknown. Suppose you have three denominations of<br />

stamps, a; b; c and gcd.a; b; c/ D 1. Give a <strong>for</strong>mula <strong>for</strong> the smallest number n abc<br />

such that you can make every amount of postage n abc .<br />

Exam Problems<br />

Problem 9.66.<br />

What is the remainder of 63 9601 divided by 220?

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

Saved successfully!

Ooh no, something went wrong!