Unformatted text preview:

Lecture 35 21 127 Concepts of Math 11 28 2012 Administrivia Exam is on Friday I will be in my office from 2 30 5 00 today and again from 12 2 and 4 6 tomorrow I will also give some tips and suggestions at the end of class today Homework 10 will be posted tomorrow Prep Questions for the final will be posted by next Wednesday Please contact me ASAP about accomodations for the final e g extra time or schedule conflicts Also please check your grades on CMG I don t want to get a ton of emails in the three days before grades are due at the end of the semester Check on them now Everything should be correct Inclusion Exclusion General Idea We have a universal set U and some subsets A1 A2 An U We want to count the elements of U that are outside of all of the Ai sets How do we do this U A1 U A1 U A1 A 2 U A1 A2 A1 A2 U A1 A2 A3 U A1 A2 A3 A1 A2 A1 A3 A2 A3 A1 A2 A3 Think about why these formulas work They correctly count elements of U on both sides for all cases that is considering elements of U that are inside and outside the Ai sets they are counted 1 or 0 times on both sides respectively In general for n many sets we have U A1 A2 An X 1 S Ai i S S n where Ai U i Try writing out this in the cases where n 1 and n 2 and n 3 to see why they re the same Examples Bridge deals out 13 cards per hand How many such hands have at least one card from each suit Recall that with poker hands i e 5 cards this was easy We just noticed the suit distribution must follow 1112 i e some suit appears twice and the others appear once each With 13 cards though it s much harder to write down all of those cases those partitions of 13 into nonzero terms 1 1 1 10 and 1 1 2 9 and 1 2 3 7 and so on There are lots of cases Let s use Inclusion Exclusion to be more efficient Let U be the set of all 13 card hands from a standard deck of 52 cards Let AH be the set of 13 card hands that don t have any Hearts Let AS be the set of 13 card hands that don t have any Spades Let AC be the set of 13 card hands that don t have any Clubs 1 Let AD be the set of 13 card hands that don t have any Diamonds Then we seek an expression for U AH AS AC AD Accounting for all possible intersections we have U AH AS AC AD AH AS AH AC AH AD AS AC AS AD AC AD AH AS AC AH AS AD AS AC AD AH AD AC AH AS AC AD Since there are 4 bad sets we need to consider all possible ways they can intersect However counting these intersections is actually quite convenient because the sizes of the intersection only depend on how many sets are intersected not which ones they are Notice that AH AS AC AD 39 13 To have a 13 card hand which avoids one set we just have to select 13 cards from the other 39 Likewise notice that AH AS 26 13 because we need to avoid 2 suits This holds for every intersection of two of these sets Likewise notice that AH AS AD 13 13 because we need to avoid 3 suits so we only have 13 cards to pick from the 4th suit This holds for every intersection of three of these sets Thus we have 52 4 39 4 26 4 13 4 0 13 1 13 2 13 3 13 4 13 total such hands Notice that the last term is 0 how can we have a 13 card hand with no suits represented in it Example Count the number of functions f 5 3 Count the number that are injections Count the number that are surjections Let U be the set of all functions from 5 to 3 We know U 35 because we have 3 choices of output for each of the 5 elements in the domain There are no such functions that are injective If a function f 5 A is injective then Imf 5 5 but here the codomain has size 3 Thus this is not possible Now let s count the surjections Let A1 be the set of all such functions with the property that 1 Imf 5 Let A2 be the set of all such functions with the property that 2 Imf 5 Let A3 be the set of all such functions with the property that 3 Imf 5 Then we seek an expression for N U A1 A2 A3 We have N U A1 A2 A3 A1 A2 A1 A3 A2 A3 A1 A2 A3 Remembering that generally the number of functions f m n is nm n choices of output for each of m inputs we have 3 5 3 5 3 5 5 N 3 2 1 0 35 3 25 3 243 96 3 150 1 2 3 2 Example Find the number of natural numbers from 1 to 1000 that are neither perfect squares cubes nor fourth powers Let U 1000 For i 2 3 4 let Ai be the set of elements of U that are perfect i th powers of some natural number That is define Ai x U b N x bi Then we seek the number M U A2 A3 A4 Notice that U 1000 Notice that the largest square in U is 312 961 since 322 1024 Thus A2 31 Notice that the largest cube in U is 103 1000 Thus A3 10 Notice that the largest fourth power in U is 54 625 since 64 1296 Thus A4 5 Considering intersections notice that for instance A2 A3 is the set of sixth powers since LCM 2 3 6 LCM is Least Common Multiple Notice that the largest sixth power in U is 36 729 since 46 4096 Thus A2 A3 3 We already found the largest fourth power in U to be 54 so A2 A4 A4 5 Notice that the largest 12th power in U is 112 1 since 212 4096 Thus A3 A4 1 This also tells us that A2 A3 A4 A3 A4 1 Putting this all together we find N 1000 31 10 5 3 5 1 1 962 Pigeonhole Principle General Idea If we have too much stuff to put into too few boxes then some box has a bunch of stuff This comes up for instance when we have a bunch of objects that fall into a certain number of categories If we know how many objects we have and how many possible categories there are then we can guarantee the existence of some category that has at least …


View Full Document

CMU MSC 21127 - Lecture 35 - 11.28

Loading Unlocking...
Login

Join to view Lecture 35 - 11.28 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 35 - 11.28 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?