Lecture 4 Sets

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 53

SETS

What is a Set?

 Any group or collection of objects is


called a set. The objects that belong in
a set are the elements, or members, of
the set.
 For example, the set consisting of the
four seasons has spring, summer, fall,
and winter as its elements.
S {spring,summer,fall,winter}
This method is called the roster method. Commas are used to
separate the elements.
Other Examples

 The collection of the vowels in the word


“probability”.
 The collection of real numbers that
satisfy the equation x 2  9 .0
 The collection of two-digit positive
integers divisible by 5.
 The collection of great football players in
the National Football League.
 The collection of intelligent members of
the United States Congress.
Basic Number Sets
 Natural Numbers or Counting Numbers N
{1,2,3,4,5,…..}
 Whole Numbers W {0, 1, 2, 3, 4, 5, ...}
 Integers I { 4, 3, 2, 1, 0, 1, 2, 3, 4, ...}
 Real Numbers R the set of all rational or
irrational numbers
Rational numbers are the set of all terminating or
repeating decimals.
Irrational numbers are the set of all nonterminating,
nonrepeating decimal
Basic Number Sets
 The set of natural numbers is also called the set of counting
numbers. The three dots ... are called an ellipsis and indicate
that the elements of the set continue in a manner suggested
by the elements that are listed.
 The integers ... , -4, -3, -2, -1 are negative integers.
 The integers 1, 2, 3, 4, ... Are positive integers.
Note that the natural numbers and the positive integers are the same set of numbers. The
integer zero is neither a positive nor a negative integer
 If a number in decimal form terminates or repeats a block of
digits, then the number is a rational number. Rational
numbers can also be written in the form , p/q where p and q
are integers and q is not 0.
 Example ¼=.25 3/11= 0.2727272727…….= .27 are
rational numbers. The bar over the 27 means that the block
of digits 27 repeats without end; that is, 0.27 0.27272727. .
..
Basic Number Sets
 If a number in decimal form terminates or repeats a block of
digits, then the number is a rational number. Rational
numbers can also be written in the form , p/q where p and q
are integers and q is not 0.
 Example ¼=.25 3/11= 0.2727272727…….= .27are
rational numbers. The bar over the 27 means that the block
of digits 27 repeats without end; that is, 0.27 0.27272727. .
..
 A decimal that neither terminates nor repeats is an irrational
number. For instance, 0.35335333533335. . . is a
nonterminating, nonrepeating decimal and thus is an
irrational number.
 Every real number is either a rational number or an irrational
number.
Definitions Regarding Sets

A set is well defined if it is possible to


determine whether any given item is an
element of the set.
For instance, the set of letters of the English
alphabet is well defined. The set of great songs
is not a well-defined set.
It is not possible to determine whether any
given song is an element of the set or is not an
element of the set because there is no
standard method for making such a judgment.
EXAMPLES

Determine whether each statement is true or


false.
a. 4 2, 3, 4, 7
b. 5 N
c. ½ I
d. The set of nice cars is a well-defined set.
Solution

a. Since 4 is an element of the given set, the


statement is true.
b. There are no negative natural numbers, so
the statement is false.
c. Since 1/2 is not an integer, the statement
is true.
d. The word nice is not precise, so the
statement is false.
The Empty Set

 The set with no elements.


 Also called the null set.
 Denoted by the symbol f.
 Example: The set of real numbers x
that satisfy the equation
x2 1  0
Set-Builder Notation
 Another method of representing a set is
set-builder notation.
Set-builder notation is especially useful
when describing infinite sets. For instance,
in set-builder notation, the set of natural
set
the

numbers greater than 7 is written as


follows: membership
conditions

{x | x ∈ N and x > 7 }

The preceding set-builder notation is read as “the set of


all elements x such that x is an element of the set of natural
numbers and x is greater than 7.”
Example:

Use set-builder notation to write the


following sets.

a. The set of integers greater than 3


set

{x|x Є I and x > 3}


b. The set of whole numbers less than1000
{x|x Є W and x < 1000}
Finite Sets

 A finite set is one which can be counted.


 Example: The set of two-digit positive
integers has 90 elements.
 A set is finite if the number of elements in
the set is a whole number.
 For finite sets A, n(A) is the number of
elements of A.
Cardinality of a Set

 The cardinal number of a finite set is the


number of elements in the set.
 The cardinal number of a finite set A is
denoted by the notation n A .
 For instance, if A1, 4, 6, 9 , then n A4.
 In this case, A has a cardinal number of 4,
which is sometimes stated as “A has a
cardinality of 4.”
 Notation: n(A)
Example
Find the cardinality of each of the following
sets.
a. J {2, 5}
b. S {3, 4, 5, 6, 7, ... , 31}
c. T {3, 3, 7, 51}
Solution:
a. Set J contains exactly two elements, so J has a cardinality of 2. Using
mathematical notation, we state this as n J2.
b. Only a few elements are actually listed. The number of natural
numbers from 1 to 31 is 31. If we omit the numbers 1 and 2, then the
number of natural numbers from 3 to31 must be 31 2 29. Thus n S29.
c. Elements that are listed more than once are counted only once. Thus
n T3.
Infinite Sets

 An infinite set is one which cannot be


counted.
 Example: The set of integer multiples
of the number 5.
 For infinite sets A, write n(A)=∞.
Equal Sets and Equivalent Sets
Equal Sets
Set A is equal to set B, denoted by
A=B, if and only if A and B have
exactly the same elements.
For instance d, e, f and e, f, d .
Equivalent Sets
Set A is equivalent to set B, denoted
by A B, if and only if A and B have
the same number of elements.
Example:
State whether each of the following
pairs of sets are equal, equivalent,
both, or neither.
a. a, e, i, o, u , 3, 7, 11, 15, 19

b. 4, 2, 7 , 3, 4, 7, 9
Solution:
a. The sets are not equal. However, each set has exactly
five elements, so the sets are equivalent.
b. The first set has three elements and the second set has
four elements, so the sets are not equal and are not
equivalent.
Q and A
QUESTION:
If two sets are equal, must they also be
equivalent?

ANSWER:
Yes. If the sets are equal, then they
have exactly the same elements;
therefore, they also have the same
number of elements.
Specifying a Set

 List the elements explicitly, e.g.,


C   a, o, i 

 List the elements implicitly, e.g.,

K   10, 15, 20, 25,...., 95 

 Use set builder notation, e.g.,


Q   x x  p / q where p and q are integers and q  0 
The Universal Set

 A set U that includes all of the


elements under consideration in a
particular discussion.
 Depends on the context.
 Examples: The set of Latin letters,
the set of natural numbers, the set
of points on a line.
Venn Diagrams
 The English logician John Venn (1834 –
1923) developed diagrams, which we
now refer to as Venn diagrams, that can
be used to illustrate sets and
relationships between sets.
 In a Venn diagram, the universal set is
represented by a rectangular region
and subsets of the universal set are
generally represented by oval or
circular regions drawn inside the
rectangle.
Venn Diagrams

Set A represented as a disk inside a


rectangular region representing U.
Possible Venn Diagrams
for Two Sets

U U
A B
A B

A B
The Membership Relation

 Let A be a set and let x be some


object.
 Notation: x A
 Meaning: x is a member of A, or x
is an element of A, or x belongs to
A.
 Negated by writing x  A
 Example: V   a, e, i, o, u  . e  V , b V .
Equality of Sets
 Two sets A and B are equal, denoted A=B,
if they have the same elements.
 Otherwise, A≠B.
 Example: The set A of odd positive
integers is not equal to the set B of prime
numbers.
 Example: The set of odd integers between
4 and 8 is equal to the set of prime
numbers between 4 and 8.
Subsets
 Consider the set of letters in the alphabet and
the set of vowels a, e, i, o, u . Every element
of the set of vowels is an element of the set of
letters in the alphabet. The set of vowels is
said to be a subset of the set of letters in the
alphabet. We will often find it useful to
examine subsets of a given set.
 The notation A  B is used to denote that A is
not a subset of B. To show that A is not a
subset of B, it is necessary to find at least one
element of A that is not an element of B.
Subsets

 A is a subset of B if every element of A is


an element of B.
 Notation: A  B
 For each set A, A  A
 For each set B, Ø  B
 A is proper subset of B if A  B and A  B
Example:
Determine whether each statement is true or
false.
a. 5, 10, 15, 20 0, 5, 10, 15, 20, 25, 30
b. W N
c. 2, 4, 6 2, 4, 6
d. 1, 2, 3
Example:
Solutions:

a. True; every element of the first set is an


element of the second set.
b. False; 0 is a whole number, but 0 is not a
natural number.
c. True; every set is a subset of itself.
d. True; the empty set is a subset of every set
The Proper Subsets

Set A is a proper subset of set B,


denoted by A  B, if every element of A
is an element of B, and A B
Example:
R={Mars, Venus} and S={Mars, Venus,
Mercury}. The first set, R, is a subset1. Let R
of the second set, S, because every element of
R is an element of S. In addition, R is also a
proper subset of S, because R  S .
Example:
For each of the following, determine
whether the first set is a proper subset
of the second set.
a. a, e, i, o, u e, i, o, u, a
b. N, I
Solution:
a. Because the sets are equal, the first set is not a proper
subset of the second set.
b. Every natural number is an integer, so the set of natural
numbers is a subset of the set of integers. The set of
integers contains elements that are not natural numbers,
such as 3. Thus the set of natural numbers is a proper
subset of the set of integers.
The Number of Subsets of a
Set

A set with n elements has 2n subsets.


Examples
{1, 2, 3, 4, 5, 6} has 6 elements, so it
has 26 64 subsets
{4, 5, 6, 7, 8, ... , 15} has 12 elements,
so it has 212 4096 subsets
The empty set has 0 elements, so it has
20 1 subset
Example:
Set C shows the four condiments that a
hot dog stand offers on its hot dogs.
C={mustard, ketchup, onions, relish}
List all the subsets of C

Solutions:
An organized list shows the following subsets.
{} Subsets with 0 elements
{mustard}, {ketchup}, {onions}, {relish} Subsets with 1 element
{mustard, ketchup}, {mustard, onions}, {mustard, relish},
{ketchup,onions},{ketchup, relish}, {onions, relish} Subsets with 2
elements
{mustard, ketchup, onions}, {mustard, ketchup, relish},
{mustard, onions, relish}, {ketchup, onions, relish} Subsets with 3
elements
{mustard, ketchup, onion, relish} Subsets with 4 elements
The Intersection of Two Sets

A B
Intersections

 The intersection of A and B is

A  B   x x  A and x  B

 Example: Let A be the set of even


positive integers and B the set of prime
positive integers. Then
A  B  {2}

 Definition: A and B are disjoint if

A B  Ø
Examples:

Find Intersections
Let A {1, 4, 5, 7 }, B {2, 3, 4, 5, 6 }, and C {3,
6, 9} . Find
a. A  B

b. A C
Solution:
a.The elements common to A and B are 4 and 5.
b. Sets A and C have no common elements. Thus
A C  Ø
The Union of Two Sets

A∪B
U

A B
Unions
 The union of two sets A and B is

A  B   x x  A or x  B

 The word “or” is inclusive.


 The union of sets A and B, denoted
by AUB, is the set that contains all
the elements that belong to A or to B
or to both.
Examples:

Find Unions
Let A {1, 4, 5, 7 }, B {2, 3, 4, 5, 6 }, and C {3,
6, 9} . Find
a. A  B

b. A C
Solution:
a. A  B = {1, 2, 3, 4, 5, 6, 7}
b. A C = {1, 3, 4, 5, 6, 7, 9}
The Complement of a Set

Ac
A

The shaded region represents the


complement of the set A
Complements

o If A is a subset of the universal set U,


then the complement of A is the set

Ac   x U x  A 

o Note: A  A   ;
c
A  A c
U
The Complement of a Set
 The complement of a set A, denoted by
A , is the set of all elements of the
universal set U that are not elements of
A.
 Example:

Let U={1, 2, 3, 4, 5, 6, 7, 8, 9, 10},


S={2, 4, 6, 7}, and T={x l x <10} and x
the odd counting numbers . Find
a. S b. T
The Complement of a Set
 Solution:
a. The elements of the universal set are 1,
2, 3, 4, 5, 6, 7, 8, 9, and 10. From these
elements we wish to exclude the elements
of S, which are 2, 4, 6, and 7. Therefore
S={1, 3, 5, 8, 9, 10} .
b. T={1, 3, 5, 7, 9} . Excluding the
elements of T from U gives us T={2, 4, 6,
8, 10} .
There are two fundamental results concerning the
universal set and the empty set. Because the
universal set contains all elements under
consideration, the complement of the universal
set is the empty set. Conversely, the complement
of the empty set is the universal set, because the
empty set has no elements and the universal set
contains all the elements under consideration.
Using mathematical notation, we state these
fundamental results as follows:

The Complement of the Universal Set and the


Complement of the Empty Set U and U.
Sets Formed by Two Sets
o R1  A  Bc

 R2  A  B
U
A B

R1
R2
R3  R3  Ac  B
R4

 R4  Ac  Bc
Venn Diagrams and Equality of
Sets
The Venn diagram in figure below shows the four
regions formed by two intersecting sets in a
universal set U. It shows the four possible
relationships that can exist between an element of
a universal set U and two sets A and B.
An element of U:
U
A B
o may be an element of both A and B. Region i
iii o may be an element of A, but not B. Region ii
i o may be an element of B, but not A. Region iii
ii
iv o may not be an element of either A or B.
Region iv
An Application of Sets
Example:
A movie company is making plans for future movies
it wishes to produce. The company
has done a random survey of 1000 people. The
results of the survey are shown below.
695 people like action adventures.
340 people like comedies.
180 people like both action adventures and comedies.

Of the people surveyed, how many people


a. like action adventures but not comedies?
b. like comedies but not action adventures?
c. do not like either of these types of movies?
U U
Action
A B Comedies
Adventures

iii
i 515 180
160
ii
iv 145

a. Regions i and ii have a total of 695 people. So far we have accounted for 180
of these people in region i. Thus the number of people in region ii, which is the
set of people who like action adventures but do not like comedies, is 695 180
515.
b. Regions i and iii have a total of 340 people. Thus the number of people in
region iii, which is the set of people who like comedies but do not like action
adventures, is 340 180 160.
c. The number of people who do not like action adventure movies or comedies is
represented by region iv. The number of people in region iv must be the total
number of people, which is 1000, less the number of people accounted for in
regions i, ii, and iii, which is 855. Thus the number of people who do not like
either type of movie is 1000 855 145.
U
ROCK RAP

v ii vii
i
iv iii
vii
viii HEAVY
METAL

A music teacher has surveyed 495 students. The results of the survey are listed
below.
320 students like rap music.
395 students like rock music.
295 students like heavy metal music.
280 students like both rap music and rock music.
190 students like both rap music and heavy metal music.
245 students like both rock music and heavy metal music.
160 students like all three.
How many students
a. like exactly two of the three types of music?
b. like only rock music?
c. like only one of the three types of music?
U
ROCK RAP

30 10
120
160
85 30

20
40 HEAVY
METAL

a. The survey shows that 245 students like rock and heavy metal music, so the
numbers we place in regions i and iv must have a sum of 245. Since region i has
160 students, we see that region iv must have 245 160 85 students. In a similar
manner, we can determine that region ii has 120 students and region iii has 30
students. Thus 85 120 30 235 students like exactly two of the three types of
music.
b. The sum of the students represented by regions i, ii, iv, and v must be 395.
The number of students in region v must be the difference between this total and
the sum of the numbers of students in region i, ii, and iv. Thus the number of
students who like only rock music is 395160 120 8530.
c. Using the same reasoning as in part b, we find that region vi has 10 students
and region vii has 20 students. To find the number of students who like only one
type of music, find the sum of the numbers of students in regions v, vi, and vii,
which is 30 10 20 60.
Two Basic Counting Rules
The Inclusion-Exclusion Principles
If A and B are finite sets,

1. n( A  B)  n( A)  n( B)  n( A  B)

2. n( A  B c )  n( A)  n( A  B)
The Inclusion-Exclusion Principles
 Example:
A school finds that 430 of its students are registered in
chemistry, 560 are registered in mathematics, and 225 are
registered in both chemistry and mathematics. How many
students are registered in chemistry or mathematics?
 Solution:

Let C students registered in chemistry and let M students


registered in mathematics .

n(C  M )  n(C )  n( M )  n(C  M )

n(C  M )  430  560  225  725

You might also like