DOC PREVIEW
UCF COT 3100 - Inclusion-exclusion principle

This preview shows page 1-2-20-21 out of 21 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationSlide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 211Inclusion-exclusion principle A BAB|AB|= | A | + |B|  | AB|2Corollary. If X  Y, then |Y X | = |Y||X|X  Y /|Y X |  |Y||X|XY XY |Y X | = |Y||X|X  Y Proof. For any sets X and Y we have Y = (Y X)(YX) (as was shown in the Lemma). But, in case X  Y, YX=X. So, if X  Y, then Y = (Y X)X, where sets (Y X) and Xare disjoint, (Y X)  X=. By the Rule of Sum:|Y|=| Y X | +|X|, or |Y X | = |Y||X |.3Inclusion-exclusion principle (IEP) for three sets.Let’s count the number of elements in the union of three sets,| ABC|= | A| +|BC|  | A (BC)|…………by IEP for A and BC= | A| +|BC |  | (AB)(AC)|……by distributive law = | A| +|B| +|C|  |BC|  (|AB| + |AC|  | (AB)(AC)|) by IEP for AB and AC = | A| +|B| +|C|  |BC|  |AB|  |AC| + | ABC| = | A(BC)|…………….associative law= | A| +|B| +|C|  |BC|  |(AB)(AC)|….by IEP for B and C4 A B C | ABC|= | A| +|B| + |C|inclusion |BC|  |AB|  |AC|exclusion+ | ABC| inclusion5Example. Suppose A, B, and C represent three bus routes. Let A, B, and C be also sets of stops for corresponding routes. Suppose A has 25 stops, B has 30 stops, and C has 40 stops. Suppose further that A and B share 6 stops, A and C share 5 stops, and B and C share 4 stops. Suppose that A, B, and C share 2 stops. a) How many distinct stops are on the three bus routes?|A|=25, |B|=30, |C|= 40 |AB|=6, |AC|=5, |BC|=4| ABC | = 2 | ABC|=|A|+ |B|+ |C|  |AB|  |AC|  |BC| + | ABC | = = 25+30+40 6 5 4+2=82ABC A B C6b) How many stops for A are not stops for B? A= (AB)(AB)| AB| = |A|  |AB| =25 6=19c) How many stops for A are not stops for both B and C?AB AB C C BA|A|  | ABC |=25 2=23 Stops for A that are also stops for B are elements of AB. We can then represent A as the union of two disjoint sets: We need to find |A  ABC|. Since ABC A, by the corollary we have:7|AB|=6, |AC|=5| ABC | = 2 |A BC| = |A|  |AB|  | AC| + | ABC | =1625 6 5 2|A| = |A BC|+| AB|+| AC|  | ABC | d) How many stops for A are not stops for any other bus?ABC (A B)  C A= (ABC)(AB)(AC) not disjoint(AB)(AC) = ABC 8Counting subsets.Any subset X of the set A, X  A is a combination of size |X| from |A| elements. So, the number of subsets of cardinality |X|=r of the setof cardinality |A|=n is rnrrnnrnC!)!(!),(binomial coefficientsExample. Let A = {1, 2, 3, 4, 5}. Find the number of 2-element subsets of A. 102452!3!5!(5,2) C{1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5},{4, 5}9(a + b)3= (a + b)  (a + b)  (a + b) = aaa + aab + aba + abb + baa + bab + bba + bbb C (3, 1)=3the number of ways to choose 1 b from 3 factors:{1}, {2}, {3}C (3, 2)=3the number of ways to choose 2 b’s from 3 factors{2, 3}, {1, 3}, {1, 2} (a + b)3 = C (3, 0)a3 b0 + C (3, 1)a2b + C (3, 2)a b2 + C (3, 3)a0b3 = a3 + 3a2b + 3a b2 + b310Selection fromFirst factor (a + b) a a a a b b b b Selection fromSecond factor (a + b) a a b b a a b b Selection fromThird factor (a + b) a b a b a b a b a3a2ba2bab2 a2bab2ab2b3{1, 2, 3}  {3} {2} {2, 3} {1} {1, 3} {1, 2} {1, 2, 3}11In general (for any n) :(a + b)n = C (n, 0) an b0 + C (n, 1) an-1 b1 + C (n, 2) an-2 b2 +… + C (n, n-1) a1 bn-1 + C (n, n) a0 bn Using summation notation: (a + b)n= nkkkk-nbak n,C0 )(Binomial theorem In particular, (1+1)n = 2n =C (n, 0) + C (n, 1) + C (n, 2) + … + C (n, n-1) + C (n, n)12The total number of subsets (including empty set and set Aitself) isnnnCnCnCnC 2),(...2) ,(1) ,(0) ,( One more consequence of the Binomial Theorem:(11)n = 0 =C (n, 0)  C (n, 1) + C (n, 2)  C (n, 3)+ … 1=n=n(n 1)/2 ==1empty set singletons 2-element subsetsthe whole setC (n, 0) + C (n, 2) + C (n, 4)+ …=C (n, 1) + C (n, 3) + C (n, 5)+ … even cardinality odd cardinality133 {x, y, z}  {x} {x, y} {x, y, z} {y} {x, z} {z} {y, z}n A r=0 1 2 3 4 0  1 {x}  {x}2 {x, y}  {x} {x, y} {y} 4 {x, y, z, w}  {x} {x, y} {x, y, z} {x, y, z, w} {y} {x, z} {x, y, w} {z} {x,w} {x, z, w} {w} {y, z} {y, z, w} {y,w} {z,w}14Binomial coefficients have the propertyC (n+1, k) = C (n, k1) + C (n, k) ( 1 k  n )| A |= n+1 B = A  { x }, A= B {x}, |B|=n Let x A be any element of A All k subsets of A either include x, or not. Number of k-subsets of a set with n+1 elementsinclude x do not include xThe number of k subsets that include x is the number of k1 subsets of B. Subsets of A that do not include x, are k subsets of B.15Pascal’s Trianglen=3n=0n=1n=2n=4n=5n=6r=0r=1r=2r=3r=4r=511 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11=20 1+1=211+2+1=221+3+3+1=231+4+6+4+1=241+5+10+10+5+1=251+6+15+20+15+6+1=2616Lets count separately subsets with odd and even cardinalities11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 1r=0r=1r=2r=3r=4r=5The sums of cardinalities for odd and even subsets in each row are equal!n=3n=0n=1n=2n=4n=5n=61+1=21+6+1=4+41+10+5=5+10+11+15+15+1=6+20+61+3=3+1evenodd1=117Example Let A = {a, b, c, d }.a) Find the number of subsets of even cardinality.We have n=|A|=4. The number of even subsets is 24/2=8, i.e. one half of the total number of subsets. C(4, 2)=6Here they are:, {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}, {a, b, c, d }.C(4, 0)=1C(4, 4)=118b) The number


View Full Document

UCF COT 3100 - Inclusion-exclusion principle

Documents in this Course
Lab 1

Lab 1

11 pages

Functions

Functions

10 pages

Load more
Download Inclusion-exclusion principle
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Inclusion-exclusion principle 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 Inclusion-exclusion principle 2 2 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?