Counting Elements of Disjoint Sets: The Addition Rule

Slides:



Advertisements
Similar presentations
Section 7.5: Equivalence Relations Def: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive. Ex: Let.
Advertisements

Equivalence Relations
7.5 Inclusion/Exclusion. Definition and Example- 2 sets |A  B| =|A| + |B| - |A ∩ B| Ex1: |A|=9, |B|=11, |A∩B|=5, |A  B| = ?
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Discrete Mathematics I Lectures Chapter 6
3.3 Divisibility Definition If n and d are integers, then n is divisible by d if, and only if, n = dk for some integer k. d | n  There exists an integer.
Chapter 2 Probability. 2.1 Sample Spaces and Events.
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
Lecture 14: Oct 28 Inclusion-Exclusion Principle.
1 Section 1.7 Set Operations. 2 Union The union of 2 sets A and B is the set containing elements found either in A, or in B, or in both The denotation.
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Survey of Mathematical Ideas Math 100 Chapter 2
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Binomial Coefficients, Inclusion-exclusion principle
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Inclusion-Exclusion Selected Exercises Powerpoint Presentation taken from Peter Cappello’s webpage
Great Theoretical Ideas in Computer Science for Some.
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
Set Operations Chapter 2 Sec 3. Union What does the word mean to you? What does it mean in mathematics?
2.2 Set Operations. The Union DEFINITION 1 Let A and B be sets. The union of the sets A and B, denoted by A U B, is the set that contains those elements.
Counting Techniques. L172 Agenda Section 4.1: Counting Basics Sum Rule Product Rule Inclusion-Exclusion.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Basic Definitions of Set Theory Lecture 23 Section 5.1 Wed, Mar 8, 2006.
1 Section 6.5 Inclusion/Exclusion. 2 Finding the number of elements in the union of 2 sets From set theory, we know that the number of elements in the.
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
Direct Proof and Counterexample III
1 Section 1.2 Sets A set is a collection of things. If S is a set and x is a member or element of S we write x  S. Othewise we write x  S. The set with.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Basic Definitions of Set Theory Lecture 23 Section 5.1 Mon, Feb 21, 2005.
Set Operations Section 2.2.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Mathematical Induction I Lecture 19 Section 4.2 Mon, Feb 14, 2005.
Dilworth’s theorem and extremal set theory 張雁婷 國立交通大學應用數學系.
Set. Outline Universal Set Venn Diagram Operations on Sets.
Equivalence Relations
The Relation Induced by a Partition
Principle of Inclusion and Exclusion
Unions and Intersections of Sets
Counting by Complement and the Inclusion/Exclusion Principle
Section 16 Inclusion/Exclusion
What is Probability? Quantification of uncertainty.
Great Theoretical Ideas In Computer Science
Counting and Probability Section 12.1: Sets and Counting IBTWW…
CSE 2353 – September 22nd 2003 Sets.
Math 3121 Abstract Algebra I
Set Operations Section 2.2.
Set, Combinatorics, Probability & Number Theory
Direct Proof and Counterexample III
Venn Diagrams and Partitions
GCD and LCM relationship
Direct Proof and Counterexample III
Mathematical Induction I
ALGEBRA I - SETS : UNION and INTERSECTION
Lecture 43 Section 10.1 Wed, Apr 6, 2005
Counting Elements of Disjoint Sets: The Addition Rule
Inclusion-Exclusion Principle
Relations.
Copyright © Zeph Grunschlag,
Counting Elements of Disjoint Sets: The Addition Rule
Basic Definitions of Set Theory
Equivalence Relations
Mathematical Induction II
Counting I: Choice Trees and Correspondences
Counting Elements of Disjoint Sets: The Addition Rule
Sets, Unions, Intersections, and Complements
Section 3.2 More set operations.
Presentation transcript:

Counting Elements of Disjoint Sets: The Addition Rule Lecture 29 Section 6.3 Mon, Mar 19, 2007

Counting Elements in Disjoint Sets Theorem: Let {A1, …, An} be a partition of a set A. Then |A| = |A1| + … + |An|. Corollary: Let {A1, …, An} be a collection of pairwise disjoint finite sets. Then |A1  …  An| = |A1| + … + |An|.

Counting Elements in Subsets Theorem: Let A and B be finite sets with B  A. Then |A – B| = |A| – |B|. Proof: {B, A – B} is a partition of A. Therefore, |B| + |A – B| = |A|. So, |A – B| = |A| – |B|.

Counting Elements in Unions of Sets Theorem: Let A and B be any finite sets. Then |A  B| = |A| + |B| – |A  B|. Proof: One can verify that (A  B) – B = A – (A  B). Furthermore, B  A  B and A  B  A. Therefore, |A  B| – |B| = |A| – |A  B|. So, |A  B| = |A| + |B| – |A  B|.

Putnam Problem A-1 (1983) How many positive integers n are there such that n is an exact divisor of at least one of the numbers 1040, 2030? Let A = {n | n divides 1040}. Let B = {n | n divides 2030}. Then |A  B| = |A| + |B| – |A  B|.

Putnam Problem A-1 (1983) Prime factorization: 1040 = 240  540. Therefore, n | 1040 if and only if n = 2a5b where 0  a  40 and 0  b  40. There are 41  41 = 1681 such numbers. Similarly, 2030 = 260530, so there are 61  31 = 1891 divisors of 2030.

Putnam Problem A-1 (1983) Finally, an integer is in A  B if it divides both 1040 and 2030. That means that it divides the gcd of 1040 and 2030. The gcd of 240  540 and 260  530 is 240  530. Therefore, there are 41  31 = 1271 such numbers.

Putnam Problem A-1 (1983) Thus, 1681 + 1891 – 1271 = 2301 numbers divide either 1040 or 2030.

Number of Elements in the Union of Three Sets Theorem: Let A, B, and C be any three finite sets. Then |A  B  C| = |A| + |B| + |C| – |A  B| – |A  C| – |B  C| + |A  B  C|. Add sets one at a time, Subtract sets two at a time, Add sets three at a time.

Number of Elements in the Union of Three Sets Theorem: Let A, B, and C be any three finite sets. Then |A  B  C| = |A| + |B| + |C| – |A  B| – |A  C| – |B  C| + |A  B  C|. Add sets one at a time, Subtract sets two at a time, Add sets three at a time.

Number of Elements in the Union of Three Sets Theorem: Let A, B, and C be any three finite sets. Then |A  B  C| = |A| + |B| + |C| – |A  B| – |A  C| – |B  C| + |A  B  C|. Add sets one at a time, Subtract sets two at a time, Add sets three at a time.

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C|.

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  B)  C|.

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  C)  (B  C)|.

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  C)  (B  C)| = |A| + |B| – |A  B| + |C| – |A  C| – |B  C| + |(A  C)  (B  C)|.

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  C)  (B  C)| = |A| + |B| – |A  B| + |C| – |A  C| – |B  C| + |(A  C)  (B  C)| + |A  B  C|.

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  C)  (B  C)| = |A| + |B| – |A  B| + |C| – |A  C| – |B  C| + |(A  C)  (B  C)| + |A  B  C|. = |A| + |B| + |C| – |A  B| – |A  C| – |B  C|

Proof, continued Proof: |A  B  C| = |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  B)  C| = |A| + |B| – |A  B| + |C| – |(A  C)  (B  C)| = |A| + |B| – |A  B| + |C| – |A  C| – |B  C| + |(A  C)  (B  C)| + |A  B  C|. = |A| + |B| + |C| – |A  B| – |A  C| – |B  C|

The Inclusion/Exclusion Rule Theorem: Let A1, …, An be finite sets. Then |A1  …  An| = i |Ai| – i j > i |Ai  Aj| + i j > i k > j |Ai  Aj  Ak| :  |A1  …  An|.

The Inclusion/Exclusion Rule The Inclusion/Exclusion Rule can be proved by induction.

Number of Elements in the Union of Four Sets Let U be the set of all pairs of distinct cards from a deck of 52 playing cards. How many pairs are there in which at least one of the two cards is black or a face card?

Number of Elements in the Union of Four Sets Let A = all pairs where 1st card is black. B = all pairs where 1st card is a face card. C = all pairs where 2nd card is black. D = all pairs where 2nd card is a face card. Find the number of elements in |A  B  C  D|.

Number of Elements in the Union of Four Sets How many pairs are there in which at least one of the two cards is black or a face card?

The Inclusion/Exclusion Rule Suppose five sets intersect as indicated in the following Venn diagram. A B C D E

The Inclusion/Exclusion Rule State the equation of the inclusion/exclusion rule for these sets. A B C D E

The Inclusion/Exclusion Rule Do the same for these sets. A B C D