Set and Set Operations

13
Set and Set Operations Section 2.1

description

Section 2.1. Set and Set Operations. Introduction. A set is a collection of objects. The objects in a set are called elements of the set. A well – defined set is a set in which we know for sure if an element belongs to that set. Example: - PowerPoint PPT Presentation

Transcript of Set and Set Operations

Page 1: Set and Set Operations

Set and Set Operations

Section 2.1

Page 2: Set and Set Operations

Introduction

• A set is a collection of objects.• The objects in a set are called elements of the set.• A well – defined set is a set in which we know for

sure if an element belongs to that set.• Example:

– The set of all movies in which John Cazale appears is well – defined. (Name the movies, and what do they have in common? There are only 5.)

– The set of all movie serials made by Republic Pictures is well – defined.

– The set of best TV shows of all time is not well – defined. (It is a matter of opinion.)

Page 3: Set and Set Operations

Notation

• When talking about a set we usually denote the set with a capital letter.

• Roster notation is the method of describing a set by listing each element of the set.

• Example: Let C = The set of all movies in which John Cazale appears. The Roster notation would be C={The Godfather, The Conversation, The Godfather II, Dog Day Afternoon, The Deer Hunter }. (All 5 of these movies were nominated for Best Picture by the Motion Picture Academy.)

• Example: Let set A = The set of odd numbers greater than zero, and less than 10. The roster notation of A={1, 3, 5, 7, 9}

Page 4: Set and Set Operations

More on Notation

• Sometimes we can’t list all the elements of a set. For instance, Z Z = The set of integer numbers. We can’t write out all the integers, there infinitely many integers. So we adopt a convention using dots …

• The dots mean continue on in this pattern forever and ever.

• Z Z = { …-3, -2, -1, 0, 1, 2, 3, …}• WW = {0, 1, 2, 3, …} = This is the set of whole

numbers.

Page 5: Set and Set Operations

Set – Builder Notation

• When it is not convenient to list all the elements of a set, we use a notation the employs the rules in which an element is a member of the set. This is called set – builder notation.

• V = { people | citizens registered to vote in Maricopa County}

• A = {x | x > 5} = This is the set A that has all real numbers greater than 5.

• The symbol | is read as such that.

Page 6: Set and Set Operations

Special Sets of Numbers• NN = The set of natural numbers.

= {1, 2, 3, …}.• WW = The set of whole numbers. ={0, 1, 2, 3, …}• ZZ = The set of integers.

= { …, -3, -2, -1, 0, 1, 2, 3, …}• QQ = The set of rational numbers. ={x| x=p/q, where p and q are elements of Z and Z and q q ≠ 0≠ 0 }• HH = The set of irrational numbers.• RR = The set of real numbers.• C = The set of complex numbers.

Page 7: Set and Set Operations

Universal Set and Subsets

• The Universal Set denoted by U is the set of all possible elements used in a problem.

• When every element of one set is also an element of another set, we say the first set is a subset.

• Example A={1, 2, 3, 4, 5} and B={2, 3}We say that B is a subset of A. The notation we use is B A.

• Let S={1,2,3}, list all the subsets of S.• The subsets of S are , {1}, {2}, {3}, {1,2},

{1,3}, {2,3}, {1,2,3}.

Page 8: Set and Set Operations

The Empty Set

• The empty set is a special set. It contains no elements. It is usually denoted as { } or

.• The empty set is always considered a

subset of any set.• Do not be confused by this question:• Is this set {0} empty? • It is not empty! It contains the element

zero.

Page 9: Set and Set Operations

Intersection of sets

• When an element of a set belongs to two or more sets we say the sets will intersect.

• The intersection of a set A and a set B is denoted by A ∩ B.

• A ∩ B = {x| x is in A and x is in B}• Note the usage of and. This is similar to

conjunction. A ^ B.• Example A={1, 3, 5, 7, 9} and B={1, 2, 3, 4, 5}• Then A ∩ B = {1, 3, 5}. Note that 1, 3, 5 are in

both A and B.

Page 10: Set and Set Operations

Mutually Exclusive Sets

• We say two sets A and B are mutually exclusive if A ∩ B = .

• Think of this as two events that can not happen at the same time.

Page 11: Set and Set Operations

Union of sets

• The union of two sets A, B is denoted by A U B.• A U B = {x| x is in A or x is in B}• Note the usage of or. This is similar to

disjunction A v B. • Using the set A and the set B from the previous

slide, then the union of A, B is A U B = {1, 2, 3, 4, 5, 7, 9}.

• The elements of the union are in A or in B or in both. If elements are in both sets, we do not repeat them.

Page 12: Set and Set Operations

Complement of a Set

• The complement of set A is denoted by A’ or by AC.

• A’ = {x| x is not in set A}.• The complement set operation is analogous to

the negation operation in logic.

• Example Say U={1,2,3,4,5}, A={1,2}, then A’ = {3,4,5}.

Page 13: Set and Set Operations

Cardinal Number

• The Cardinal Number of a set is the number of elements in the set and is denoted by n(A).

• Let A={2,4,6,8,10}, then n(A)=5.• The Cardinal Number formula for the

union of two sets is n(A U B)=n(A) + n(B) – n(A∩B).• The Cardinal number formula for the

complement of a set is n(A) + n(A’)=n(U).