NOTES_InclusionExclusion

NOTES_InclusionExclusion - Discrete Mathematics lecture...

• Notes
• jsong
• 3

This preview shows page 1 - 2 out of 3 pages.

Discrete Mathematics lecture notes 10-1 November 11, 2013 27. Some applications of Inclusion-Exclusions Last time we saw that for a collection of finite sets A 1 , A 2 , . . . , A n , we could compute the size of the union if we knew the size of each A i individually along with the sizes of all intersections: n [ i =1 A i = n X i =1 | A i | - X 1 i<j n | A i A j | + X 1 i<j<k n | A i A j A k | - . . . + ( - 1) n - 1 n \ i =1 A i . Let’s use this to make a couple of interesting computations. Euler’s totient function. Euler’s totient function φ : N 0 N is defined by φ ( n ) = |{ 1 i n | ( i, n ) = 1 }| , i.e., φ ( n ) is the number of numbers less than n that are relatively prime to n . φ has a number of interesting algebraic properties; for now let’s just come up with a closed-form formula for φ ( n ). Let [ n ] be the set { 1 , 2 , . . . , n } . φ ( n ) can be described the size of the set D := { i [ n ] | ( i, n ) - 1 } . Instead of computing the size of this set directly, let’s compute the size of the complement of D in [ n ]: C = [ n ] \ D = { j [ n ] | ( j, n ) 6 = 1 } . Clearly | C | + | D | = | [ n ] | = n , so determining | C | will give us | D | via the formula | D | = n - | C | . For fixed n , let p 1 , . . . , p be the distinct primes that divide n . 1 If j C , then ( j, n ) 6 = 1, so in particular there must be some p k such that p k | j . 2 Thus, for k = 1 , 2 , . . . , ‘ , defining C k := { j [ n ] | p k | j } , it follows that C = S k =1 C k , and we can hope to make use of Inclusion-Exclusion. We’ll make use of a small technical lemma. Lemma 1. For n N 1 and d ∈ | N a divisor of n , there are n d multiples of d that live in [ n ] . Proof. There is precisely one element of [ d ] = { 1 , 2 , . . . , d } that is a multiple of d (namely d itself). As d | n 6 = 0, we have d n and hence [ d ] [ n ] contains exactly one element of [ n ] that is a multiple of d . For each j ∈ { 1 , 2 , . . . , n d } , let di + [ d ] be the set { di + 1 , di + 2 , . . . , di + d } : We obtain di + [ d ] from [ d ] by

Subscribe to view the full document.

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern