Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 250, Discrete Structures, Fall 2013

Similar presentations


Presentation on theme: "CS 250, Discrete Structures, Fall 2013"— Presentation transcript:

1 CS 250, Discrete Structures, Fall 2013
Lecture 2.2: Set Theory CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Cinda Heeren

2 Course Admin HW1 Word Equation editor; Open Office Was just due
We will start to grade it We will provide a solution set soon Word Equation editor; Open Office 2/23/2019 Lecture Set Theory

3 Outline Set Theory, Operations and Laws 2/23/2019
Lecture Set Theory

4 Set Theory - Operators U A B like “exclusive or”
The symmetric difference, A  B, is: A  B = { x : (x  A  x  B) v (x  B  x  A)} = (A - B) U (B - A) A U B 2/23/2019 Lecture Set Theory

5 Set Theory - Operators = (A - B) U (B - A) Proof:
A  B = { x : (x  A  x  B) v (x  B  x  A)} = (A - B) U (B - A) Proof: { x : (x  A  x  B) v (x  B  x  A)} = { x : (x  A - B) v (x  B - A)} = { x : x  ((A - B) U (B - A))} = (A - B) U (B - A) 2/23/2019 Lecture Set Theory

6 Set Theory - Famous Laws
Two pages of (almost) obvious. One page of HS algebra. One page of new. Don’t memorize them, understand them! They’re in Rosen, p. 130 2/23/2019 Lecture Set Theory

7 Set Theory - Famous Laws
Identity Domination Idempotent A  U = A A U  = A A U U = U A   =  A U A = A A  A = A 2/23/2019 Lecture Set Theory

8 Set Theory - Famous Laws
Excluded Middle Uniqueness Double complement A U A = U A  A =  A = A 2/23/2019 Lecture Set Theory

9 Set Theory – Famous Laws
Commutativity Associativity Distributivity A U B = B U A B  A A  B = (A U B) U C = A U (B U C) A  (B  C) (A  B)  C = A U (B  C) = A  (B U C) = (A U B)  (A U C) (A  B) U (A  C) 2/23/2019 Lecture Set Theory

10 Set Theory – Famous Laws
DeMorgan’s I DeMorgan’s II (A U B) = A  B (A  B) = A U B Venn Diagrams are good for intuition, but we aim for a more formal proof. p q 2/23/2019 Lecture Set Theory

11 3 Ways to prove Laws or set equalities
Show that A  B and that A  B. Use a membership table. Use logical equivalences to prove equivalent set definitions. New & important Like truth tables Not hard, a little tedious 2/23/2019 Lecture Set Theory

12 Example – the first way Prove that
() (x  A U B)  (x  A U B)  (x  A and x  B)  (x  A  B) 2. () (x  A  B)  (x  A and x  B)  (x  A U B)  (x  A U B) (A U B) = A  B 2/23/2019 Lecture Set Theory

13 Example – the second way
Prove that using a membership table. 0 : x is not in the specified set 1 : otherwise (A U B) = A  B A B A  B AUB A U B 1 2/23/2019 Lecture Set Theory

14 Example – the third way Prove that using logically equivalent set definitions. (A U B) = A  B (A U B) = {x : (x  A v x  B)} = {x : (x  A)  (x  B)} = {x : (x  A)  (x  B)} = A  B 2/23/2019 Lecture Set Theory

15 Another example: applying the laws
X  (Y - Z) = (X  Y) - (X  Z). True or False? Prove your response. (X  Y) - (X  Z) = (X  Y)  (X  Z)’ = (X  Y)  (X’ U Z’) = (X  Y  X’) U (X  Y  Z’) =  U (X  Y  Z’) = (X  Y  Z’) = X  (Y - Z) 2/23/2019 Lecture Set Theory

16 A Proof (direct and indirect)
Pv that if (A - B) U (B - A) = (A U B) then A  B =  Suppose to the contrary, that A  B  , and that x  A  B. Then x cannot be in A-B and x cannot be in B-A. Then x is not in (A - B) U (B - A). But x is in A U B since (A  B)  (A U B). Thus, A  B = . 2/23/2019 Lecture Set Theory

17 Today’s Reading Rosen 2.1 and 2.2 2/23/2019 Lecture Set Theory


Download ppt "CS 250, Discrete Structures, Fall 2013"

Similar presentations


Ads by Google