0% found this document useful (0 votes)
2 views

DM UNIT - II

Set theory is a foundational branch of mathematics that studies collections of objects called sets, which can be finite, infinite, empty, or universal. It includes various representations such as roster form, set-builder notation, and Venn diagrams, and covers operations like union, intersection, and Cartesian products. Applications of set theory span fields like database management, logic, and artificial intelligence.
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)
2 views

DM UNIT - II

Set theory is a foundational branch of mathematics that studies collections of objects called sets, which can be finite, infinite, empty, or universal. It includes various representations such as roster form, set-builder notation, and Venn diagrams, and covers operations like union, intersection, and Cartesian products. Applications of set theory span fields like database management, logic, and artificial intelligence.
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/ 30

UNIT - II Set theory: Introduction, Basic Concepts of Set Theory, Representation of

Discrete Structures, Relations and Ordering, Functions.

Set Theory in Discrete Mathematics:

Set theory is a fundamental branch of mathematics that studies collections of objects, called
sets. It provides the foundation for various mathematical disciplines, including logic, algebra,
and probability.

Definition of a Set:

A set is a well-defined collection of distinct objects, called elements or members of the set.
Sets are usually denoted by capital letters (e.g., A, B, C), and elements are enclosed in curly
brackets { }.

Examples of Sets:

1. Finite Set: A set with a limited number of elements.


o Example: A={1,2,3,4,5}
2. Infinite Set: A set with infinitely many elements.
o Example: B= {1,2,3,4,… }(set of natural numbers)
3. Empty Set (Null Set): A set with no elements, denoted as ∅ or { }.
o Example: C={x∣x2=−1,x is a real number} (no real number satisfies this
condition)
4. Universal Set: The set that contains all possible elements under discussion, usually
denoted by U.
o Example: If we discuss the set of even numbers, U could be the set of all
integers.

Applications of Set Theory:

 Database Management (SQL operations)


 Logic and Computability
 Probability Theory
 Artificial Intelligence and Machine Learning

Representation of Sets:

A set can be represented in various ways depending on how its elements are defined or listed.
Below are the primary methods of representing sets:

1. Roster or Tabular Form:

In this method, all the elements of a set are explicitly listed, separated by commas, and
enclosed in curly braces { }.

Example:

 A={2,4,6,8,10} (Set of first five even numbers)


 B={a,e,i,o,u} (Set of vowels in the English alphabet)
 C={1,3,5,7,9,11,… }(Set of odd natural numbers)

🔹 Pros: Easy to read and understand.


🔹 Cons: Not useful for large or infinite sets.

2. Set-Builder Notation:

Instead of listing all elements, a property or condition is used to define the set. It is written in
the form:

A={x ∣ condition on x}

Example:

 A={x ∣ x is an even number less than 12}


 B={x ∣ x is a natural number, x<10}
 C={x ∣ x2≤25,x∈Z}={−5,−4,−3,−2,−1,0,1,2,3,4,5}

🔹 Pros: Useful for large or infinite sets.


🔹 Cons: Requires understanding of mathematical notation.

3. Venn Diagram Representation

A Venn diagram is a graphical representation of sets using circles within a universal set. It
helps visualize relationships like union, intersection, and complement.

Example:

 A set of students who like math and a set of students who like science can be
represented using overlapping circles.
 The overlap represents students who like both subjects.

📌 Use case: Used in logic, probability, and data analysis.

4. Interval Notation (For Number Sets)

Used mainly for representing continuous sets of numbers, such as real number intervals.

Notation Meaning Example


(a,b) Open interval (excluding a and b) (2,6)={x∣2<x<6}
[a,b] Closed interval (including a and b) [1,5]={x∣1≤x≤5}
(a,b] Half-open interval (excluding a, including b) (3,7]={x∣3<x≤7}
(−∞,a) All values less than a (−∞,4)={x∣x<4}
🔹 Pros: Useful for real number sets.
🔹 Cons: Not suitable for discrete sets.

Types of Sets in Discrete Mathematics:

A set is a well-defined collection of distinct objects. Different types of sets exist based on
their properties.

1. Finite Set:

A set with a limited number of elements.

✅ Example:

 A={1,2,3,4,5} (Set of five numbers)


 B={a,e,i,o,u} (Set of vowels)

2. Infinite Set:

A set with an unlimited number of elements.

✅ Example:

 A={1,2,3,4,… } (Set of natural numbers)


 B={x∣x is a prime number}

3. Empty Set (Null Set or Void Set):

A set that contains no elements, denoted by ∅ or { }.

✅ Example:

 A={x∣x2=−1,x is a real number} (No real number satisfies this condition)

4. Singleton Set:

A set that contains exactly one element.

✅ Example:

 A={7}
 B={Apple}

5. Equal Sets:

Two sets are equal if they have the same elements. Order does not matter.
✅ Example:

 A={1,2,3} and B={3,2,1}


 Since they contain the same elements, A=B.

6. Equivalent Sets:

Two sets are equivalent if they have the same number of elements (cardinality).

✅ Example:

 A={a,b,c}
 B={1,2,3}
 Since both have three elements, A∼B.

7. Subset:

A set A is a subset of set B if every element of A is also in B.


It is denoted as A⊆B.

✅ Example:

 A={1,2,3} B={1,2,3,4,5}
 Since all elements of A are in B, A⊆B.

📌 Proper Subset: If A is a subset of B and A≠B, then A is a proper subset of B, denoted as


A⊂B.

8. Power Set

The power set of a set A is the set of all subsets of A, including the empty set and A itself. It
is denoted as P(A).

✅ Example:
If A={1,2} then P(A)={∅,{1},{2},{1,2}}

📌 If a set has n elements, its power set contains 2n subsets.

9. Universal Set

The universal set (U) is the set that contains all elements under discussion.

✅ Example:

 If we are discussing numbers, U could be the set of all real numbers.


 If we are discussing letters, U could be the English alphabet.
10. Complement of a Set

The complement of a set A (AC) is the set of elements that are in the universal set but not in
A.

✅ Example:
If U={1,2,3,4,5} and A={1,2}, then AC={3,4,5}

11. Disjoint Sets

Two sets are disjoint if they have no common elements.

✅ Example:

 A={1,2,3} B={4,5,6}
 Since A∩B=∅ , A and B are disjoint.

12. Overlapping Sets

Two sets are overlapping if they have at least one common element.

✅ Example:

 A={1,2,3}, B={3,4,5}
 Since A∩B={3}, A and B overlap.

13. Cartesian Product of Sets

The Cartesian product of two sets A and B is the set of all ordered pairs (a,b), where a∈A
and b∈B. It is denoted as A×B.

✅ Example:
If A={1,2} and B={a,b}, then:

A×B={(1,a),(1,b),(2,a),(2,b)}
Set operations:

Set operations are the basic ways we combine or modify sets. Here are the primary set
operations with examples:

1. Union ( ∪ )

The union of two sets A and B, denoted A∪B, is the set of all elements that are in A, in B, or
in both.

Example:

Let:

 A={1,2,3}
 B={2,3,4}

Then the union A∪B is:

A∪B={1,2,3,4}

Explanation: The union includes all distinct elements from both sets A and B.

2. Intersection ( ∩ )

The intersection of two sets A and B, denoted A∩B, is the set of all elements that are
common to both sets.

Example:

Let:

 A={1,2,3}
 B={2,3,4}

Then the intersection A∩B is:

A∩B={2,3}

Explanation: The intersection includes only the elements that are present in both sets, i.e., 2
and 3.

3. Difference ( − )

The difference of two sets A and B, denoted A−B, is the set of elements that are in A but not
in B.
Example:

Let:

 A={1,2,3}
 B={2,3,4}

Then the difference A−B is: A−B = {1}

Explanation: The set A−B contains only the elements that are in A but not in B. In this case, 1
is the only element in A but not in B.

4. Complement ( ′ )

The complement of a set A, denoted A′, is the set of all elements in the universal set U that
are not in A. The universal set U is typically defined in the context of the problem.

Example:

Let the universal set U={1,2,3,4,5} , and A={1,2,3}.

Then the complement A′ is: A′ = {4,5}

Explanation: The complement of A consists of the elements in the universal set U that are not
in A. So, the complement of A={1,2,3} is {4,5}, which are the remaining elements in U.

5. Symmetric Difference ( △ )

The symmetric difference of two sets A and B, denoted AΔB, is the set of elements that are
in either A or B, but not both. It is the union of the differences (A−B) ∪ (B−A).

Example:

Let:

 A={1,2,3}
 B={2,3,4}

Then the symmetric difference AΔB is:

AΔB={1,4}

Explanation: The symmetric difference includes elements that are only in one of the sets, but
not in both. So, 1 is in A but not in B, and 4 is in B but not in A.
6. Cartesian Product ( × )

The Cartesian product of two sets A and B, denoted A×B, is the set of all ordered pairs
where the first element is from A and the second element is from B.

Example:

Let:

 A={1,2}
 B={a,b}

Then the Cartesian product A×B is: A×B = {(1,a),(1,b),(2,a),(2,b)}

Explanation: The Cartesian product consists of all possible ordered pairs where the first
element comes from A and the second from B.

7. Power Set ( P )

The power set of a set A, denoted P(A), is the set of all subsets of A, including the empty set
and A itself.

Example:

Let:

 A={1,2}

Then the power set P(A) is: P(A)={∅,{1},{2},{1,2}}

Explanation: The power set includes all possible subsets of A, including the empty set, the
individual elements, and the set A itself.
Example:
 A={1,2,3,4,5,7,9,11,15}
 B={5,7,9,11}

1. Union ( A∪B )

A∪B={1,2,3,4,5,7,9,11,15}∪{5,7,9,11}
A∪B={1,2,3,4,5,7,9,11,15}

Explanation: All elements from both sets, no duplicates.

2. Intersection (A∩B )

A∩B={1,2,3,4,5,7,9,11,15}∩{5,7,9,11}
A∩B={5,7,9,11}

Explanation: The elements that are common to both A and B are 5,7,9,11.

3. Difference (A−B)

A−B={1,2,3,4,5,7,9,11,15}−{5,7,9,11}
A−B={1,2,3,4,15}

Explanation: The elements in A that are not in B are 1,2,3,4,15.

4. Difference (B−A)

The difference B−A contains elements that are in B but not in A.

B−A={5,7,9,11}−{1,2,3,4,5,7,9,11,15}
B−A=∅

Explanation: All elements of B are already in A, so the difference is the empty set.

5. Complement (A′)

The complement A′ contains all elements that are in the universal set U but not in A. To find
A′, we need to define the universal set.

Let's assume U={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}, based on the elements in A and B.

A={1,2,3,4,5,7,9,11,15}
A′=U−A={6,8,10,12,13,14}

Explanation: The complement of A is the set of elements in U that are not in A.


6. Symmetric Difference (AΔB)

AΔB=(A−B)∪(B−A)

From the previous calculations:

 A−B={1,2,3,4,15}
 B−A=∅

Thus:

AΔB={1,2,3,4,15}

Explanation: The symmetric difference includes elements unique to each set.

7. Cartesian Product (A×B)

A={1,2,3,4,5,7,9,11,15}
B={5,7,9,11}
A×B={(1,5),(1,7),(1,9),(1,11),(2,5),(2,7),(2,9),(2,11),(3,5),(3,7),(3,9),(3,11),(4,5),(4,7),(4,9),(
4,11),(5,5),(5,7),(5,9),(5,11),(7,5),(7,7),(7,9),(7,11),(9,5),(9,7),(9,9),(9,11),(11,5),(11,7),(11,9)
,(11,11),(15,5),(15,7),(15,9),(15,11)}

Explanation: Every element of A is paired with every element of B, forming ordered pairs.

8. Cardinality of A−B (n(A−B))

The cardinality of A−B is simply the number of elements in the set A−B.

A−B={1,2,3,4,15}
n(A−B)=5

Explanation: There are 5 elements in A−B.

9. Cardinality of B−A (n(B−A))

The cardinality of B−A is the number of elements in the set B−A.

B−A=∅
n(B−A)=0

Explanation: Since B−A is the empty set, its cardinality is 0.

10. Cartesian Product (B×A)

B={5,7,9,11}
A={1,2,3,4,5,7,9,11,15}
B×A={(5,1),(5,2),(5,3),(5,4),(5,5),(5,7),(5,9),(5,11),(5,15),(7,1),(7,2),(7,3),(7,4),(7,5),(7,7),(7,
9),(7,11),(7,15),(9,1),(9,2),(9,3),(9,4),(9,5),(9,7),(9,9),(9,11),(9,15),(11,1),(11,2),(11,3),(11,4),
(11,5),(11,7),(11,9),(11,11),(11,15)}

Explanation: This is the reverse of the Cartesian product A×B, where each element of B is
paired with every element of A.
Relation or Binary relation:

In discrete mathematics, a relation or binary relation is a way to describe a relationship


between elements of two sets. A binary relation on two sets A and B is simply a subset of the
Cartesian product A×B. Each element of the relation is an ordered pair (a,b), where a∈A and
b∈B, and this represents the fact that a is related to b in some way.

Definition of a Binary Relation:

A binary relation R from set A to set B is a subset of A×B, i.e., R⊆A×B

This means R consists of a collection of ordered pairs (a,b), where a∈A and b∈B. If an
ordered pair (a,b) is in the relation R, we say "a is related to b" or "a is in relation with b."

Example:

Let’s consider two sets:

A={1,2,3},B={a,b,c}

A binary relation R from A to B can be a subset of A×B. For example, let R be:

R={(1,a),(2,b),(3,c)}

This relation means:

 1 is related to a,
 2 is related to b,
 3 is related to c.

In discrete mathematics, relations (or binary relations) can have various properties that help
in classifying and understanding the relationship between elements of sets. These properties
are important in the study of equivalence relations, partial orders, and other structures.

Properties of Relations (Binary Relations)

1. Reflexive Relation
o A relation R on a set A is reflexive if every element in A is related to itself.
o Formally, for all a∈A, (a,a)∈R.
o Example: The relation "is equal to" = on integers is reflexive, because for any
integer n, n=n.

Diagram: If A={1,2,3}, then R={(1,1),(2,2),(3,3)}.

2. Symmetric Relation
o A relation R on a set A is symmetric if whenever an element a is related to an
element b, then b is also related to a.
o Formally, if (a,b)∈R, then (b,a)∈R
o Example: The relation "is married to" is symmetric because if a is married to
b, then b is married to a.

Diagram: If A={1,2} then R={(1,2),(2,1)} is symmetric.

3. Antisymmetric Relation
o A relation R on a set A is antisymmetric if whenever both (a,b)∈R and
(b,a)∈R, it must follow that a=b.
o Formally, if (a,b)∈R and (b,a)∈R, then a=b.
o Example: The relation "is less than or equal to" on integers is antisymmetric
because if a≤b and b≤a, then a=b.

Diagram: If A={1,2,3}, then R={(1,2),(2,3)} is antisymmetric because no element


has the reverse pair unless they are the same.

4. Transitive Relation
o A relation R on a set A is transitive if whenever a is related to b and b is
related to c, then a must be related to c.
o Formally, if (a,b)∈R and (b,c)∈R, then (a,c)∈R.
o Example: The relation "is greater than or equal to" on real numbers is
transitive, because if a≥b and b≥c, then a≥c.

Diagram: If A={1,2,3}, then R={(1,2),(2,3),(1,3)} is transitive.

Irreflexive Relation

An irreflexive relation (also called anti-reflexive) is a type of binary relation where no


element in the set is related to itself. In other words, for all a∈A, the pair (a,a) is not in the
relation.

Definition:

A relation R on a set A is irreflexive if for every a∈A, (a,a)∉R.

This means no element in A is related to itself.

Example:

Consider the set A={1,2,3} and the relation R on A defined as:

R={(1,2),(2,3)}.

In this case:

 (1,1)∉R
 (2,2)∉R
 (3,3)∉R

Thus, the relation R is irreflexive because no element in A is related to itself.


Asymmetric Relation

An asymmetric relation is a type of binary relation where, if one element is related to


another, the reverse is never true. In other words, if (a,b)∈R, then (b,a)∉R.

Definition:

A relation R on a set A is asymmetric if, for all a,b∈A:

If (a,b)∈R, then (b,a)∉R.

Example:

Let’s consider the relation R on the set A={1,2,3} defined as:

R={(1,2),(2,3)}.

 For (1,2)∈R, we cannot have (2,1)∈R, so the relation is asymmetric.


 Similarly, (2,3)∈R does not allow (3,2)∈R.

Thus, this relation R is asymmetric because if (a,b)∈R, there is never a corresponding


(b,a)∈R.

Key Differences between Asymmetric, Antisymmetric, and Irreflexive


Relations:

 Asymmetric Relation: If (a,b)∈R, then (b,a)∉R for all a≠b.


 Antisymmetric Relation: If (a,b)∈R and (b,a)∈R, then a=b. This means
antisymmetric allows for (a,a), but asymmetric never allows (a,b) and (b,a) at the
same time for any a≠b.
 Irreflexive Relation: No element is related to itself, i.e., (a,a)∉R for all a∈A.

Combination of Properties

Some relations can have combinations of these properties, and when they do, they are often
given specific names:

1. Equivalence Relation
o A relation R on a set A is an equivalence relation if it is:
 Reflexive: For all a∈A, (a,a)∈R.
 Symmetric: If (a,b)∈R, then (b,a)∈R.
 Transitive: If (a,b)∈R and (b,c)∈R, then (a,c)∈R.
o Example: The relation "is congruent to" modulo n is an equivalence relation
because it satisfies reflexivity, symmetry, and transitivity.

Diagram: For set A={1,2,3,4}, the relation


R={(1,1),(2,2),(3,3),(4,4),(1,2),(2,1),(3,4),(4,3)} is an equivalence relation.
2. Partial Order
o A relation R on a set A is a partial order if it is:
 Reflexive: For all a∈A, (a,a)∈R.
 Antisymmetric: If (a,b)∈R and (b,a)∈R, then a=b.
 Transitive: If (a,b)∈R and (b,c)∈R, then (a,c)∈R.
o Example: The relation "is less than or equal to" on integers is a partial order.

Diagram: For A={1,2,3}, the relation R={(1,1),(2,2),(3,3),(1,2),(2,3)} is a partial


order.

3. Total Order
o A total order is a partial order where every pair of elements is comparable.
In other words, for every a,b∈A, either (a,b)∈R or (b,a)∈R.
o Example: The relation "is less than or equal to" on real numbers is a total
order because for any two real numbers, one is always less than or equal to the
other.

Diagram: For A={1,2,3}, the relation R={(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)} is a total


order.

Elements of POSET:

1. Maximal Element: An element a ∈ A is called a maximal element of A if there is no


element in c in A such that a ≤ c.
2. Minimal Element: An element b ∈ A is called a minimal element of A if there is no
element in c in A such that c ≤ b.

Note: There can be more than one maximal or more than one minimal element.
Example: Determine all the maximal and minimal elements of the poset whose Hasse diagram
is shown in fig:

Solution:

The maximal elements are b and f.

The minimal elements are d and e.


Example: Consider A = {1, 2, 3, 5, 6, 10, 15, 30} is ordered by divisibility. Determine all the
comparable and non-comparable pairs of elements of A.

Solution: The comparable pairs of elements of A are:


{1, 2}, {1, 3}, {1, 5}, {1, 6}, {1, 10}, {1, 15}, {1, 30}
{2, 6}, {2, 10}, {2, 30}
{3, 6}, {3, 15}, {3, 30}
{5, 10}, {5, 15}, {5, 30}
{6, 30}, {10, 30}, {15, 30}

The non-comparable pair of elements of A are:


{2, 3}, {2, 5}, {2, 15}
{3, 5}, {3, 10}, {5, 6}, {6, 10}, {6, 15}, {10, 15}

Linearly Ordered Set:


Consider an ordered set A. The set A is called linearly ordered set or totally ordered set, if
every pair of elements in A is comparable.

Example: The set of positive integers I+ with the usual order ≤ is a linearly ordered set.

Hasse Diagrams
It is a useful tool, which completely describes the associated partial order. Therefore, it is also
called an ordering diagram. It is very easy to convert a directed graph of a relation on a set A
to an equivalent Hasse diagram. Therefore, while drawing a Hasse diagram following points
must be remembered.

1. The vertices in the Hasse diagram are denoted by points rather than by circles.
2. Since a partial order is reflexive, hence each vertex of A must be related to itself, so the
edges from a vertex to itself are deleted in Hasse diagram.
3. Since a partial order is transitive, hence whenever aRb, bRc, we have aRc. Eliminate
all edges that are implied by the transitive property in Hasse diagram, i.e., Delete edge
from a to c but retain the other two edges.
4. If a vertex 'a' is connected to vertex 'b' by an edge, i.e., aRb, then the vertex 'b' appears
above vertex 'a'. Therefore, the arrow may be omitted from the edges in the Hasse
diagram.

The Hasse diagram is much simpler than the directed graph of the partial order.

Example: Consider the set A = {4, 5, 6, 7}. Let R be the relation ≤ on A. Draw the directed
graph and the Hasse diagram of R.

Solution: The relation ≤ on the set A is given by

R = {{4, 5}, {4, 6}, {4, 7}, {5, 6}, {5, 7}, {6, 7}, {4, 4}, {5, 5}, {6, 6}, {7, 7}}

The directed graph of the relation R is as shown in fig:


To draw the Hasse diagram of partial order, apply the following points:

1. Delete all edges implied by reflexive property i.e.


(4, 4), (5, 5), (6, 6), (7, 7)
2. Delete all edges implied by transitive property i.e.
(4, 7), (5, 7), (4, 6)
3. Replace the circles representing the vertices by dots.
4. Omit the arrows.

The Hasse diagram is as shown in fig:

Upper Bound: Consider B be a subset of a partially ordered set A. An element x ∈ A is called


an upper bound of B if y ≤ x for every y ∈ B.

Lower Bound: Consider B be a subset of a partially ordered set A. An element z ∈ A is called


a lower bound of B if z ≤ x for every x ∈ B.

Example: Consider the poset A = {a, b, c, d, e, f, g} be ordered shown in fig. Also let B = {c,
d, e}. Determine the upper and lower bound of B.

Solution: The upper bound of B is e, f, and g because every element of B is '≤' e, f, and g.
The lower bounds of B are a and b because a and b are '≤' every elements of B.

Least Upper Bound (SUPREMUM):


Let A be a subset of a partially ordered set S. An element M in S is called an upper bound of
A if M succeeds every element of A, i.e. if, for every x in A, we have x <=M

If an upper bound of A precedes every other upper bound of A, then it is called the supremum
of A and is denoted by Sup (A)

Greatest Lower Bound (INFIMUM):


An element m in a poset S is called a lower bound of a subset A of S if m precedes every
element of A, i.e. if, for every y in A, we have m <=y

If a lower bound of A succeeds every other lower bound of A, then it is called the infimum of
A and is denoted by Inf (A)

Example: Determine the least upper bound and greatest lower bound of B = {a, b, c} if they
exist, of the poset whose Hasse diagram is shown in fig:

Solution: The least upper bound is c.

The greatest lower bound is k.


Functions
It is a mapping in which every element of set A is uniquely associated at the element with set
B. The set of A is called Domain of a function and set of B is called Co domain.

Domain, Co-Domain, and Range of a Function:


Domain of a Function: Let f be a function from A to B. The set A is called the domain of the
function f.

Co-Domain of a Function: Let f be a function from A to B. The set B is called Co-domain of


the function f.

Range of a Function: The range of a function is the set of picture of its domain. In other words,
we can say it is a subset of its co-domain. It is denoted as f (domain).

1. If f: A → B, then f (A) = {f(x): x ∈ A} = {y: y ∈ B | ∃ x ∈ A, such that f (x) = y}.


Example: Find the Domain, Co-Domain, and Range of function.

1. Let x = {1, 2, 3, 4} y = {a, b, c, d, e} f = {(1, b), (2, a), (3, d), (4, c)

Solution:

Domain of function: {1, 2, 3, 4}


Range of function: {a, b, c, d}
Co-Domain of function: {a, b, c, d, e}
Representation of a Function
The two sets A and B are represented by two circles. The function f: A → B is represented by
a collection of arrows joining the points which represent the elements of A and corresponds
elements of B

Example1:

1. Let X = {a, b, c} and Y = {x, y, z} and f: X → Y such that f= {(a, x), (b, z), (c, x)}
Then f can be represented diagrammatically as follows

Types of Functions
1. Injective (One-to-One) Functions: A function in which one element of Domain Set is
connected to one element of Co-Domain Set.

2. Surjective (Onto) Functions: A function in which every element of Co-Domain Set has
one pre-image.

Example: Consider, A = {1, 2, 3, 4}, B = {a, b, c} and f = {(1, b), (2, a), (3, c), (4, c)}.

It is a Surjective Function, as every element of B is the image of some A


Note: In an Onto Function, Range is equal to Co-Domain.
3. Bijective (One-to-One Onto) Functions: A function which is both injective (one to - one)
and surjective (onto) is called bijective (One-to-One Onto) Function.

Example:

Consider P = {x, y, z} Q = {a, b, c} and f: P → Q such that


f = {(x, a), (y, b), (z, c)}
The f is a one-to-one function and also it is onto. So it is a bijective function.

4. Into Functions: A function in which there must be an element of co-domain Y does not
have a pre-image in domain X.

Example:

Consider, A = {a, b, c} B = {1, 2, 3, 4} and f: A → B such that


f = {(a, 1), (b, 2), (c, 3)}
In the function f, the range i.e., {1, 2, 3} ≠ co-domain of Y i.e., {1, 2, 3, 4}
Therefore, it is an into function

5. One-One Into Functions: Let f: X → Y. The function f is called one-one into function if
different elements of X have different unique images of Y.
Example:

Consider, X = {k, l, m} Y = {1, 2, 3, 4} and f: X → Y such that


f = {(k, 1), (l, 3), (m, 4)}
The function f is a one-one into function

6. Many-One Functions: Let f: X → Y. The function f is said to be many-one functions if


there exist two or more than two different elements in X having the same image in Y.

Example:

Consider X = {1, 2, 3, 4, 5} Y = {x, y, z} and f: X → Y such that


f = {(1, x), (2, x), (3, x), (4, y), (5, z)}
The function f is a many-one function

7. Many-One Into Functions: Let f: X → Y. The function f is called the many-one function
if and only if is both many one and into function.

Example:

Consider X = {a, b, c} Y = {1, 2} and f: X → Y such that


f = {(a, 1), (b, 1), (c, 1)}
As the function f is a many-one and into, so it is a many-one into function.
8. Many-One Onto Functions: Let f: X → Y. The function f is called many-one onto function
if and only if is both many one and onto.

Example:

Consider X = {1, 2, 3, 4} Y = {k, l} and f: X → Y such that


f = {(1, k), (2, k), (3, l), (4, l)}
The function f is a many-one (as the two elements have the same image in Y) and it is onto (as
every element of Y is the image of some element X). So, it is many-one onto function

Identity Functions
The function f is called the identity function if each element of set A has an image on itself i.e.
f (a) = a ∀ a ∈ A.

It is denoted by I.

Example:

Consider, A = {1, 2, 3, 4, 5} and f: A → A such that f = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)}.
The function f is an identity function as each element of A is mapped onto itself. The function
f is a one-one and onto
Invertible (Inverse) Functions:
A function f: X → Y is invertible if and only if it is a bijective function.

Consider the bijective (one to one onto) function f: X → Y. As f is a one to one, therefore, each
element of X corresponds to a distinct element of Y. As f is onto, there is no element of Y
which is not the image of any element of X, i.e., range = co-domain Y.

The inverse function for f exists if f-1 is a function from Y to X.

Example:

Consider, X = {1, 2, 3} Y = {k, l, m} and f: X→Y such that


f = {(1, k), (2, m), (3, l)

The inverse function of f is shown in fig:

Compositions of Functions:
Consider functions, f: A → B and g: B → C. The composition of f with g is a function from A
into C defined by (gof) (x) = g [f(x)] and is defined by gof.

To find the composition of f and g, first find the image of x under f and then find the image
of f (x) under g.

Example1:

Let X = {1, 2, 3} Y = {a, b} Z = {5, 6, 7}.


Consider the function f = {(1, a), (2, a), (3, b)} and g = {(a, 5), (b, 7)} as in figure. Find the
composition of gof.
Solution: The composition function gof is shown in fig:

(gof) (1) = g [f (1)] = g (a) = 5, (gof) (2) = g [f (2)] = g (a) = 5


(gof) (3) = g [f (3)] = g (b) = 7.

Example: If, f(x) = x2 and g(x) = x + 3. Then calculate the composition g(f(x)) and
f(g(x)). (i.e., fog(x), gof(x))

Solution:
g(f(x)) = g(x2) = x2 + 3
Similarly, we can easily calculate the f(g(x)) or (f∘g)(x) where g(x) is computed first.
f(g(x)) = f(x + 3) = (x + 3)2

Example: If f(x) = x + 2 and g(x) = (2x)2 find, f(g(x)) and g(f(x)) (i.e., fog(x), gof(x))

Solution:
For f(g(x))
Given, g(x) = (2x) 2 = 4x2
Thus, f(g(x)) = f(4x2) = 4x2 + 2

Now for g(f(x))


Given, f(x) = x + 2
Thus, g(f(x)) = (2(x+2))2 = (2x + 4)2
⇒ g(f(x)) = 4x2 + 16 + 8x
Example: Consider f, g and h, all functions on the integers, by f (n) =n2, g (n) = n + 1 and

h (n) = n - 1. Determine (i) hofog (ii) gofoh (iii) fogoh.

Solution:

(i) hofog (n) = n + 1,


hofog (n + 1) = (n+1)2
h [(n+1)2 ] = (n+1)2 - 1 = n2 + 1 + 2n - 1 = n2 + 2n.

(ii) gofoh (n) = n - 1, gof (n - 1) = (n-1)2


g [(n-1)2 ] = (n-1)2 + 1 = n2 + 1 - 2n + 1 = n2 - 2n + 2.

(iii) fogoh (n) = n - 1


fog (n - 1) = (n - 1) + 1
f (n) = n2.

Note:

o If f and g are one-to-one, then the function (gof) (gof) is also one-to-one.
o If f and g are onto then the function (gof) (gof) is also onto.
o Composition consistently holds associative property but does not hold commutative
property.

Partition of a set Definition:


Recursive Function:
Recursion refers to a process in which a recursive process repeats itself. Recursive is a kind
of function of one and more variables, usually specified by a certain process that produces
values of that function by continuously implementing a particular relation to known values
of the function.

General Form of a Recursive Function

A recursive function has two main parts:

1. Base Case: A condition that stops the recursion (prevents infinite calls).
2. Recursive Case: A rule that defines the function in terms of smaller inputs.
Representation of Relations

Relations can be represented in many ways. Some of which are as follows:

1. Relation as a Matrix: Let P = [a1,a2,a3,.......am] and Q = [b1,b2,b3......bn] are finite sets,


containing m and n number of elements respectively. R is a relation from P to Q. The relation
R can be represented by m x n matrix M = [Mij], defined as

Mij = 0 if (ai,bj) ∉ R
1 if (ai,bj )∈ R
Example

1. Let P = {1, 2, 3, 4}, Q = {a, b, c, d} and R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}.
The matrix of relation R is shown as fig:

2. Relation as a Directed Graph: There is another way of picturing a relation R when R is a


relation from a finite set to itself.

Example

1. A = {1, 2, 3, 4} R = {(1, 2) (2, 2) (2, 4) (3, 2) (3, 4) (4, 1) (4, 3)}

3. Relation as an Arrow Diagram: If P and Q are finite sets and R is a relation from P to Q.
Relation R can be represented as an arrow diagram as follows.

Draw two ellipses for the sets P and Q. Write down the elements of P and elements of Q
column-wise in three ellipses. Then draw an arrow from the first ellipse to the second ellipse if
a is related to b and a ∈ P and b ∈ Q.
Example

1. Let P = {1, 2, 3, 4} Q = {a, b, c, d} R = {(1, a), (2, a), (3, a), (1, b), (4, b), (4, c), (4, d)

The arrow diagram of relation R is shown in fig:

4. Relation as a Table: If P and Q are finite sets and R is a relation from P to Q. Relation R
can be represented in tabular form.

Make the table which contains rows equivalent to an element of P and columns equivalent to
the element of Q. Then place a cross (X) in the boxes which represent relations of elements on
set P to set Q.

Example

1. Let P = {1, 2, 3, 4} Q = {x, y, z, k} R = {(1, x), (1, y), (2, z), (3, z), (4, k)}.
The tabular form of relation as shown in fig:

You might also like