60 likes | 147 Views
Applications of Set Theory in Counting Techniques: Inclusion-Exclusion Rule. C. A. A. B. B. The Inclusion/Exclusion Rule for Two or Three Sets. If A , B and C are finite sets then n(A B) = n(A) + n(B) – n(A B) n(A B C) = n(A) + n(B) + n(C)
E N D
Applications of Set Theory in Counting Techniques: Inclusion-Exclusion Rule
C A A B B The Inclusion/Exclusion Rule for Two or Three Sets • If A, B and C are finite sets then n(A B) = n(A) + n(B) – n(A B) n(A B C) = n(A) + n(B) + n(C) - n(A B) – n(A C) – n(B C) + n(A B C)
Example on Inclusion/Exclusion Rule (2 sets) • Question: How many integers from 1 through 100 are multiples of 3 or multiples of 7 ? • Solution: Let A=the set of integers from 1 through 100 which are multiples of 3; B = the set of integers from 1 through 100 which are multiples of 7. Then we want to find n(A B). First note that A B is the set of integers from 1 through 100 which are multiples of 21 . n(A B) = n(A) + n(B) - n(A B) (by incl./excl. rule) = 33 + 14 – 4 = 43 (by counting the elements of the three lists)
Example on Inclusion/Exclusion Rule (3 sets) • 3 headache drugs – A,B, and C – were tested on 40 subjects. The results of tests: 23 reported relief from drug A; 18 reported relief from drug B; 31 reported relief from drug C; 11 reported relief from both drugs A and B; 19 reported relief from both drugs A and C; 14 reported relief from both drugs B and C; 37 reported relief from at least one of the drugs. Questions: 1) How many people got relief from none of the drugs? 2) How many people got relief from all 3 drugs? 3) How many people got relief from A only?
C A B Example on Inclusion/Exclusion Rule (3 sets) S We are given: n(A)=23, n(B)=18, n(C)=31, n(A B)=11, n(A C)=19, n(B C)=14 , n(S)=40, n(A B C)=37 Q1) How many people got relief from none of the drugs? By difference rule, n((A B C)c ) = n(S) – n(A B C) = 40 - 37 = 3
Example on Inclusion/Exclusion Rule (3 sets) Q2)How many people got relief from all 3 drugs? By inclusion/exclusion rule: n(A B C) = n(A B C) - n(A) - n(B) - n(C) + n(A B) + n(A C) + n(B C) = 37 – 23 – 18 – 31 + 11 + 19 + 14 = 9 Q3)How many people got relief from A only? n(A – (B C)) (byinclusion/exclusion rule) = n(A) – n(A B) - n(A C) + n(A B C) = 23 – 11 – 19 + 9 = 2