170 likes | 280 Views
Lecture 2.2: Set Theory*. CS 250, Discrete Structures, Fall 2011 Nitesh Saxena * Adopted from previous lectures by Cinda Heeren. Course Admin. Slides from previous lectures all posted HW1 Posted Due at 11am 09/09/11 Please follow all instructions
E N D
Lecture 2.2: Set Theory* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren
Course Admin • Slides from previous lectures all posted • HW1 Posted • Due at 11am 09/09/11 • Please follow all instructions • Recall: late submissions will not be accepted • Word Equation editor; Open Office; Alt-Codes • Please pick up your competency exams, if you haven’t done so Lecture 2.2 -- Set Theory
Outline • Set Theory, Operations and Laws Lecture 2.2 -- Set Theory
U A B like “exclusive or” Set Theory - Operators The symmetric difference, A B, is: A B = { x : (x A x B) v (x B x A)} = (A - B) U (B - A) Lecture 2.2 -- Set Theory
Set Theory - Operators 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) Lecture 2.2 -- Set Theory
Don’t memorize them, understand them! They’re in Rosen, p. 130 Set Theory - Famous Laws • Two pages of (almost) obvious. • One page of HS algebra. • One page of new. Lecture 2.2 -- Set Theory
A U = A A U U = U A U A = A A U = A A = A A = A Set Theory - Famous Laws • Identity • Domination • Idempotent Lecture 2.2 -- Set Theory
A U A = U A = A A A= Set Theory - Famous Laws • Excluded Middle • Uniqueness • Double complement Lecture 2.2 -- Set Theory
B U A B A A U (B U C) A U (B C) = A (B C) A (B U C) = Set Theory – Famous Laws • Commutativity • Associativity • Distributivity A U B = A B = (A U B)U C = (A B) C = (A U B) (A U C) (A B) U (A C) Lecture 2.2 -- Set Theory
(A UB)= A B (A B)= A U B Venn Diagrams are good for intuition, but we aim for a more formal proof. Set Theory – Famous Laws • DeMorgan’s I • DeMorgan’s II p q Lecture 2.2 -- Set Theory
New & important Like truth tables Not hard, a little tedious 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. Lecture 2.2 -- Set Theory
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 UB)= A B Lecture 2.2 -- Set Theory
(A UB)= A B Example – the second way Prove that using a membership table. 0 : x is not in the specified set 1 : otherwise Lecture 2.2 -- Set Theory
(A UB)= A B (A UB)= {x : (x A v x B)} = A B = {x : (x A) (x B)} Example – the third way Prove that using logically equivalent set definitions. = {x : (x A) (x B)} Lecture 2.2 -- Set Theory
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’) Lecture 2.2 -- Set Theory
A U B = A = B A B = A-B = B-A = A Proof (direct and indirect) A B = Pv that if (A - B) U (B - A) = (A U B) then 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 = . Lecture 2.2 -- Set Theory
Today’s Reading • Rosen 2.1 and 2.2 Lecture 2.2 -- Set Theory