Set Operations Section 2.2.

Slides:



Advertisements
Similar presentations
Set Operations. When sets are equal A equals B iff for all x, x is in A iff x is in B or … and this is what we do to prove sets equal.
Advertisements

Union Definition: The union of sets A and B, denoted by A B, contains those elements that are in A or B or both: Example: { 1, 2, 3} {3, 4, 5} = { 1,
 Union  Intersection  Relative Complement  Absolute Complement Likened to Logical Or and Logical And Likened to logical Negation.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
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.
SET.   A set is a collection of elements.   Sets are usually denoted by capital letters A, B, Ω, etc.   Elements are usually denoted by lower case.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 02/14/12 Ming-Hsuan Yang UC Merced 1.
Lecture 3 Operations on Sets CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
Section Section Summary Introduction to Boolean Algebra Boolean Expressions and Boolean Functions Identities of Boolean Algebra Duality The Abstract.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Partially borrowed from Florida State University
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Chapter 3 – Set Theory  .
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
CS201: Data Structures and Discrete Mathematics I
CompSci 102 Discrete Math for Computer Science
SECTION 2-3 Set Operations and Cartesian Products Slide
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
2.1 Sets 2.2 Set Operations –Set Operations –Venn Diagrams –Set Identities –Union and Intersection of Indexed Collections 2.3 Functions 2.4 Sequences and.
Chapter 2 With Question/Answer Animations. Section 2.1.
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Introduction to Set theory. Ways of Describing Sets.
Ch. 2 Basic Structures Section 1 Sets. Principles of Inclusion and Exclusion | A  B | = | A | + | B | – | A  B| | A  B  C | = | A | + | B | + | C.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
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.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
Thinking Mathematically Venn Diagrams and Set Operations.
The Basic Concepts of Set Theory. Chapter 1 Set Operations and Cartesian Products.
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.
Algebra 2 Chapter 12 Venn Diagrams, Permutations, and Combinations Lesson 12.2.
CPCS 222 Discrete Structures I
Section 6.1 Set and Set Operations. Set: A set is a collection of objects/elements. Ex. A = {w, a, r, d} Sets are often named with capital letters. Order.
Set Operators Goals Show how set identities are established
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Set. Outline Universal Set Venn Diagram Operations on Sets.
Lecture 6 Set Theory.
Dr. Ameria Eldosoky Discrete mathematics
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Discrete Structures – CNS 2300
Discrete Mathematical The Set Theory
CSNB 143 Discrete Mathematical Structures
Lecture 04 Set Theory Profs. Koike and Yukita
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Week 7 - Monday CS322.
CSE15 Discrete Mathematics 02/15/17
The Basic Concepts of Set Theory
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
The Basic Concepts of Set Theory
The aim of education is to teach students how to think rather than what to think. Sets The set is the fundamental discrete structure on which all other.
Discrete Mathematics R. Johnsonbaugh
L5 Set Operations.
Chapter 7 Logic, Sets, and Counting
Sets & Set Operations.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Presentation transcript:

Set Operations Section 2.2

Section Summary Set Operations More on Set Cardinality Set Identities Union Intersection Complementation Difference More on Set Cardinality Set Identities Proving Identities Membership Tables

Boolean Algebra Propositional calculus and set theory are both instances of an algebraic system called a Boolean Algebra. This is discussed in Chapter 12. The operators in set theory are analogous to the corresponding operator in propositional calculus. As always there must be a universal set U. All sets are assumed to be subsets of U.

Union Definition: Let A and B be sets. The union of the sets A and B, denoted by A ∪ B, is the set: Example: What is {1,2,3} ∪ {3, 4, 5}? Solution: {1,2,3,4,5} Venn Diagram for A ∪ B U A B

Intersection Definition: The intersection of sets A and B, denoted by A ∩ B, is Note if the intersection is empty, then A and B are said to be disjoint. Example: What is? {1,2,3} ∩ {3,4,5} ? Solution: {3} Example:What is? {1,2,3} ∩ {4,5,6} ? Solution: ∅ Venn Diagram for A ∩B U A B

Complement Definition: If A is a set, then the complement of the A (with respect to U), denoted by Ā is the set U - A Ā = {x ∈ U | x ∉ A} (The complement of A is sometimes denoted by Ac .) Example: If U is the positive integers less than 100, what is the complement of {x | x > 70} Solution: {x | x ≤ 70} Venn Diagram for Complement A U Ā

Difference Definition: Let A and B be sets. The difference of A and B, denoted by A – B, is the set containing the elements of A that are not in B. The difference of A and B is also called the complement of B with respect to A. A – B = {x | x ∈ A  x ∉ B} = A ∩B U A B Venn Diagram for A − B

The Cardinality of the Union of Two Sets Inclusion-Exclusion |A ∪ B| = |A| + | B| + |A ∩ B| Example: Let A be the math majors in your class and B be the CS majors. To count the number of students who are either math majors or CS majors, add the number of math majors and the number of CS majors, and subtract the number of joint CS/math majors. We will return to this principle in Chapter 6 and Chapter 8 where we will derive a formula for the cardinality of the union of n sets, where n is a positive integer. U A B Venn Diagram for A, B, A ∩ B, A ∪ B

Review Questions Example: U = {0,1,2,3,4,5,6,7,8,9,10} A = {1,2,3,4,5}, B ={4,5,6,7,8} A ∪ B Solution: {1,2,3,4,5,6,7,8} A ∩ B Solution: {4,5} Ā Solution: {0,6,7,8,9,10} Solution: {0,1,2,3,9,10} A – B Solution: {1,2,3} B – A Solution: {6,7,8}

Symmetric Difference (optional) Definition: The symmetric difference of A and B, denoted by is the set Example: U = {0,1,2,3,4,5,6,7,8,9,10} A = {1,2,3,4,5} B ={4,5,6,7,8} What is: Solution: {1,2,3,6,7,8} U A B Venn Diagram

Set Identities Identity laws Domination laws Idempotent laws Complementation law Continued on next slide 

Set Identities Commutative laws Associative laws Distributive laws Continued on next slide 

Set Identities De Morgan’s laws Absorption laws Complement laws

Proving Set Identities Different ways to prove set identities: Prove that each set (side of the identity) is a subset of the other. Use set builder notation and propositional logic. Membership Tables: Verify that elements in the same combination of sets always either belong or do not belong to the same side of the identity. Use 1 to indicate it is in the set and a 0 to indicate that it is not.

Proof of Second De Morgan Law Example: Prove that Solution: We prove this identity by showing that: 1) and 2) Continued on next slide 

Proof of Second De Morgan Law These steps show that: Continued on next slide 

Proof of Second De Morgan Law These steps show that:

Set-Builder Notation: Second De Morgan Law

Membership Table Example: Construct a membership table to show that the distributive law holds. Solution: A B C 1

Generalized Unions and Intersections Let A1, A2 ,…, An be an indexed collection of sets. We define: These are well defined, since union and intersection are associative. For i = 1,2,…, let Ai = {i, i + 1, i + 2, ….}. Then,