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 347 — #355<br />

9.13. References 347<br />

More generally, we’ll say “k is a good modulus <strong>for</strong> base b” when, <strong>for</strong> any nonnegative<br />

integer n, the sum of the digits of the base b representation of n is congruent<br />

to n modulo k. So 2 is not a good modulus <strong>for</strong> base 10 because<br />

763 6 7 C 6 C 3 .mod 2/:<br />

(a) What integers k > 1 are good moduli <strong>for</strong> base 10?<br />

(b) Show that if b 1 .mod k/, then k is good <strong>for</strong> base b.<br />

(c) Prove conversely, that if k is good <strong>for</strong> some base b 2, then b 1 .mod k/.<br />

Hint: The base b representation of b.<br />

(d) Exactly which integers k > 1 are good moduli <strong>for</strong> base 106?<br />

Problem 9.40.<br />

We define the sequence of numbers<br />

(<br />

1; <strong>for</strong> n 3,<br />

a n D<br />

a n 1 C a n 2 C a n 3 C a n 4 ; <strong>for</strong> n > 3.<br />

Use strong induction to prove that remainder.a n ; 3/ D 1 <strong>for</strong> all n 0.<br />

Problems <strong>for</strong> Section 9.8<br />

Exam Problems<br />

Problem 9.41.<br />

Definition. The set P of single variable integer polynomials can be defined recursively:<br />

Base cases:<br />

the identity function, Id Z .x/ WWD x is in P .<br />

<strong>for</strong> any integer m the constant function, c m .x/ WWD m is in P .

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

Saved successfully!

Ooh no, something went wrong!