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.

Slides:



Advertisements
Similar presentations
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,
Advertisements

 Union  Intersection  Relative Complement  Absolute Complement Likened to Logical Or and Logical And Likened to logical Negation.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete Structures & Algorithms Basics of Set Theory EECE 320 — UBC.
Instructor: Hayk Melikya
(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.
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.
Copyright © Zeph Grunschlag, Set Operations Zeph Grunschlag.
Sets 1.
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/14/12 Ming-Hsuan Yang UC Merced 1.
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
1 Discussion #21 Discussion #21 Sets & Set Operations; Tuples & Relations.
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.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Chapter 3 – Set Theory  .
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Set Theory Dr. Ahmed Elmoasry. Contents Ch I: Experiments, Models, and Probabilities. Ch II: Discrete Random Variables Ch III: Discrete Random Variables.
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.
CS201: Data Structures and Discrete Mathematics I
1. 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 of A” A = {a 1, a 2,
CompSci 102 Discrete Math for Computer Science
Thinking Mathematically Chapter 2 Set Theory 2.1 Basic Set Concepts.
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.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
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.
Sets.
Introduction to Set theory. Ways of Describing Sets.
12/19/20151 … and now for something completely different… Set Theory Actually, you will see that logic and set theory are very closely related.
Lecture # 12 Set Identities
Ch. 2 Basic Structures Section 1 Sets. Principles of Inclusion and Exclusion | A  B | = | A | + | B | – | A  B| | A  B  C | = | A | + | B | + | C.
Snick  snack Supplement: Worked Set Proofs Based on work by Meghan Allen.
Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.
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.
1 Topic Sets (5.1, 5.2, 5.3). 2 Original author of the slides: Vadim Bulitko University of Alberta Modified by.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
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.
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
Applied Discrete Mathematics Week 1: Logic and Sets
Discrete Structures – CNS 2300
Discrete Mathematical The Set Theory
Lecture 04 Set Theory Profs. Koike and Yukita
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.
… and now for something completely different…
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Operations Section 2.2.
Week #2 – 4/6 September 2002 Prof. Marie desJardins
Discrete Mathematics R. Johnsonbaugh
L5 Set Operations.
Which sets are equal? Which sets are equivalent?
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Sets, Unions, Intersections, and Complements
Presentation transcript:

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

Note: remember all that stuff about implication?

Union of two sets Give me the set of elements, x where x is in A or x is in B Example OR A membership table

Union of two sets

Note: we are using set builder notation and the laws of logical equivalence (propositional equivalence)

Intersection of two sets Give me the set of elements, x where x is in A and x is in B Example AND

Disjoint sets

Difference of two sets Give me the set of elements, x where x is in A and x is not in B Example

Note: Compliment of a set

Symmetric Difference of two sets Give me the set of elements, x where x is in A and x is not in B OR x is in B and x is not in A Example XOR

Complement of a set Give me the set of elements, x where x is not in A Example Not U is the universal set

Cardinality of a Set In claire A = {1,3,5,7} B = {2,4,6} C = {5,6,7,8} |A u B| ? |A u C| |B u C| |A u B u C|

Cardinality of a Set The principle of inclusion-exclusion

Cardinality of a SetThe principle of inclusion-exclusion U Potentially counted twice (over counted)

Set Identities Identity Domination Think of U as true (universal) {} as false (empty) Union as OR Intersection as AND Complement as NOT Indempotent Note similarity to logical equivalences!

Set Identities Commutative Associative Distributive De Morgan Note similarity to logical equivalences!

Four ways to prove two sets A and B equal a membership table a containment proof show that A is a subset of B show that B is a subset of A set builder notation and logical equivalences Venn diagrams

Prove lhs is a subset of rhs Prove rhs is a subset of lhs

… set builder notation and logical equivalences Defn of complement Defn of intersection De Morgan law Defn of complement Defn of union

prove using membership table Class

Me They are the same

prove using set builder and logical equivalence Class

Me

Prove using set builder and logical equivalences

A containment proof See the text book Thats a cop out if ever I saw one!

A containment proofGuilt kicks in To do a containment proof of A = B do as follows 1. Argue that an arbitrary element in A is in B i.e. that A is an improper subset of B 2. Argue that an arbitrary element in B is in A i.e. that B is an improper subset of A 3. Conclude by saying that since A is a subset of B, and vice versa then the two sets must be equal

Collections of sets