Copyright © Zeph Grunschlag,

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.
Instructor: Hayk Melikya
Set Operators Goals Show how set identities are established Introduce some important identities.
Denoting the beginning
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.
Copyright © Zeph Grunschlag, Set Operations Zeph Grunschlag.
Sets 1.
Sets 1.
1 Set Operations CS/APMA 202, Spring 2005 Rosen, section 1.7 Aaron Bloomfield.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
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.
Subsets and Set Operations
IB Math Studies – Topic 3. IB Course Guide Description.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Chapter 3 – Set Theory  .
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
Copyright © 2014 Curt Hill Set Operations Now it gets fun.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
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.
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.
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.
Introduction to Set theory. Ways of Describing Sets.
Chapter 2 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Discrete Mathematics CS 2610 January 27, part 2.
Slide 7- 1 Copyright © 2012 Pearson Education, Inc.
Discrete Mathematics Set.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 2.3 Venn Diagrams and Set Operations.
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.
Section 1.2 – 1.3 Outline Intersection  Disjoint Sets (A  B=  ) AND Union  OR Universe The set of items that are possible for membership Venn Diagrams.
Copyright © 2015, 2011, 2007 Pearson Education, Inc. Section 2.3, Slide 1 CHAPTER 2 Set Theory.
Venn Diagrams.
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)
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
Set. Outline Universal Set Venn Diagram Operations on Sets.
CHAPTER 2 Set Theory.
Set Operations CS 202, Spring 2008 Epp, chapter 5.
Discrete Structures – CNS 2300
Discrete Mathematical The Set Theory
Copyright © Zeph Grunschlag,
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.
Copyright © Zeph Grunschlag,
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CS100: Discrete structures
Set Operations Section 2.2.
Session – 2 SETS & Operations of SETS
CHAPTER 2 Set Theory.
L5 Set Operations.
Chapter 7 Logic, Sets, and Counting
CHAPTER 2 Set Theory.
2.1 – Symbols and Terminology
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Copyright © Zeph Grunschlag,
Copyright © Zeph Grunschlag,
Set Theoretic Operations
CHAPTER 2 Set Theory.
Presentation transcript:

Copyright © Zeph Grunschlag, 2001-2002. Set Operations Zeph Grunschlag Copyright © Zeph Grunschlag, 2001-2002.

Agenda Section 1.5: Set Operations Union  and Disjoint union Intersection  Difference “-” Complement “ ” Symmetric Difference  L5

L5 Universe of Reference When talking about a set, a universe of reference (universal set ) needs to be specified. Even though a set is defined by the elements which it contains, those elements cannot be arbitrary. If arbitrary elements are allowed paradoxes can result arising from self reference. L5

Set Theoretic Operations Set theoretic operations allow us to build new sets out of old, just as the logical connectives allowed us to create compound propositions from simpler propositions. Given sets A and B, the set theoretic operators are: Union () Intersection () Difference (-) Complement (“—”) Symmetric Difference () give us new sets AB, AB, A-B, AB, andA . L5

Venn Diagrams Venn diagrams are useful in representing sets and set operations. Various sets are represented by circles inside a big rectangle representing the universe of reference. L5

Elements in at least one of the two sets: Union Elements in at least one of the two sets: AB = { x | x  A  x  B } U AB A B L5

Elements in exactly one of the two sets: Intersection Elements in exactly one of the two sets: AB = { x | x  A  x  B } U A AB B L5

Disjoint Sets U A B DEF: If A and B have no common elements, they are said to be disjoint, i.e. A B =  . U A B L5

Disjoint Union When A and B are disjoint, the disjoint union operation is well defined. The circle above the union symbol indicates disjointedness. U A B L5

Disjoint Union FACT: In a disjoint union of finite sets, cardinality of the union is the sum of the cardinalities. I.e. L5

Elements in first set but not second: Set Difference Elements in first set but not second: A-B = { x | x  A  x  B } U A-B B A L5

Elements in exactly one of the two sets: Symmetric Difference Elements in exactly one of the two sets: AB = { x | x  A  x  B } AB U A B L5

Elements not in the set (unary operator): Complement Elements not in the set (unary operator): A = { x | x  A } U A A L5

Set Identities Table 1, Rosen p. 49 Identity laws Domination laws Idempotent laws Double complementation Commutativity Associativity Distribuitivity DeMorgan This table is gotten from the previous table of logical identities (Table 5, p. 17) by rewriting as follows: disjunction “” becomes union “” conjunction “” becomes intersection “” negation “” becomes complementation “–” false “F” becomes the empty set  true “T” becomes the universe of reference U L5

Set Identities via Venn It’s often simpler to understand an identity by drawing a Venn Diagram. For example DeMorgan’s first law can be visualized as follows. L5

Visual DeMorgan B: A: L5

Visual DeMorgan B: A: AB : L5

Visual DeMorgan B: A: AB : L5

Visual DeMorgan B: A: L5

Visual DeMorgan B: A: A: B: L5

Visual DeMorgan B: A: A: B: L5

Visual DeMorgan = L5

U = {ant, beetle, cicada, dragonfly} Sets as Bit-Strings If we order the elements of our universe, we can represent sets by bit-strings. For example, consider the universe U = {ant, beetle, cicada, dragonfly} Order the elements alphabetically. Subsets of U are represented by bit-strings of length 4. Each bit in turn, tells us whether the corresponding element is contained in the set. EG: {ant, dragonfly} is represented by the bit-string 1001. Q: What set is represented by 0111 ? L5

Sets as Bit-Strings  1101 A: 0111 represents {beetle, cicada, dragonfly} Conveniently, under this representation the various set theoretic operations become the logical bit-string operators that we saw before. For example, the symmetric difference of {beetle} with {ant, beetle, dragonfly} is represented by: 0100  1101 1001 = {ant, dragonfly} L5