CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA
Todays topics Set operations Vs Venn diagrams Sets equality and how to prove it Power set, Cartesian product
Set operations JS p. 47
Vs Which one of the following is true? A. 1 {1,2,3} B. 1 {1,2,3} C. {1} {1,2,3} D. {1} 1,2,3 E. None/other/more than one
Vs Recall: x A: x is an element in the set A A B: A is a subset of B (all elements of A are also elements of B) Examples: 1 {1,2,3} {5,7} {5,6,7} Elements can also be set! {1,3} {{2}, 4, {1,3}} We can have set of sets of sets of sets …
Vs Which one of the following is true? A. 1 {{1},{2},{3}} B. 1 {{1},{2},{3}} C. {1} {{1},{2},{3}} D. {1} {{1},{2},{3}} E. None/other/more than one
Vs Which one of the following is true? A. { ,{ },{{ }}} B. { ,{ },{{ }}} C. { } { ,{ },{{ }}} D. { } { ,{ },{{ }}} E. None/other/more than one
Venn diagrams An useful way to understand sets intersection & union Generic Venn diagram for 3 sets: Describes all possible 8=2 3 combinations for whether an element is in A or not; in B or not; in C or not U B A C
Venn diagrams U B A C
U B A C
U B A C
U B A C
Set equality
Proving set equality
Proving set equality: simple example X = {n N: n is even} Y = {n N: n+1 is odd} Claim: X=Y Proof that X Y: If n X, then n is even, hence n+1 is odd, hence n+1 Y Proof that Y X: If n Y, then n+1 is odd, hence n is odd, hence n X
Proving set equality: another example
Power Set JS p. 45
Power Set Which one of the following is always true? A. A P(A) B. A P(A) C. {A} P(A) D. {A} P(A) E. None/other/more than one
Cartesian product JS p. 48
Cartesian product
Next class More about sets Read section 2.1 in Jenkyns, Stephenson