Discrete Mathematics CS 2610 January 27, 2009 - part 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,
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,
Prof. Johnnie Baker Module Basic Structures: Sets
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
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
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.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Copyright © Zeph Grunschlag, Set Operations Zeph Grunschlag.
Sets 1.
Sets 1.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
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.
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.
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.
February 5, 2015Applied Discrete Mathematics Week 1: Logic and Sets 1 Homework Solution PQ  (P  Q) (  P)  (  Q)  (P  Q)  (  P)  (  Q) truetruefalsefalsetrue.
Survey of Mathematical Ideas Math 100 Chapter 2 John Rosson Thursday January 25, 2007.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
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
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Discrete Mathematics CS 2610 February 12, Agenda Previously Finished functions Began Boolean algebras And now Continue with Boolean algebras.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction to Set theory. Ways of Describing Sets.
Discrete Mathematics SETS. What is a set? ^A set is a unordered collection of “objects”  People in a class: {A yşe, B arış, C anan }  Cities in Turkey.
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.
Discrete Mathematics. Set Theory - Definitions and notation A set is an unordered collection of elements. Some examples: {1, 2, 3} is the set containing.
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 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.
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.
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.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
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)
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.
Lecture 6 Set Theory.
Applied Discrete Mathematics Week 1: Logic and Sets
Copyright © Zeph Grunschlag,
Discrete Structures – CNS 2300
Discrete Mathematical The Set 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.
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Operations Section 2.2.
Discrete Mathematics CS 2610
Discrete Mathematics R. Johnsonbaugh
L5 Set Operations.
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
Presentation transcript:

Discrete Mathematics CS 2610 January 27, part 2

2 Agenda Previously: Set theory Subsets (proper subsets) & set equality Set cardinality Power sets n-Tuples & Cartesian product Set operations  Union, Intersection, Complement, Difference Venn diagrams Now Symmetric difference Proving properties about sets Sets as bit-strings Functions

3 Symmetric Difference The symmetric difference, A  B, is: A  B = { x | (x  A  x  B) v (x  B  x  A)} (i.e., x is in one or the other, but not in both) Is it commutative ?

4 Set Identities Identity: A   = A, A  U = A Domination: A  U = U, A   =  Idempotent: A  A = A = A  A Double complement: Commutative: A  B = B  A, A  B = B  A Associative: A  (B  C) = (A  B)  C A  (B  C) = (A  B)  C AA = )(

5 Set Identities Absorption: A  (A  B) = A A  (A  B) = A Complement: A  A¯ = U A  A¯ =  Distributive: A  (B  C) = (A  B)  (A  C) A  (B  C) = (A  B)  (A  C)

6 De Morgan’s Rules De Morgan’s I DeMorgan’s II (A U B) = A  B (A  B) = A U B

7 Generalized Union The union of a collection of sets contains those elements that belong to at least one set in the collection.  A i i  1 n U  A 1  A 2    A n

8 Generalized Intersection The intersection of a collection of sets contains those elements that belong to all the sets in the collection.  A i i  1 n   A 1  A 2    A n

9 Proving Set Identities How would we prove set identities of the form S 1 = S 2 Where S 1 and S 2 are sets? 1. Prove S 1  S 2 and S 2  S 1 separately. Use previously proven set identities. Use logical equivalences to prove equivalent set definitions. 2. Use a membership table.

10 Proof Using Logical Equivalences Prove that Proof: First show (A U B)  A  B, then the reverse. Let c  (A U B) c  {x | x  A  x  B}(Def. of union)  (c  A  c  B)(Def. of complement)  (c  A)   (c  B)(De Morgan’s rule) (c  A)  (c  B)(Def. of  ) (c  A)  (c  B)(Def. of complement) c  {x | x  A  x  B}(Set builder notation) c  A  B(Def. of intersection) Therefore, (A U B)  A  B. Each step above is reversible, therefore A  B  (A U B). (A U B) = A  B

11 Proof Using Membership Table Using membership tables 1 : means x is in the Set 0 : means x is not in the Set (A U B) = A  B A U BA  B B A U BABA The two columns are the same. Therefore, x  (A U B) iff x  A  B – i.e., the equality holds.

12 Sets as Bit-Strings For a finite universal set U = {a 1, a 2, …,a n } 1. Assign an arbitrary order to the elements of U. 2. Represent a subset A of U as a string of n bits, B = b 1 b 2 …b n Example:U = {a 1, a 2, …, a 5 }, A = {a 1, a 3, a 4 } B = 10110

13 Sets as Bit-Strings Set theoretic operations A  B A  B A  B B A Bit-wise OR Bit-wise AND Bit-wise XOR

14 Functions (Section 2.3) Let A and B be nonempty sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by the function f to the element a in A. If f is a function from A to B, we write f : A  B. Functions are sometimes called mappings.

15 Example A = {Mike, Mario, Kim, Joe, Jill} B = {John Smith, Edward Groth, Jim Farrow} Let f:A  B where f(a) means father of a. Can grandmother of a be a function ? Mike Mario Kim Joe Jill John Smith Edward Groth Richard Boon f AB