0% found this document useful (0 votes)
25 views32 pages

Sets

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views32 pages

Sets

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

AUTOMATA THEORY AND FORMAL LANGUAGES

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”

NOTE: * Order of elements is insignificant


* It does not matter how often the same element is listed (repetition doesn’t count).
METHOD OF SET NOTATION:
1. ROSTER / TABULAR / LIST METHOD
- the set is represented by actually listing the elements
which belong to it.
- separated by comma (,) and enclosed between pair of
curly brackets { }.

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:

A is a set of first four alphabets.

B = { x | x is an even natural number and x < 10 }


TYPES OF SETS
1. Finite Set - a set whose elements are countable.
Example:
A = { a, e, i, o, u}
A = { x|x is an odd positive number less than 10}

2. Infinite Set - a set whose elements are not


countable.
Example:
The set of natural number N = {0, 1, 2, 3, 4, 5, ... }
TYPES OF SETS
3. Empty Set - a set having no element. Its also called
as null set or void set. It is denoted by ø or
{}.
4. Unit Set - a set containing only one element. It is also
called a singleton.
Example: {0} , {a}.
5. Subset (⊂)- If each element of the set A is also an
element of set B.
Example: A = {2,4,6} B={6,4,8,2} A⊂B
List all the possible subsets of A
A = {s,e,r}
1.{s,e,r} 2. {s} 3. {i} 4. {r} 5. {s,i} 6. {s,r} 7. {I,r} 8. { }
Number of subsets formula
2n, where n is the number of elements
n(A) = 3

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}

List the number of proper subset of set A


A = {s,e,r}
1.{s} 2. {i} 3. {r} 4. {s,i} 5. {s,r} 6. {I,r} 7. { }
How many proper subsets does set A have?
Formula = 2n – 1, n is the number of elements
n(A)=3 23 -1 = 8-1 = 7 proper subsets
TYPES OF SETS
7. Family Set - class of sets or the set of sets
Example: A = {0 , {a}, {a, b}}
TYPES OF SETS
8. Power Set - the set of all subsets of a given set. It is
denoted by P(A) where number of subsets equal to
2|A|.
Example: B = { 1, 2, 3 }
P(B) = { {}, {1}, {2}, {3}, {1, 2},
{1, 3}, {2, 3}, {1, 2, 3} }

9. Universal Set (U) – a set which contains all


objects, including itself.
TYPES OF SETS
10. Complement
The “complement” of set A, written as “A is the set
containing everything that is not in A.”

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 }

Sets A, B and C are all equal sets


Sets A, B and D are equivalent sets

3 . Disjoint Set - the two sets having no common elements.


Disjoint sets:

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) }

Example: A = {1, 3, 9} , B = {3, 5}


Therefore, A ∪ B = {_____________}
SET OPERATIONS
Example: A = {1, 3, 9} , B = {3, 5}
Therefore, A ∪ B = {_____________}
SET OPERATIONS
INTERSECTION
The “intersection” of sets A and B, written A∩B, is a set that
contains exactly those elements that are in both A and 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}

Example: A = {1,3,9}, B = {3,5}

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?

Solution: The given information may be represented by the following Venn


diagram, where T = tea and C = coffee.

Number of students who like only tea = 60


Number of students who like only coffee = 40
Number of students who like neither tea nor coffee = 20
Number of students who like only one of tea or coffee = 60 + 40 = 100
Number of students who like at least one of tea or coffee = n (only Tea) + n (only coffee) + n (both Tea &
coffee) = 60 + 40 + 80 = 180
Venn Diagram
Example 2:
Suppose that in a town, 800 people are selected by random types of
sampling methods. 280 go to work by car only, 220 go to work by bicycle
only and 140 use both ways – sometimes go with a car and sometimes with
a bicycle.

Here are some important questions we will find the answers:

How many people go to work by car only?


How many people go to work by bicycle only?
How many people go by neither car nor bicycle?
How many people use at least one of both transportation types? •Number of people who go to work by car only = 280
•Number of people who go to work by bicycle only = 220
How many people use only one of car or bicycle? •Number of people who go by neither car nor bicycle = 160
•Number of people who use at least one of both transportation types = n(only car) + n(only bicycle) +
n(both car and bicycle) = 280 + 220 + 140 = 640
•Number of people who use only one of car or bicycle = 280 + 220 = 500
Note: The number of people who go by neither car nor bicycle (160) is illustrated outside of the circles.
It is a common practice the number of items that belong to none of the studied sets, to be illustrated
outside of the diagram circles.
In a survey of 500 students of a college, it was found that 49%
Venn Diagram liked watching football, 53% liked watching hockey and 62%
liked watching basketball. Also, 27% liked watching football and
hockey both, 29% liked watching basketball and hockey both

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.

You might also like