37
Sets and Set Operations

1150 day 2

Embed Size (px)

Citation preview

Page 1: 1150 day 2

Sets and Set Operations

Page 2: 1150 day 2

Set – A collection of objectsexample: a set of tires

Element – An object contained within a setexample: my car’s left front tire

Page 3: 1150 day 2

Finite set – Contains a countable number of objects

Example: The car has 4 tires

Infinite set- Contains an unlimited number of objects

Example: The counting numbers {1, 2, 3, …}

Page 4: 1150 day 2

Cardinal Number – Used to count the objects in a set

Example: There are 26 letters in the alphabet

Ordinal Number – Used to describe the position of an element in a set

Example: The letter D is the 4th letter of the alphabet

Page 5: 1150 day 2

Equal sets – Sets that contain exactly the same elements (in any order)

{A, R, T, S} = {S, T, A, R}

Notation: A = B means set A equals set B

Page 6: 1150 day 2

Equivalent sets – Sets that contain the same number of elements (elements do not have to be the same)

{C, A, T} ~ {d, o, g}

Notation: A ~ B means set A is equivalent to set B

Page 7: 1150 day 2

Empty Set – A set that contains no elements Notation: { } or

Universal Set – A set that contains all of the elements being considered

Notation: U

Page 8: 1150 day 2

Complement of a set – A set that contains all of the elements of the universal set that are not in a given set

Notation: means the complement of BB

Page 9: 1150 day 2

A = {2, 4, 6, 8} B = {1, 2, 3, 4, …}C = {1, 2, 3, 4, 5} D = { }E = {Al, Ben, Carl, Doug} F = { 5, 4, 3, 2, 1}G = {x | x < 6 and x is a counting number}

Set Builder Notation

Which sets are finite?

Which sets are equal to set C?

Which sets are equivalent to set A?

{1, 2, 3, 4, 5}

n(E) =n(G) =

45

F, G

E

A, C, D, E, F, G

Page 10: 1150 day 2

U = {1, 2, 3, 4, 5, 6, 7}

M = {2, 4, 6}

What is ?M

{1, 3, 5, 7}

Page 11: 1150 day 2

Is { } the same as ? Yes

Is { } the same as ? No

Page 12: 1150 day 2

Set B is a subset of set A if every element of set B is also an element of set A.

Notation: B A

W = {1, 2, 3, 4, 5} X = {1, 3, 5}Y = {2, 4, 6} Z = {4, 2, 1, 5, 3}

True or False:X WY WZ W W

TrueFalseTrueTrue

The empty set is a subset of every set

Page 13: 1150 day 2

Set B is a proper subset of set A if every element of set B is also an element of set A AND B is not equal to A.

Notation: B A

W = {1, 2, 3, 4, 5} X = {1, 3, 5}Y = {2, 4, 6} Z = {4, 2, 1, 5, 3}

True or False:X WY WZ W

TrueFalseFalse

Page 14: 1150 day 2

How many subsets can a set have?

Set{a}

{a, b}{a, b, c}

{a, b, c, d}

Number of Elements

123

4n

SubsetsNumber of

Subsets24

8

162n

{a},{ }{a},{b},{a,b},{ }{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c},{ }

If a set has n elements, it has 2n subsets

Page 15: 1150 day 2

How many proper subsets can a set have?

Set{a}

{a, b}{a, b, c}

{a, b, c, d}

Number of Elements

123

4n

Proper Subsets

Number of Proper Subsets

13

7

152n – 1

{a},{ }{a},{b},{a,b},{ }{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c},{ }

If a set has n elements, it has 2n – 1 proper subsets

XX

X

Page 16: 1150 day 2

W = {a, b, c, d, e, f}

How many subsets does set W have?26 = 64

How many proper subsets does set W have?26 – 1 = 64 – 1 = 63

Page 17: 1150 day 2
Page 18: 1150 day 2

A Venn Diagram allows us to organize the elements of a set according to their attributes.

Page 19: 1150 day 2
Page 20: 1150 day 2

U = {1, 2, 3, 4, 5, 6.5}

even odd

prime

1

23

4

5

6.5

Page 22: 1150 day 2

Set Operations

The intersection of sets A and B is the set of all elements in both sets A and B

notation: A B

Page 23: 1150 day 2

The union of sets A and B is the set of all elements in either one or both of sets A and B

notation: A B

Page 24: 1150 day 2

The union of sets A and B is the set of all elements in either one or both of sets A and B

notation: A B

Page 25: 1150 day 2

The union of sets A and B is the set of all elements in either one or both of sets A and B

notation: A B

Page 26: 1150 day 2
Page 27: 1150 day 2

A = {1, 2, 3, 4, 5} B = {2, 4, 6} C = {3, 5, 7}

A B =

A B =

C B =

C B =

{2, 4}

{1, 2, 3, 4, 5, 6}

{2, 3, 4, 5, 6, 7)

{ }

The set complement X – Y is the set of all elements of X that are not in Y

A – B =

C – A =

{1, 3, 5}

{7}

Page 28: 1150 day 2

Representing sets with Venn diagrams

A B A B

C

Three attributes23 or 8 regions

1 2 3

4

1 2 3

45

6

78

Two attributes22 or 4 regions

Page 29: 1150 day 2

A B

A

A B

A

Page 30: 1150 day 2

A B

A U B

A B

A BA B

A B

Page 31: 1150 day 2

A B

A U B

A B

A B

Page 32: 1150 day 2

A B

C

(A U B) C

Page 33: 1150 day 2

(A U B) C

A B

C

1 2 3

45

6

78

A = B = C = C =

A U B =

(A U B) C =

{1, 2, 4, 5}{2, 3, 5, 6}{4, 5, 6, 7}{1, 2, 3, 8}

{1, 2, 3, 4, 5, 6}

{1, 2, 3}

Page 34: 1150 day 2

A U (B C)

A B

C

A = B = C = B C =

A U (B C) =

{3, 6, 7, 8}{2, 3, 5, 6}{4, 5, 6, 7}

{5, 6}

{3, 5, 6, 7, 8}

3

78

65

4

1 2

Page 35: 1150 day 2

A B1 2

3

4

How many stars are in:Circle ACircle BOnly Circle ABoth A and B

Either A or BExactly one circleNeither circleTotal stars =

3521

7629

Page 36: 1150 day 2

B FOut of 20 students:

8 play baseball7 play football3 play both sports

How many play neither sport?

How many play only baseball?

How many play exactly one sport?

20

35 4

8

8

5

5 + 4 = 9

Page 37: 1150 day 2

B P

G

Out of 30 people surveyed:20 like Blue20 like Pink15 like Green14 like Blue and Pink11 like Pink and Green12 like Blue and Green10 like all 3 colors

How many people like only Pink?How many like Blue and Green but not Pink?How many like none of the 3 colors?How many like exactly two of the colors?

102 1

4

2

54

2

30

52

24 + 2 + 1 =7