class 5 - set theory and venn diagrams

25
THE LOGIC OF COLLECTIONS Class 5 – Set Theory and Venn Diagrams

Upload: stephen-parsons

Post on 18-Nov-2014

15.658 views

Category:

Education


0 download

DESCRIPTION

This class looks at set theory and ways to apply Venn to solving set problems.

TRANSCRIPT

Page 1: Class 5 - Set Theory and Venn Diagrams

THE LOGIC OF COLLECTIONSClass 5 – Set Theory and Venn Diagrams

Page 2: Class 5 - Set Theory and Venn Diagrams

Introduction

Discrete versus Applied Mathematics Black, White & Grey

Set Theory and Venn Problem: Skilled Resources

24 Programmers 8 Ruby, 10 Java, 12 VB 2=R+J+V 4=R+J-V 3=J+V-R 1=R-V-J ?=V-J-R

Java

RubyVB

Page 3: Class 5 - Set Theory and Venn Diagrams

Agenda

Review and Debrief Set Theory Set Operators Venn Diagrams Quest: Ruby Math features Quest Topic: Truth Tables Assignment Wrap-up, Questions

Page 4: Class 5 - Set Theory and Venn Diagrams

Review Debrief

Assignment 2 Observations - Questions

Assignment Three Challenges Learning

Ruby Installation & IDEs Review – Ruby Strings & Variables

Practice handout

Page 5: Class 5 - Set Theory and Venn Diagrams

Set Theory

The language of Sets Set Element Subset Universe Empty set Cardinality

Page 6: Class 5 - Set Theory and Venn Diagrams

Set Theory

Notation: Set A={1,2,3,4,5}

Or: A= {x|x, a integer AND 0<x<6 }

A={1,2,3,...,10} A={1,3,5,...,99} A={2,4,6...}

Page 7: Class 5 - Set Theory and Venn Diagrams

Set Theory

Notation: Element x A Or A x

A={1,2,3,...,10} And x= 12:. x A

Э

Э

Э

Page 8: Class 5 - Set Theory and Venn Diagrams

Set Theory

Notation: Subset A={1,3,5,7..99} and B =

{21,27,33} B ⊂ A  Iff A<>B then B ⊂ A

Notation: empty set = Ø or {}  E={Ø}; |E|=1 C= Ø; |C|=0

Page 9: Class 5 - Set Theory and Venn Diagrams

Set Theory

Notation: Universal Set Universe=U

Java

RubyVB

U

Page 10: Class 5 - Set Theory and Venn Diagrams

Set Theory

Notation: Cardinality A={1,3,5,...21} |A|=11  N={a,b,c,...z} |N|=26 C={1,2,3,4,...} |C|=∞ Z={all even prime numbers >2} |Z|

=0

Page 11: Class 5 - Set Theory and Venn Diagrams

Exercise: Basic Set Theory

Please attempt all questions Use appropriate notation

Time: 10 minutes

Page 12: Class 5 - Set Theory and Venn Diagrams

Set Operations

Union – the set of all elements of both sets

 Notation: A ∪ B

 T={e,g,b,d,f}  B={f,a,c,e}  T ∪ B = {a,b,c,d,e,f,g}*

A B

Page 13: Class 5 - Set Theory and Venn Diagrams

Set Operations

Intersection – the set of common elements of both sets

 Notation: A ∩ B

 T={e,g,b,d,f}  B={f,a,c,e}  T ∩ B = {e,f}

A B

A ∩ B

Page 14: Class 5 - Set Theory and Venn Diagrams

Set Operations

Cardinality principle for two sets =  |A ∪ B| = |A| + |B| - | A ∩ B | example

Cardinality principle for three sets = |A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A

∩ C| - |B ∩ C| + |A ∩ B ∩ C|

example

Page 15: Class 5 - Set Theory and Venn Diagrams

Set Operations

Complement – all those elements in the universal set which are not part of the defined set Notation A’ or Ac

e.g. U={1,2,3,4,...} A={2,4,6,8,...} A’= {1,3,5,7,...}

Page 16: Class 5 - Set Theory and Venn Diagrams

Exercise: Set Operations

Please attempt all questions Use appropriate notation

Time: 10 minutes

Page 17: Class 5 - Set Theory and Venn Diagrams

Venn Diagrams

A visual representation of Sets Each circle is a set or subset The rectangle is

the universal set Overlaps are

intersections The union is the

set of uniqueelements among all sets

Java

RubyVB

U

Page 18: Class 5 - Set Theory and Venn Diagrams

Venn Diagrams

Using Venn to solve problems Handout & Walkthrough

Page 19: Class 5 - Set Theory and Venn Diagrams

Group Exercises

Skills Problem Lateral Thinking

ProblemDB

WEBPROG

U

Page 20: Class 5 - Set Theory and Venn Diagrams

Group Exercises

Skills Problem Plug in what we are given

DB

WEBPROG

U=30

16

16

11

32

58

Page 21: Class 5 - Set Theory and Venn Diagrams

Group Exercises

Skills Problem Calculate WEB + PROG

DB

WEBPROG

U=30

16

16

11

32

581

Page 22: Class 5 - Set Theory and Venn Diagrams

Group Exercises

Skills Problem Calculate PROG + DB

DB

WEBPROG

U=30

16

16

11

32

581

4

Page 23: Class 5 - Set Theory and Venn Diagrams

Group Exercises

Skills Problem Calculate DB

30=x + 4 + 3 + 2+ 1 + 8 + 5

30=x + 23 X=7

DB

WEBPROG

U=30

16

16

11

32

581

4

x

Page 24: Class 5 - Set Theory and Venn Diagrams

Summary

Set Theory Language and Notation

Set Operations Union, Intersection, Cardinality,

Complement Cardinality of two and three sets

Venn Diagrams Relationship with sets

Questions?

Page 25: Class 5 - Set Theory and Venn Diagrams

Assignment

Assignment IV: Set Theory and Venn Diagrams

Complete all exercise Venn and calculation required for full

marks Due: Start of next class