1.1 Introduction to Setfunction and Relation
1.1 Introduction to Setfunction and Relation
TOC Introduction:
What is TOC?
The theory of computation is the branch that deals with whether and how efficiently problems can be
solved on a model of computation, using an algorithm.
A set is a well-defined collection of distinct objects (elements). These elements can be anything:
numbers, symbols, or even other sets.
For example, the collection of the four letters a, b, c, and d is a
set, name L
The objects comprising / consists of a set are called its elements or members.
Notation:
For V:
V={x∣x is a vowel in the English alphabet}
This defines V as the set of all x where x is a vowel.
For an element that belongs to a set:
Example: b is an element of the set L, which we write as: b∈L
This means L contains b.
For an element that does not belong to a set:
Example: z is not an element of the set L, which we write as: z∉L
This means L does not contain z.
Important Properties:
- Elements are unique. A = {1, 2, 2} simplifies to A = {1, 2}.
- Order does not matter. {1, 2} = {2, 1}.
Characteristics:
- Also called a unit set.
- The cardinality of a singleton set is 1.
Example: S = {a}.
= {1} .
4.. Empty set: A set that contains no elements. It is also called a null set.
Denoted by the symbol { } or Ø.
Any set other than the empty set is said to be nonempty
Example: A = {x: x is a male student in a girl's campus}
(a) Subset: A set A is said to be the subset of B if all elements of A belong to B. It is written as
A ⊆ B. For example,
A = { x : x is a letter in the English alphabet }
B = { x : x is a vowel }
Thus, B is a subset of A. B ⊆ A.
(b) Equal sets: Two sets A and B are said to be equal sets if they have the same elements in
any order. For example,
A = { a, e, i, o, u }
B = { a, i, e, o, u }
Then A = B.
(c) Intersecting sets: Two sets A and B are intersecting sets if they have at least one element
in common.
A = { a, e, i, o, u }
B = { a, b, c, d, e }
(d) Disjoint sets: Two sets A and B are disjoint if they have no element in common.
A = { a, b, c }
B = { y, z }
(e) Equivalent sets: Two sets A and B are said to be equivalent if they have the same number
of elements.
A = { 0, 1, 2 }
B = { a, b, c, d }
Here, n(A) = n(B).
(f) Power set: The power set is the set of any possible subset of any set.
A; i.e., a set containing ‘n’ elements has a powerset containing 2n elements.
For example,
A = { 0, 1 }
Then, power set of A: P(A) = 2^A = 2^2 = { {}, { 0 }, { 1 }, { 0, 1 } }.
(a) Universal set: A fixed state is a universal set if it contains all the subjects under discussion. For
example,
For the sets of people of different countries, the set of people in the world is universal set.
(c) Countably infinite set: A set is said to be countably infinite set if its elements can be put one-
one correspondence with the set of natural numbers.
For example,
Z = { x : x is a element of integers }
= { -3, -2, -1, 0, 1, 2, 3, ... }
Here, we can't never count the cardinality of sets but if we arrange elements in such a way that
Z = { 0, -1, 2, -2, 2, -3, 3, ... }
And then if we are asked to count number of elements up to -3, we can do that. So, the set of
integers is the countably infinite set.
a) Union: Union of two sets A and B is the set of all elements belonging to at least one of
the two sets or both. It is denoted by A ∪ B.
A ∪ B = { x : x ∈ A or x ∈ B }
b) Intersection: Intersection of two sets A and B is the set of all elements belonging to
both of the sets. It is denoted by A ∩ B.
A ∩ B = { x : x ∈ A and x ∈ B }
c) Difference: The difference of two sets A and B denoted by A - B is the set of all
elements of A that aren’t elements of B.
A - B = { x : x ∈ A and x ∉ B }
d) Symmetric difference: Symmetric difference of two sets A and B is the set of all
elements which are in either of the sets and not in their intersection. The symmetric
difference is denoted by
A Δ B = (A - B) ∪ (B - A)
e) Complement:The “complement” of set A, written as A is the set containing everything
that is not in A.
Identity Laws:
A ∪ ∅ = A, A ∩ U = A, A ∩ ∅ = ∅.
Additional Terminology
Order pair: An ordered pair is a pair formed by two elements that are separated by a
comma and written inside the parantheses. For example, (x, y) represents an ordered pair,
where 'x' is called the first element and 'y' is called the second element of the ordered pair.
Cartesian Product of sets A and B is defined as the set of all ordered pairs (x, y) such
that x belongs to A and y belongs to B. It is denoted by as A × B (read “A cross B”).
i.e A x B = { (x, y) : x є A and y є B }
For example,
if A = {1, 2} and B = {3, 4, 5},
then the Cartesian Product of A and B is {(1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5)}.
Types of relation
Identity relation:
In an identity relation "R", every element of the set “A” is related to itself only. Note the conditions
conveyed through words “every” and “only”. The word “every” conveys that identity relation consists of
ordered pairs of element with itself - all of them. The word “only” conveys that this relation does not
consist of any other combination.
Consider a set A={1,2,3} Then, its identity relation is: R={(1,1), (2,2),(3,3)}
Reflexive relation: In reflexive relation, "R", every element of the set “A” is related to itself. The
definition of reflexive relation is exactly same as that of identity relation except that it misses the word
“only” in the end of the sentence
i.e. A relation R ⊆ A x A is reflexive if (a, a) ∈ R for each a ∈ A. The directed graph
representing a reflexive relation has a loop from each node to itself.
Consider a set
Let, A={1,2,3} Then, one of the possible reflexive relations can be:
But we can say R= { (1, 1), (2, 2) , (3, 3) } is a reflexive relation defined on set A
Symmetric
A relation R ⊆ A x A is symmetric if (b, a) ∈ R whenever (a, b) ∈ R.
Let A= { 1, 2, 3}
then R= { (1, 2), (2, 1) , (2, 3) , (3, 2) } is a Symmetric relation defined on set A
The symbol “Iff” means “If and only if”. Here one directional arrow means “implies”.
Alternatively, the condition of symmetric relation can be stated as: xRy⇒yRx for all x,y∈A
It means that if (1,3) is an instance, then (3,1) is also an instance in the relation. Clearly, an ordered pair
of element with itself like (1,1) or (2,2) is themselves their mirror images.
Transitive relation:
A binary relation R is transitive if whenever (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R. The
relation {(a, b) : a, b ∈ P and a is an ancestor of b} is transitive, since if a is an ancestor of band
b is an ancestor of c, then a is an ancestor of c. So is the less-than-or-equal relation
Let A= { 1, 2, 3}
then R= { (1, 2), (2, 3) , (1, 3) } is a transitive relation defined on set A
If “R” be the relation on set A, then we state the condition of transitive relation as: Iff(x,y)∈R
and (y,z)∈R⇒(x,z)∈R for all a,b,c∈A
Alternatively, xRy and yRz⇒xRz for all x,y,z∈A
Equivalence relation:
A relation is equivalence relation if it is reflexive, symmetric and transitive at the same time. In
order to check whether a relation is equivalent or not, we need to check all three
characterizations.
3. Functions :A function is a special type of relation where each element of the domain is related
to exactly one element of the codomain. Example: A = {1, 2, 3}, B = {x, y, z}, f = {(1, x), (2, y), (3, z)}.
Suppose every element of S occurs exactly once as the first element of an ordered pair. In Fig
shown, every element of S has exactly one arrow arising from it. This kind of relation is called a
“function”.
A function is otherwise known as “Mapping”. A function is said to map an element in its domain
to an element in its range. Every element in S in the domain, i.e., every element of S is mapped
to some element in the range. No element in the domain maps to more than one element in the
range.
Functions as relations
A function f :AB is a relation from A to B i.e., a subset of A x B, such that each a є A belongs
to a unique ordered pair (a, b) in f.
Kinds of Functions
(a) One-to-One Function (Injection): A function f : AB is said to be one-to-one if different
elements in the domain A have distinct images in the range.
(b) Onto function (Surjection): A function f : AB is said to be an onto function if each element
of B is the image of some element of A. i.e., f :AB is onto if the image of f is the entire
codomain, i.e. if f (A) = B. i.e., f maps A onto B.