Sets
Sets
Introduction to the
Theory of Computation
(A) Review on Sets
OBJECTIVE
■At the end of the module, the learner should be able to:
- Describe and explain the concepts of sets.
SETS
- as a collection well-defined objects, called elements,
having certain common property
- represented by a CAPITAL letter i.e. A, B, C
•a∈A “a is an element of A”
“a is a member of A”
•a∉A “a is not an element of A”
• A = {a1, a2, …, an} “A contains a1, …, an”
Examples: A = { 1, 3, 5, 7 } B = { 0, 1, 2, . . . , 10 }
Note:
1. The order of writing the elements of set is immaterial.
2. Roster method is used only when the number of elements in the set is
finite.
METHOD OF SET NOTATION:
2. SET BUILDER / RULE METHOD
- sometimes a set is defined by stating property (P) which
characterizes all the elements of the set.
- the elements must satisfy a given rule or condition.
Example:
A = { x | x is a positive integer < 4 }
B={x|x<5}
C = { x | x >= 1 and x <= 10 }
D = { x |x is a positive integer }
METHOD OF SET NOTATION:
3. Venn Diagram
- It represents relation and operator using the plane
geometrical figures such as rectangle, circle, ellipse.
Examples:
23 = (2)(2)(2) = 8
TYPES OF SETS
6. Proper Subset – The set A ⊂ B and A ≠ B, then A is
called a proper subset of B.
or Set A is a proper subset of set B if there is at least
one element in B not contained in A.
Example: A = { 1, 2, 3, 4 }
B = { 1, 2, 3, 4, 5 }
A⊂ B
Example of proper subset
A = {c,o,m,p,l,y} B ⊂A
B = {o,m,p,l,y} C⊂A
C = {m,p,l,y} D ⊂A
D = {p,l,y}
Example: U = { 0, 1, 2, 3, 4, 5 }
A = { 2, 4, 5 }
AC = { 0, 1, 3 }
“Standard” Sets
“Standard” Sets
SET RELATIONS
1. Equal Sets - two sets A and B consisting of the same
elements and same cardinality.
2. Equivalent Sets - two sets A and B having the same
cardinality.
Examples: A = { 11, 13, 17, 19 } C = { 11, 13, 19,17 }
B = { 13, 11, 19, 17 } D = { a, b, c, d }
Examples: U = {11,12,13,14,15,16,17,18,19}
A = { 11, 13, 17, 19 }
SET OPERATIONS
UNION
The “union” of two sets A and B is the set which contains all
the elements of A and all the elements of B.
That is, the union of sets A and B, written A ∪ B, is a set that
contains everything in A, or in B, or in both.
SET OPERATIONS
UNION
A ∪ B = {x | (x ∈ A) or (x ∈ B) }
A ∩ B = {x | (x ∈ A) and (x ∈ B) }
SET OPERATIONS
INTERSECTION
Example: A = {1, 3, 9}, B = {3, 5}, C = {a, b, c}
A∩B={ ? }
A∩C={ ? }
SET OPERATIONS
SET DIFFERENCE
The “set difference” of set A and set B, written as A–B, is the
set that contains everything that is in A but not in B.
A - B = {x | x ∈ A and x ∉ B}
A – B = {______?______}
B – A = {______?______}
SET OPERATIONS
Example: A = {1,3,9}, B = {3,5}
A – B = {____________}
B – A = {____________}
PROVING IDENTITIES : List Method
PROVING IDENTITIES : List Method
PROVING IDENTITIES : Laws on Sets
Venn Diagram
Example 1:
In a college, 200 students are randomly selected. 140 like tea, 120 like
coffee and 80 like both tea and coffee.
•How many students like only tea?
•How many students like only coffee?
•How many students like neither tea nor coffee?
•How many students like only one of tea or coffee?
•How many students like at least one of the beverages?
Example 3: and 28% liked watching football and basket ball both. 5% liked
watching none of these games.
•How many students like watching all the three games?
•Find the ratio of number of students who like watching only
In a survey of 500 students of a college, it was found that 49% liked football to those who like watching only hockey.
watching football, 53% liked watching hockey and 62% liked watching •Find the number of students who like watching only one of the
basketball. Also, 27% liked watching football and hockey both, 29% liked three given games.
watching basketball and hockey both and 28% liked watching football and •Find the number of students who like watching at least two of
basket ball both. 5% liked watching none of these games. the given games.
•How many students like watching all the three games?
•Find the ratio of number of students who like watching only football to
those who like watching only hockey.
•Find the number of students who like watching only one of the three given
games.
•Find the number of students who like watching at least two of the given
games.
Number of students who like watching all the three games = 15 % of 500 = 75.
Ratio of the number of students who like only football to those who like only hockey = (9% of 500)/(12% of
500) = 9/12 = 3:4.
The number of students who like watching only one of the three given games = (9% + 12% + 20%) of 500
= 205
The number of students who like watching at least two of the given games=(number of students who like
watching only two of the games) +(number of students who like watching all the three games)= (12 + 13 +
14 + 15)% i.e. 54% of 500 = 270.