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 666 — #674<br />

666<br />

Chapter 15<br />

Cardinality Rules<br />

Conclude that the number of derangements is<br />

<br />

nŠ 1<br />

1<br />

1Š C 1 2Š<br />

1<br />

3Š C ˙ 1<br />

nŠ<br />

(g) As n goes to infinity, the number of derangements approaches a constant fraction<br />

of all permutations. What is that constant? Hint:<br />

e x D 1 C x C x2<br />

2Š C x3<br />

3Š C <br />

<br />

:<br />

Problem 15.60.<br />

How many of the numbers 2; : : : ; n are prime? The Inclusion-Exclusion Principle<br />

offers a useful way to calculate the answer when n is large. Actually, we will use<br />

Inclusion-Exclusion to count the number of composite (nonprime) integers from 2<br />

to n. Subtracting this from n 1 gives the number of primes.<br />

Let C n be the set of composites from 2 to n, and let A m be the set of numbers in<br />

the range m C 1; : : : ; n that are divisible by m. Notice that by definition, A m D ;<br />

<strong>for</strong> m n. So<br />

C n D<br />

(a) Verify that if m j k, then A m A k .<br />

n[<br />

1<br />

iD2<br />

A i : (15.24)<br />

(b) Explain why the right-hand side of (15.24) equals<br />

[<br />

A p : (15.25)<br />

primes p p n<br />

(c) Explain why jA m j D bn=mc 1 <strong>for</strong> m 2.<br />

(d) Consider any two relatively prime numbers p; q n. What is the one number<br />

in .A p \ A q / A pq ?<br />

(e) Let P be a finite set of at least two primes. Give a simple <strong>for</strong>mula <strong>for</strong><br />

\<br />

A :<br />

ˇ pˇˇˇˇˇˇ<br />

p2P

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

Saved successfully!

Ooh no, something went wrong!