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.

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.
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,
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete Structures & Algorithms Basics of Set Theory EECE 320 — UBC.
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Set Operators Goals Show how set identities are established Introduce some important identities.
Denoting the beginning
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.
Copyright © Zeph Grunschlag, Set Operations Zeph Grunschlag.
CSE115/ENGR160 Discrete Mathematics 02/14/12 Ming-Hsuan Yang UC Merced 1.
1 Set Operations CS/APMA 202, Spring 2005 Rosen, section 1.7 Aaron Bloomfield.
Mathematics.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Survey of Mathematical Ideas Math 100 Chapter 2
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
This section will discuss the symbolism and concepts of set theory
Chapter 3 – Set Theory  .
MTH 231 Section 2.1 Sets and Operations on Sets. Overview The notion of a set (a collection of objects) is introduced in this chapter as the primary way.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Chapter 7 Logic, Sets, and Counting Section 2 Sets.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
CompSci 102 Discrete Math for Computer Science
Section 2.2 Subsets and Set Operations Math in Our World.
Set Operators. Copyright © Peter Cappello Union Let A and B be sets. A union B, denoted A  B, is the set A  B = { x | x  A  x  B }. Draw a.
ELEMENTARY SET THEORY.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
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.
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.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Discrete Mathematics CS 2610 January 27, part 2.
Slide 7- 1 Copyright © 2012 Pearson Education, Inc.
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.
Notions & Notations (2) - 1ICOM 4075 (Spring 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Spring.
Discrete Mathematics Lecture # 10 Venn Diagram. Union  Let A and B be subsets of a universal set U. The union of sets A and B is the set of all elements.
 Union Symbol ∪ If A and B are sets, their union is equal to all elements in both A & B A = {1,2,3,4} B = {2,4,5,6,7,8} A ∪ B = {1,2,3,4,5,6,7,8}
MATH 2311 Section 2.2. Sets and Venn Diagrams A set is a collection of objects. Two sets are equal if they contain the same elements. Set A is a subset.
Thinking Mathematically Venn Diagrams and Set Operations.
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.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
Boolean Operations and Expressions Addition = = = = 1 Multiplication 0 * 0 = 0 0 * 1 = 0 1 * 0 = 0 1 * 1 = 1.
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 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Set Operations CS 202, Spring 2008 Epp, chapter 5.
Copyright © Zeph Grunschlag,
Discrete Structures – CNS 2300
Discrete Mathematical The Set Theory
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Section 2.3 Venn Diagrams and Set Operations
Set Operations Section 2.2.
Copyright © Cengage Learning. All rights reserved.
2 Chapter Numeration Systems and Sets
L5 Set Operations.
Chapter 7 Logic, Sets, and Counting
2.1 – Symbols and Terminology
Lecture Sets 2.2 Set Operations.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Presentation transcript:

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 for A union B is A  B Union is related to disjunction, as follows: A  B = { x | (x  A)  (x  B) }

3 Venn Diagrams A Venn diagram is a pictorial representation of sets and set operations. The background of the diagram represents the universal set, and each set involved in the operation is depicted as a circle The shaded region of the diagram represents the operation shown

4 Intersection The intersection of 2 sets A & B is the set containing only those elements found in both A and B Intersection is denoted with the symbol  Intersection is related to conjunction as union is related to disjunction: A  B = { x | (x  A)  (x  B) } 2 sets are disjoint if their intersection is the empty set

5 Intersection The Venn diagram for intersection:

6 Cardinality of the Union of 2 Sets |A| + |B| is the sum of the number of elements in both sets Since the sets may intersect, we need to subtract the cardinality of the intersection in order to count the elements in each set only once; Thus: |A  B| = |A| + |B| - |A  B| Generalization of this result to an arbitrary number of sets is called the principle of inclusion/exclusion

7 Difference of 2 Sets Denoted A - B, is the set containing only those elements that are in the first set but not in the second set Therefore: A - B = { x | (x  A)  (x  B) }

8 Difference of 2 Sets

9 Let A = {a, b, c, d} and B = {c, d, e, f} Then A - B = {a, b} and B - A = {e, f }

10 Complement of a Set The complement of a set is the set of all elements found in the universal set EXCEPT the elements of the set in question The complement of set A is denoted as follows: A = { x | x  A }

11 Complement of a Set

12 Set Identities The next several slides introduce set identities As will be evident from their names, these identities are analogous to the the logical equivalences we saw earlier

13 Identity Laws A   = A A  U = A

14 Domination Laws A  U = U A   = 

15 Idempotent Laws A  A = A A  A = A

16 Complementation (A) = A

17 Commutative Laws A  B = B  A A  B = B  A

18 Associative Laws A  (B  C) = (A  B)  C A  (B  C) = (A  B)  C

19 Distributive Laws A  (B  C) = (A  B)  (A  C) A  (B  C) = (A  B)  (A  C)

20 DeMorgan’s Laws A  B = A  B A  B = A  B

21 Proving Set Identities Method 1: Show that each set is a subset of the other Method 2: Use set builder notation and the rules of logic Method 3: Use membership tables (analogous to truth tables)

22 Proving Set Identities: Subsets The text provides a proof of DeMorgan’s second law; here is a proof of DeMorgan’s first law: A  B = A  B Suppose x  A  B. In other words, x  A  B - therefore, x  A and x  B, and x  A  B. Thus, A  B  A  B Now, suppose x  A  B. This means x  A and x  B, so x  A  B, or x  A  B. Thus, A  B  A  B Since each set is a subset of the other, the two sets must be equal and the identity is proved.

23 Using Set Builder Notation & Rules of Logic Again, a proof of DeMorgan’s first law: A  B = A  B A  B = { x | x  A  B } = { x |  ( x  A  B } = { x |  ( x  A  x  B) } = { x | x  A  x  B } by DeMorgan’s Law = { x | x  A  x  B) } = { x | x  A  B }

24 Using Membership Tables Consider each combination of sets an element can belong to A 1 indicates an element belongs to a set; a 0 indicates the element doesn’t belong Verify that elements in the same combination of sets belong to both sets in the identity

25 One more time, DeMorgan’s Law A  B = A  B ABAB A  BA  BA  B

26 Generalized Unions & Intersections The union of a collection of sets is the set containing those elements that are members of at least one set in the collection The intersection of a collection of sets is the set that contains those elements that are members of all sets in the collection

27 Example LetA = {red, green, blue} B = {red, orange, yellow} C = {red, blue, yellow} A  B  C = {red, green, blue, orange, yellow} A  B  C = {red}

28 Generalized Unions & Intersections The notation for A 1  A 2  …  A n is: n i=1  A i The notation for A 1  A 2  …  A n is: n i=1  A i

29 Computer Representation of Sets Two conditions necessary for set representation using bit strings –U must be finite –we impose an arbitrary ordering on U We use 1 to mean the element is a member of the set, and 0 to mean it is not

30 Example SupposeU = {a, b, c, …, z} and S = {a, b, c, x, y, z} We can represent S as: 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1 The complement of S is the bit string with the bits reversed: 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0 To find the union of 2 sets, check for 1 bits in the same position in either of the 2 strings; to find the intersection, a 1 bit in the same position of both strings represents an intersection

31 Section 1.7 Set Operations - ends -