Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.

Similar presentations


Presentation on theme: "CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett."— Presentation transcript:

1 CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

2 Today’s Topics: 1.  Vs  2. Venn Diagrams 3. Proving two sets are equal 4. Power Set and Cross Product 2

3 Set notations  Union: A  B = {x:x  A  x  B}  Intersection: A  B = {x:x  A  x  B}  Complement:A c = {x:x  A}  Difference:A-B = {x:x  A  x  B}  Empty set:  3

4 1.  Vs  Don’t be confused! 4

5  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 5

6  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 6

7  Vs   Which one of the following is true? A.   { ,{  },{{  }}} B.   { ,{  },{{  }}} C. {  }  { ,{  },{{  }}} D. {  }  { ,{  },{{  }}} E. None/other/more than one 7

8 2. Venn Diagrams 8

9  We will prove this using Venn Diagram method  First, we need to draw a generic Venn Diagram: 9 U B A C

10 10 U B A C

11 11 U B A C

12 12 U B A C

13 13

14 3. Proving two sets are equal 14

15 Set equality 15

16 Set equality: example  X={even numbers}  Y={n: n+2 is even}  Claim: X=Y  Proof: n  X  n is even  n+2 is even  n  Y 16

17 Set equality  Another take: one way to prove that X=Y is to prove that both  X  Y  Y  X 17

18 Set equality: another example  X={n: 6 divides n}  Y={n:2 divides n and 3 divides n}  Claim: X=Y  X  Y: Let n  X, i.e. n=6k. Hence, n=2(3k),n=3(2k), which means n  Y.  Y  X: Let n  Y, i.e. n=2a,n=3b. So, 3b=2a is even. Hence b must be even (because odd times odd is odd), i.e. b=2c. So, n=6c, hence n  X. 18

19 Set equality: yet another example  Can also prove directly  Claim: (A C ) C =A  Proof: A C ={x: x  A} (A C ) C = {x: x  A C } = {x: x  A} 19

20 4. Power Set and Cross Product 20

21 Power Sets 21

22 Cross Product 22


Download ppt "CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett."

Similar presentations


Ads by Google