SlideShare a Scribd company logo
Discrete mathematic
Unit-I
Sets, Relations and Functions: Operations and Laws of Sets, Cartesian
Products, Binary Relation, Partial Ordering Relation, Equivalence Relation,
Image of a Set, Sum and Product of Functions, Bijective functions, Inverse
and Composite Function, Size of a Set, Finite and infinite Sets, Countable
and uncountable Sets, Cantor's diagonal argument and The Power Set
theorem, Schroeder-Bernstein theorem.
Unit-II
Principles of Mathematical Induction: The Well-Ordering Principle,
Recursive definition, The Division algorithm: Prime Numbers, The Greatest
Common Divisor: Euclidean Algorithm, The Fundamental Theorem of
Arithmetic. Basic counting techniques-inclusion and exclusion, pigeon-hole
principle, permutation and combination.
(A30506) DISCRETE MATHEMATICS B. Tech (CSE)
III Semester
Unit-III
Propositional Logic: Syntax, Semantics, Validity and Satisfiability, Basic
Connectives and Truth Tables, Logical Equivalence: The Laws of Logic,
Logical Implication, Rules of Inference, The use of Quantifiers. Proof
Techniques: Some Terminology, Proof Methods and Strategies, Forward
Proof, Proof by Contradiction, Proof by Contraposition, Proof of Necessity
and Sufficiency.
Unit-IV
Algebraic Structures and Morphism: Algebraic Structures with one Binary
Operation, Semi Groups, Monoids, Groups, Congruence Relation and
Quotient Structures, Free and Cyclic Monoids and Groups, Permutation
Groups, Substructures, Normal Subgroups, Algebraic Structures with two
Binary Operation, Rings, Integral Domain and Fields. Boolean Algebra and
Boolean Ring, Identities of Boolean Algebra, Duality, Representation of
Boolean Function, Disjunctive and Conjunctive Normal Form
Unit-V
Graphs and Trees: Graphs and their properties, Degree, Connectivity, Path,
Cycle, Sub Graph, Isomorphism, Eulerian and Hamiltonian Walks, Graph
Coloring, Coloring maps and Planar Graphs, Coloring Vertices, Coloring
Edges, List Coloring, Perfect Graph, definition properties and Example,
rooted trees, trees and sorting, weighted trees and prefix codes, Bi-
connected component and Articulation Points, Shortest distances.
Text books:
1. Kenneth H. Rosen, Discrete Mathematics and its Applications, 7th
Edition, Tata McGraw – Hill
2. Susanna S. Epp, Discrete Mathematics with Applications,4th edition,
Wadsworth Publishing Co. Inc.
3. C L Liu and D P Mohapatra, Elements of Discrete Mathematics A
Computer OrientedApproach, 3rd Edition by, Tata McGraw – Hill.
© Dr. Eric Gossett 5
What Is Discrete Mathematics?
• What it isn’t: continuous
• Discrete: consisting of distinct or unconnected
elements
• Countably Infinite
• Definition Discrete Mathematics
– Discrete Mathematics is a collection of
mathematical topics that examine and use finite
or countably infinite mathematical objects.
Discrete mathematics is an essential part in Computer Science
Engineering (i.e., CSE) as well as in Information Technology (i.e.,
IT) because:
•It contains the logic development with respect to real life
situations as well as to solve programming complexity.
•It helps in learning Data Science, Deep Learning and Big
data like courses.
•The rules in algorithms are designed with the help of
discrete mathematics.
•To extract the data in database systems, we connect
certain traits of piece of information. This is all done
through the discrete math concept of sets.
Importance of DM
DM finds its application in variety of computer science domains
including Machine Learning, Big Data, Cryptography etc. As a subject,
unlike algebra and geometry, it is less about formulas and more about
concepts.
Game theory, Automata theory, Graph theory are all disciplines of
Discrete Mathematics.
8
Sets: Learning Objectives
• Learn about sets
• Explore various operations on sets
• Become familiar with Venn diagrams
A set is defined as a collection of distinct objects of the same type or class of
objects. The purposes of a set are called elements or members of the set. An
object can be numbers, alphabets, names, etc.
Examples of sets are:
A set of rivers of India A set of vowels. A set of Vegetables
Sets
A set is denoted by the capital letter A, B, C, etc.
while the fundamentals of the set by small letter a, b, x, y, etc.
If A is a set, and a is one of the elements of A, then we denote it as a ∈ A.
Here the symbol ∈ means -"Element of/ Belongs“.
A={ Apple, Banana, Grapes, Kiwi, Star fruit,…etc}
A set of fruits
a) Statement form method In this, well-defined description of the elements
of the set is given and the same are enclosed in curly brackets.
Example: The set of odd numbers less than 7 is written as:
{odd numbers less than 7 }
b) Roster or tabular form: In this form of representation we list all the
elements of the set within braces { } and separate them by commas.
Example: If A= set of all odd numbers less then 10 then in the roster from it
can be expressed as A={ 1,3,5,7,9}.
c) Set Builder form: In this form of representation we list the properties
fulfilled by all the elements of the set. We note as {x: x satisfies properties
P}. and read as 'the set of those entire x such that each x has properties P.‘
Example: If B= {2, 4, 8, 16, 32}, then the set builder representation will be:
B={x: x=2n, where n ∈ N and 1≤ n ≥5}
Sets Representation:
Standard Notations:
x ∈ A x belongs to A or x is an element of set A.
x ∉ A x does not belong to set A.
∅ Empty Set.
U Universal Set.
N The set of all natural numbers.
I The set of all integers.
I0 The set of all non- zero integers.
I+ The set of all + ve integers.
C, C0 The set of all complex, non-zero complex numbers
respectively.
Q, Q0, Q+ The sets of rational, non- zero rational, +ve rational
numbers respectively.
R, R0, R+ The set of real, non-zero real, +ve real number
respectively.
Standard Sets of Numbers
1. N = Natural numbers
2. W = Whole numbers
3. Z or I = Integers
4. E = Even natural numbers.
5. O = Odd natural numbers.
The total number of unique elements in the set is called the cardinality of
the set. The cardinality of the countable infinite set is count ably infinite.
Examples:
1. Let P = {k , l, m, n}
The cardinality of the set P is 4.
2. Let A is the set of all non-negative even integers, i.e.
A = {0, 2, 4, 6, 8, 10......}.
As A is countably infinite set hence the cardinality.
Cardinality of a Sets:
Types of Sets
1. Finite Sets
2. Infinite Sets
3. Subsets
4. Proper Subset
5. Improper Subset
6. Universal Set
7. Null Set or Empty Set
8. Singleton Set
9. Equal Set
10. Equivalent Sets
11. Disjoint Sets
12. Power Sets : The power of any given set A is the set of all subsets of A and is
denoted by P (A). If A has n elements, then P (A) has 2n elements.
Example: A = {1, 2, 3}
P (A) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}.
Operations on Sets
The four basic operations are:
1. Union of Sets
2. Intersection of sets
3. Complement of the Set
4. Cartesian Product of sets
For example;
Let Ω={1,2,3,4,5,6,7,8}
set A = {1,2,3, 4}
and set B = {3,4, 5,6}
A ∪ B = {2, 4, 5, 6, 7, 8}
Therefore,
A ∪ B = {x : x ∈ A or x ∈ B}
Some properties of the operation of union:
i. A∪B = B∪A (Commutative law)
ii. A∪(B∪C) = (A∪B)∪C (Associative law)
iii. A ∪ ϕ = A (Law of identity element, is the identity of ∪)
iv. A∪A = A (Idempotent law)
v. U∪A = U (Law of ∪) ∪ is the universal set.
Notes:
A ∪ ϕ = ϕ ∪ A = A i.e. union of any set with the empty set is always the set
itself.
For example;
Let Ω={1,2,3,4,5,6,7,8}
set A = {1,2,3, 4}
and set B = {3, 4, 5,6}
A ∩ B = { 3,4}
Therefore,
A ∩ B = {x : x ∈ A and x ∈ B}
Some properties of the operation of intersection
i. (A∩B = B∩A (Commutative law)
ii. (A∩B)∩C = A∩ (B∩C) (Associative law)
iii. ϕ ∩ A = ϕ (Law of ϕ)
iv. U∩A = A (Law of ∪)
v. A∩A = A (Idempotent law)
vi. A∩(B∪C) = (A∩B) ∪ (A∩C) (Distributive law) Here ∩ distributes over ∪
vii. A∪(B∩C) = (AUB) ∩ (AUC) (Distributive law) Here ∪ distributes over ∩
Notes:
A ∩ ϕ = ϕ ∩ A = ϕ
i.e. intersection of any set with the empty set is always the empty set.
Complement of a Set: The complement of a set, denoted A', is the set of all
elements in the given universal set U that are not in A.
In set- builder notation, A' = {x ∈ U : x ∉ A}.
For example;
Let Ω={1,2,3,4,5,6,7,8}
set A = {1,2,3, 4}
A' = { 5,6,7,8}
Therefore,
A' = {x ∈ U : x ∉ A }
• The complement of a universal set is an empty set.
• A set and its complement are disjoint sets.
Some properties of complement sets
(i) A ∪ A' = A' ∪ A = ∪ (Complement law)
(ii) (A ∩ B') = ϕ (Complement law)
(iii) (A ∪ B) = A' ∩ B' (De Morgan’s law)
(iv) (A ∩ B)' = A' ∪ B' (De Morgan’s law)
(v) (A')' = A (Law of complementation)
(vi) ϕ' = ∪ (Law of empty set)
(vii) ∪' = (ϕ and universal set)
If A and B are two non-empty sets, then their Cartesian product A × B is the
set of all ordered pair of elements from A and B.
A × B = {(x, y) : x ∈ A, y ∈ B}
For example;
Let Ω={1,2,3,4,5,6,7,8}
set A = {1,2,3, 4}
and set B = {3, 4, 5,6}
A × B =
{(1,3),(1,4),(1,5),(1,6),(2,3),(2,4),(2,5),(2,6),(3,3),(3,4),(3,5),(3,6)(4,3),(4,4),(4,5),(4,6)}
Therefore,
A × B = {(x, y) : x ∈ A, y ∈ B}
Cartesian product
More laws of algebra of sets:
6. For any two finite sets A and B;
(i) A – B = A ∩ B'
(ii) B – A = B ∩ A'
(iii) A – B = A ⇔ A ∩ B = ∅
(iv) (A – B) U B = A U B
(v) (A – B) ∩ B = ∅
(vi) A ⊆ B ⇔ B' ⊆ A'
(vii) (A – B) U (B – A) = (A U B) – (A ∩ B)
7. For any three finite sets A, B and C;
(i) A – (B ∩ C) = (A – B) U (A – C)
(ii) A – (B U C) = (A – B) ∩ (A – C)
(iii) A ∩ (B - C) = (A ∩ B) - (A ∩ C)
(iv) A ∩ (B △ C) = (A ∩ B) △ (A ∩ C)
Laws of Algebra of Sets
1. Commutative Laws:
For any two finite sets A and B;
(i) A U B = B U A
(ii) A ∩ B = B ∩ A
2. Associative Laws:
For any three finite sets A, B and C;
(i) (A U B) U C = A U (B U C)
(ii) (A ∩ B) ∩ C = A ∩ (B ∩ C)
Thus, union and intersection are
associative.
3. Idempotent Laws:
For any finite set A;
(i) A U A = A
(ii) A ∩ A = A
4. Distributive Laws:
For any three finite sets A, B and C;
(i) A U (B ∩ C) = (A U B) ∩ (A U C)
(ii) A ∩ (B U C) = (A ∩ B) U (A ∩ C)
Thus, union and intersection are
distributive over intersection and union
respectively.
5. De Morgan’s Laws:
For any two finite sets A and B;
(i) A – (B U C) = (A – B) ∩ (A – C)
(ii) A - (B ∩ C) = (A – B) U (A – C)
De Morgan’s Laws can also we written as:
(i) (A U B)’ = A' ∩ B'
(ii) (A ∩ B)’ = A' U B'
Let P and Q be two non- empty sets. A binary relation R is defined to be a subset of
P x Q from a set P to Q. If (a, b) ∈ R and R ⊆ P x Q then a is related to b by R i.e.,
aRb. If sets P and Q are equal, then we say R ⊆ P x P is a relation on P
Example:
(i) Let A = {a, b, c} B = {r, s, t}
Then R = {(a, r), (b, r), (b, t), (c, s)} is a relation from A to B.
(ii) Let A = {1, 2, 3} and B = A R = {(1, 1), (2, 2), (3, 3)} is a relation (equal) on A.
Relations
•If a set A has n elements, A x A has n2 elements. So, there are 2n2 relations
from A to A.
•If A has m elements and B has n elements. There are m x n elements; hence
there are 2m x n relations from A to A.
Domain and Range of Relation
Domain of Relation: The Domain of relation R is the set of elements in P which
are related to some elements in Q, or it is the set of all first entries of the
ordered pairs in R. It is denoted by DOM (R).
Range of Relation: The range of relation R is the set of elements in Q which are
related to some element in P, or it is the set of all second entries of the
ordered pairs in R. It is denoted by RAN (R).
Example:
1.Let A = {1, 2, 3, 4} B = {a, b, c, d} R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}.
DOM (R) = {1, 2}
RAN (R) = {a, b, c, d}
Complement of a Relation
A relation R from a set A to set B. The complement of relation R denoted by R is a
relation from A to B such that R = {(a, b): {a, b) ∉ R}.
Example:
X = {1, 2, 3} Y = {8, 9} R = {(1, 8) (2, 8) (1, 9) (3, 9)} Find the complement relation of R.
R ={(2,9),(3,8)}
Representation of Relations
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
Mij = 1 if (ai,bj )∈ R
Example
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)}
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
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.
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
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)
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.
Example
Let P = {1, 2, 3, 4}
Q = {x, y, z, k}
R = {(1, x), (1, y), (2, z), (3, z), (4, k)}.
Composition of Relations
Let A, B, and C be sets, and let R be a relation from A to B and let S be a
relation from B to C. That is, R is a subset of A × B and S is a subset of
B × C. Then R and S give rise to a relation from A to C indicated by R◦S and
defined by:
a (R◦S)c if for some b ∈ B we have aRb and bSc.
is, R ◦ S = {(a, c)| there exists b ∈ B for which (a, b) ∈ R and (b, c) ∈ S}
The relation R◦S is known the composition of R and S; it is sometimes
denoted simply by RS.
Let R is a relation on a set A, that is, R is a relation from a set A to itself.
Then R◦R, the composition of R with itself, is always represented. Also, R◦R
is sometimes denoted by R2. Similarly, R3 = R2◦R = R◦R◦R, and so on. Thus
Rn is defined for all positive n.
Example1: Let X = {4, 5, 6}, Y = {a, b, c} and Z = {l, m, n}. Consider the relation R1 from X
to Y and R2 from Y to Z.
R1 = {(4, a), (4, b), (5, c), (6, a), (6, c)}
R2 = {(a, l), (a, n), (b, l), (b, m), (c, l), (c, m), (c, n)}
(i) R1 o R2 = {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l),
The composition relation R1o R1
-1 as shown in fig:
Types of Relations
1. Reflexive Relation: A relation R on set A is said to be a reflexive if (a, a) ∈
R for every a ∈ A.
Example: If A = {1, 2, 3, 4} then R = {(1, 1) (2, 2), (1, 3), (2, 4), (3, 3), (3, 4), (4,
4)}. Is a relation reflexive?
Solution: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1, 1), (2,
2), (3, 3), (4, 4) ∈ R.
2. Irreflexive Relation: A relation R on set A is said to be irreflexive if (a, a) ∉
R for every a ∈ A.
Example: Let A = {1, 2, 3} and R = {(1, 2), (2, 2), (3, 1), (1, 3)}. Is the relation R
reflexive or irreflexive?
Solution: The relation R is not reflexive as for every a ∈ A, (a, a) ∉ R, i.e., (1, 1)
and (3, 3) ∉ R. The relation R is not irreflexive as (a, a) ∉ R, for some a ∈ A,
i.e., (2, 2) ∈ R.
3. Symmetric Relation: A relation R on set A is said to be symmetric iff (a, b) ∈ R
⟺ (b, a) ∈ R.
Example: Let A = {1, 2, 3} and R = {(1, 1), (2, 2), (1, 2), (2, 1), (2, 3), (3, 2)}. Is a
relation R symmetric or not?
Solution: The relation is symmetric as for every (a, b) ∈ R, we have (b, a) ∈ R, i.e.,
(1, 2), (2, 1), (2, 3), (3, 2) ∈ R but not reflexive because (3, 3) ∉ R.
Example of Symmetric Relation:
Relation ⊥r is symmetric since a line a is ⊥r to b, then b is ⊥r to a.
Also, Parallel is symmetric, since if a line a is ∥ to b then b is also ∥ to a.
4. Antisymmetric Relation: A relation R on a set A is antisymmetric iff (a, b) ∈ R
and (b, a) ∈ R then a = b.
Example1: Let A = {1, 2, 3} and R = {(1, 1), (2, 2)}. Is the relation R antisymmetric?
Solution: The relation R is antisymmetric as a = b when (a, b) and (b, a) both
belong to R.
Example2: Let A = {4, 5, 6} and R = {(4, 4), (4, 5), (5, 4), (5, 6), (4, 6)}. Is the relation
R antisymmetric?
Solution: The relation R is not antisymmetric as 4 ≠ 5 but (4, 5) and (5, 4) both
belong to R.
5. Asymmetric Relation: A relation R on a set A is called an Asymmetric
Relation if for every (a, b) ∈ R implies that (b, a) does not belong to R.
6. Transitive Relations: A Relation R on set A is said to be transitive iff (a,
b) ∈ R and (b, c) ∈ R ⟺ (a, c) ∈ R.
Example1: Let A = {1, 2, 3} and R = {(1, 2), (2, 1), (1, 1), (2, 2)}. Is the
relation transitive?
Solution: The relation R is transitive as for every (a, b) (b, c) belong to R,
we have (a, c) ∈ R i.e, (1, 2) (2, 1) ∈ R ⇒ (1, 1) ∈ R.
Note1: The Relation ≤, ⊆ and / are transitive, i.e., a ≤ b, b ≤ c then a ≤ c
(ii) Let a ⊆ b, b ⊆ c then a ⊆ c
(iii) Let a/b, b/c then a/c.
Note2: ⊥r is not transitive since a ⊥r b, b ⊥r c then it is not true that a ⊥r c. Since
no line is ∥ to itself, we can have a ∥ b, b ∥ a but a ∦ a.
Thus ∥ is not transitive, but it will be transitive in the plane.
7. Identity Relation: Identity relation I on set A is reflexive, transitive and
symmetric. So identity relation I is an Equivalence Relation.
Example: A= {1, 2, 3} = {(1, 1), (2, 2), (3, 3)}
8. Void Relation: It is given by R: A →B such that R = ∅ (⊆ A x B) is a null
relation. Void Relation R = ∅ is symmetric and transitive but not reflexive.
9. Universal Relation: A relation R: A →B such that R = A x B (⊆ A x B) is a
universal relation. Universal Relation from A →B is reflexive, symmetric and
transitive. So this is an equivalence relation.
Consider a given set A, and the collection of all relations on A. Let P be a
property of such relations, such as being symmetric or being transitive. A
relation with property P will be called a P-relation. The P-closure of an arbitrary
relation R on A, indicated P (R), is a P-relation such that R ⊆ P (R) ⊆ S
Closure Properties of Relations
(1) Reflexive and Symmetric Closures: The theorem tells us how to obtain the
reflexive and symmetric closures of a relation easily.
Theorem: Let R be a relation on a set A. Then:
a. R ∪ ∆A is the reflexive closure of R
b. R ∪ R-1 is the symmetric closure of R.
Example1:
Let A = {k, l, m}. Let R is a relation on A defined by
R = {(k, k), (k, l), (l, m), (m, k)}. Find the reflexive closure of R.
Solution: R ∪ ∆ is the smallest relation having reflexive property, Hence,
RF = R ∪ ∆ = {(k, k), (k, l), (l, l), (l, m), (m, m), (m, k)}.
Example2: Consider the relation R on A = {4, 5, 6, 7} defined by
R = {(4, 5), (5, 5), (5, 6), (6, 7), (7, 4), (7, 7)}
Find the symmetric closure of R.
Solution: The smallest relation containing R having the symmetric property is R ∪
R-1,i.e.
RS = R ∪ R-1 = {(4, 5), (5, 4), (5, 5), (5, 6), (6, 5), (6, 7), (7, 6), (7, 4), (4, 7), (7, 7)}.
(2)Transitive Closures: Consider a relation R on a set A. The transitive
closure R of a relation R of a relation R is the smallest transitive relation
containing R.
Recall that R2 = R◦ R and Rn = Rn-1 ◦ R.
The following Theorem applies:
Theorem1: R* is the transitive closure of R. Suppose A is a finite set with n
elements. R* = R ∪R2 ∪.....∪ Rn
Theorem 2: Let R be a relation on a set A with n elements. Then
Transitive (R) = R ∪ R2∪.....∪ Rn
Example1: Consider the relation R = {(1, 2), (2, 3), (3, 3)} on A = {1, 2, 3}.Then
R2 = R◦ R = {(1, 3), (2, 3), (3, 3)} and R3 = R2 ◦ R = {(1, 3), (2, 3), (3, 3)}
Accordingly, Transitive (R) = {(1, 2), (2, 3), (3, 3), (1, 3)}
Equivalence Relations
A relation R on a set A is called an equivalence relation if it satisfies
following three properties:
a. Relation R is Reflexive, i.e. aRa ∀ a∈A.
b. Relation R is Symmetric, i.e., aRb ⟹ bRa
c. Relation R is transitive, i.e., aRb and bRc ⟹ aRc.
Example: Let A = {1, 2, 3, 4} and R = {(1, 1), (1, 3), (2, 2), (2, 4), (3, 1), (3, 3),
(4, 2), (4, 4)}. Show that R is an Equivalence Relation.
Solution:
Reflexive: Relation R is reflexive as (1, 1), (2, 2), (3, 3) and (4, 4) ∈ R.
Symmetric: Relation R is symmetric because whenever (a, b) ∈ R, (b, a) also
belongs to R. (2, 4) ∈ R ⟹ (4, 2) ∈ R.
Transitive: Relation R is transitive because whenever (a, b) and (b, c)
belongs to R, (a, c) also belongs to R. (3, 1) ∈ R and (1, 3) ∈ R ⟹ (3, 3) ∈ R.
So, as R is reflexive, symmetric and transitive, hence, R is an Equivalence
Relation.
Note1: If R1and R2 are equivalence relation then R1∩ R2 is also an
equivalence relation.
Let R be any relation from set A to set B. The inverse of R denoted by R-1 is the
relations from B to A which consist of those ordered pairs which when reversed
belong to R that is: R-1 = {(b, a): (a, b) ∈ R}
Example1: A = {1, 2, 3} B = {x, y, z}
Solution: R = {(1, y), (1, z), (3, y)
R-1 = {(y, 1), (z, 1), (y, 3)}
Clearly (R-1)-1 = R
Note1: Domain and Range of R-1 is equal to range and domain of R.
Example2: R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 3), (3, 2)}
R-1 = {(1, 1), (2, 2), (3, 3), (2, 1), (3, 2), (2, 3)}
Note2: If R is an Equivalence Relation then R-1 is always an Equivalence
Relation.
Inverse Relation
Note 3: If R is a Symmetric Relation then R-1=R and vice-versa.
Note 4: Reverse Order of Law
(AOB)-1 = A-1 or B-1
(COBOA)-1 = A-1 or B-1 or C-1.
Partial Order Relations
A relation R on a set A is called a partial order relation if it satisfies the
following three properties:
a. Relation R is Reflexive, i.e. aRa ∀ a∈A.
b. Relation R is Antisymmetric, i.e., aRb and bRa ⟹ a = b.
c. Relation R is transitive, i.e., aRb and bRc ⟹ aRc.
Example1: Show whether the relation (x, y) ∈ R, if, x ≥ y defined on the set of +ve
integers is a partial order relation.
Solution: Consider the set A = {1, 2, 3, 4} containing four +ve integers. Find the
relation for this set such as R = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3), (1, 1), (2, 2),
(3, 3), (4, 4)}.
Reflexive: The relation is reflexive as for every a ∈ A. (a, a) ∈ R,
i.e. (1, 1), (2, 2), (3, 3), (4, 4) ∈ R.
Antisymmetric: The relation is antisymmetric as whenever (a, b) and (b, a) ∈ R, we
have a = b.
Transitive: The relation is transitive as whenever (a, b) and (b, c) ∈ R, we have (a, c)
∈ R.
Example: (4, 2) ∈ R and (2, 1) ∈ R, implies (4, 1) ∈ R.
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 of a Function: Let f be a function from
P to Q. The set P is called the domain of the
function f.
Co-Domain of a Function: Let f be a function
from P to Q. The set Q 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).
Example: Find the Domain, Co-Domain, and Range of function.
Let x = {1, 2, 3, 4} y = {a, b, c, d, e} f = {(1, b), (2, a), (3, d), (4, c)}
If f: P → Q, then f (P) = {f(x): x ∈ P} = {y: y ∈ Q | ∃ x ∈ P, such that f (x) = y}.
•Domain of function: {1, 2, 3, 4}
•Range of function: {a, b, c, d}
•Co-Domain of function: {a, b, c, d, e}
If P and Q are two non-empty sets, then a function f from P to Q is a subset of
P x Q, with two important restrictions.
1. ∀ a ∈ P, (a, b) ∈ f for some b ∈ Q
2. If (a, b) ∈ f and (a, c) ∈ f then b = c.
If a set A has n elements, then there are nn functions from A to A.
https://www.youtube.com/watch?v=i0TH4TC2
TwY
Representation of a Function
The two sets P and Q are represented by two circles. The function f: P → Q is
represented by a collection of arrows joining the points which represent the
elements of P and corresponds elements of Q
Let X = {a, b, c} and Y = {x, y, z} and f: X → Y
such that f= {(a, x), (b, z), (c, x)}
Let X = {x, y, z, k} and Y = {1, 2, 3, 4}. Determine which of the following
functions. Give reasons if it is not. Find range if it is a function.
a. f = {(x, 1), (y, 2), (z, 3), (k, 4)
b. g = {(x, 1), (y, 1), (k, 4)
c. h = {(x, 1), (x, 2), (x, 3), (x, 4)
d. l = {(x, 1), (y, 1), (z, 1), (k, 1)}
e. d = {(x, 1), (y, 2), (y, 3), (z, 4), (z, 4)}.
Types of Functions
1. Injective (One-to-One)
2. Surjective (Onto)
3. Bijective (One-to-One Onto)
4. Into
5. One-One Into
6. Many-One
7. Many-One Into
8. Many-One Onto
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.
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.
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.
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.
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.
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.
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.
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.
Identity Functions
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
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)}
f-1 ={(k, 1), (l, 3), (m,2)}
Invertible (Inverse) Functions
Compositions of Functions
Two 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.
(gof) (1) = g [f (1)] = g (a) = 5
(gof) (2) = g [f (2)] = g (a) = 5
(gof) (3) = g [f (3)] = g (b) = 7.
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.
Example2: 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.
a. If f and g are one-to-one, then the function (gof) (gof) is also one-to-
one.
b. If f and g are onto then the function (gof) (gof) is also onto.
c. Composition consistently holds associative property but does not hold
commutative property.
Mathematical Functions
1. Floor Functions:
2. Ceiling Functions
3. Remainder Functions
4. Exponential Functions
5. Logarithmic Functions
1. Floor Functions: The floor function for any real number x is defined as f (x) is the
greatest integer 1 less than or equal to x. It is denoted by [x].
Example: Determine the value of (i)[3. 5] (ii)[-2.4] (iii)[3. 143].
Solution:
(i)[3 . 5] = 3 (ii) [-2 .4] = -3 (iii) [3. 143] = 3
2. Ceiling Functions: The ceiling function for any real number x is defined as h
(x) is the smallest integer greater than or equal to x. It is denoted by [x].
Example: Determine the value of (i)[3. 5] (ii) [-2.4] (iii) [3. 143].
Solution:
(i)[3. 5] = 4 (ii) [-2 .4] = -2 (iii) [3. 143] = 4.
3. Remainder Functions: The integer remainder is obtained when some a is
divided by m. It is denoted by a (MOD m). We can also define it as, a (MOD m)
is the unique integer t such that a = Mq + t. Here q is quotient 0 ≤ r < M.
Example: Determine the value of the following:
(i) 35 (MOD 7) (ii) 20 (MOD 6) (iii) 4 (MOD 9) (iv) 27(MOD 4)
Solution:
(i) 35 (MOD 7) = 0 (ii) 20 (MOD 6) = 2
(iii) 4 (MOD 9) = 4 (iv) 27(MOD 4)=3
4. Exponential Functions: Consider two sets A and B. Let A = B = I+ and also let
f: A → B be defined by f (n) = kn. Here n is a +ve integer. The function f is
called the base k exponential function.
Note 1: kt= k. k. k.......k (t times).
2: k0=1,k-M= 1/kM
3. For rational number, a/b, the exponential function is
Example: Determine the value of the following:
(i) 103 (ii) 51/2 (iii) 3-5
5. Logarithmic Functions: Consider two sets A and B. Let A = B = R (the set of
real numbers and also let f_n:A→B be defined for each positive integer n > 1
as fn (x)=logn(x) the base n of x.
Note 1: k = logn x and nk are equivalent.
2. For any base n, logn 1=0 as n0=1.
3. For any base n, logn n=1 as n1=n.
Example: Determine the value of the following:
(i) log216 (ii) log2 100 (iii) log2 0.001.
Solution:
(i)log216 = 4 as 24=16.
(ii)log2 100 = 6 as 26= 64 but 27=128 which is greater
(iii)log2 0.001=-9 as 2-9=but 2-10=which is greater.
The Rule of Sum and Rule of Product are used to decompose difficult counting
problems into simple problems.
The Rules of Sum and Product
•The Rule of Product − If a sequence of tasks T1,T2,…,Tm can be done
in w1,w2,…wm ways respectively and every task arrives after the
occurrence of the previous task, then there are w1×w2×⋯×wm ways to
perform the tasks. Mathematically, if a task B arrives after a task A,
then |A×B|=|A|×|B|.
•The Rule of Sum − If a sequence of tasks T1,T2,…,Tm can be done
in w1,w2,…wm ways respectively (the condition is that no tasks can be
performed simultaneously), then the number of ways to do one of these
tasks is w1+w2+⋯+wm. If we consider two tasks A and B which are disjoint
(i.e. A∩B=∅), then mathematically |A∪B|=|A|+|B|.
Example 1− A boy lives at X and wants to go to School at Z. From his home X he has to
first reach Y and then Y to Z. He may go X to Y by either 3 bus routes or 2 train routes.
From there, he can either choose 4 bus routes or 5 train routes to reach Z. How many
ways are there to go from X to Z?
Solution − From X to Y, he can go in 3+2=5 ways (Rule of Sum).
Thereafter, he can go Y to Z in 4+5=9 ways (Rule of Sum).
Hence from X to Z he can go in 5×9=45 ways (Rule of Product).
Example 2: How many bit strings of length seven are there? Solution: Since each bit is
either 0 or 1, applying the product rule, the answer is 27 = 128.
Example 3: How many different car license plates can be made if each plate contains
a sequence of three uppercase English letters followed by three digits?
Finite set: A set is said to be a finite set if it is either void set or the process
of counting of elements surely comes to an end is called a finite set.
In a finite set the element can be listed if it has a limited i.e. countable by
natural number 1, 2, 3, ……… and the process of listing terminates at a
certain natural number N.
Infinite set: A set is said to be an infinite set whose elements cannot be
listed if it has an unlimited (i.e. uncountable) by the natural number 1, 2, 3,
4, ………… n, for any natural number n is called a infinite set. A set which is
not finite is called an infinite set.
Examples of finite set:
1. Let P = {5, 10, 15, 20, 25, 30}
Then, P is a finite set and n(P) = 6.
2. Let Q = {natural numbers less than 25}
Then, Q is a finite set and n(P) = 24.
3. Let R = {whole numbers between 5 and 45}
Then, R is a finite set and n(R) = 38.
4. Let S = {x : x ∈ Z and x^2 – 81 = 0}
Then, S = {-9, 9} is a finite set and n(S) = 2.
5. The set of all persons in India is a finite set.
6. The set of all birds in HYD is a finite set.
Examples of infinite set:
1. Set of all points in a plane is an infinite set.
2. Set of all points in a line segment is an
infinite set.
3. Set of all positive integers which is multiple
of 3 is an infinite set.
4. W = {0, 1, 2, 3, ……..} i.e. set of all whole
numbers is an infinite set.
5. N = {1, 2, 3, ……….} i.e. set of all natural
numbers is an infinite set.
6. Z = {……… -2, -1, 0, 1, 2, ……….} i.e. set of all
integers is an infinite set.
• A set S is finite if there is a bijection between S and {1, 2, . . . , n}
for some positive integer n, and infinite otherwise. (I.e., if it makes
sense to count its elements.)
• Two sets have the same cardinality if there is a bijection between
them.
Cantor’s Diagonal Argument
Note: “Bijection”, remember, means “function that is one-to-one
and onto”.
A set S is called countably infinite if there is a bijection
between S and N.
That is, A Set is countable, because you can count it label the
elements of S. { 1, 2, . . . n} lable with N.
* NOTE: not all infinite sets are countably infinite. In fact,
there are infinitely many sizes of infinite sets.
Georg Cantor proved a approach that the set of real numbers
is not countable. That is, it is impossible to construct a
bijection between N and R.
In fact, it’s impossible to construct a bijection between N and
the interval [0, 1] (whose cardinality is the same as that of R).
Georg Cantor proved a approach that the set of real numbers
is not countable. That is, it is impossible to construct a
bijection between N and R.
In fact, it’s impossible to construct a bijection between N and
the interval [0, 1] (whose cardinality is the same as that of R).
Cantor’s proof: Suppose that f : N → [0, 1] is any function.
Statement:
If there exist injective functions f:A->B and g: B->A between
the sets A and B, Then there exists a bijective function h:A->B.
In terms of the cardinality of two sets, this means that if A<=B
and B<=A, then A=B; that is A and B are equipollent.
Schroeder-Bernstein theorem
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic
Discrete mathematic

More Related Content

PPT
Set in discrete mathematics
PDF
Poset in Relations(Discrete Mathematics)
PPTX
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
PPTX
Relations in Discrete Math
PPT
Set theory
PPT
Discrete Math Lecture 01: Propositional Logic
PDF
Discrete maths questions
PPTX
Sets and relations
Set in discrete mathematics
Poset in Relations(Discrete Mathematics)
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Relations in Discrete Math
Set theory
Discrete Math Lecture 01: Propositional Logic
Discrete maths questions
Sets and relations

What's hot (20)

PPT
Asymptotic notations
PPT
Algebraic structures
PPT
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
PPTX
REAL ANALYSIS -UNIT I Basic Concepts.pptx
PPTX
Evaluating hypothesis
PPTX
Disjoint sets union, find
PDF
Relation matrix & graphs in relations
PPT
1. set theory
PPT
Relations
PDF
Chapter 2: Relations
PDF
Array data structure
PDF
Singular Value Decompostion (SVD)
PPTX
Propositional logic
PPTX
Bayes Theorem
PPT
how to calclute time complexity of algortihm
PDF
List,tuple,dictionary
PDF
Binary Search - Design & Analysis of Algorithms
PPT
Asymptotic Notation and Complexity
PPTX
Normal forms
Asymptotic notations
Algebraic structures
Discrete mathematics Ch1 sets Theory_Dr.Khaled.Bakro د. خالد بكرو
REAL ANALYSIS -UNIT I Basic Concepts.pptx
Evaluating hypothesis
Disjoint sets union, find
Relation matrix & graphs in relations
1. set theory
Relations
Chapter 2: Relations
Array data structure
Singular Value Decompostion (SVD)
Propositional logic
Bayes Theorem
how to calclute time complexity of algortihm
List,tuple,dictionary
Binary Search - Design & Analysis of Algorithms
Asymptotic Notation and Complexity
Normal forms
Ad

Similar to Discrete mathematic (20)

PPTX
Set Theory
PPTX
Set theory
PPTX
Sets in Maths (Complete Topic)
PPTX
Set theory for the Data Analysis and AI.pptx
PDF
unit-1.pdfSRM MATHS DISCREATE MATHS 2024
PDF
Digital text book sets
PPTX
General Mathematis with the Topic of SETs Story
PPTX
SESSION-1 PPT (1).pptx on discrete structures
PPT
Set theory-ppt
PDF
schaums-probability.pdf
PPT
Lesson 1 &2 -Set Theory and Functions.ppt
PPT
Introduction to set theory with application
PPT
A set is a structure, representing an unordered collection (group, plurality)...
PPT
SetTheory.ppt
PPT
SetTheory.ppt
PDF
Sets functions-sequences-exercises
PDF
Math arihant handbook.pdf all formula is here
PPTX
Unit 1 Set Theory-Engineering Mathematics.pptx
PPTX
Set theory. lesson. probability and statistics
PPTX
Sets.pptx
Set Theory
Set theory
Sets in Maths (Complete Topic)
Set theory for the Data Analysis and AI.pptx
unit-1.pdfSRM MATHS DISCREATE MATHS 2024
Digital text book sets
General Mathematis with the Topic of SETs Story
SESSION-1 PPT (1).pptx on discrete structures
Set theory-ppt
schaums-probability.pdf
Lesson 1 &2 -Set Theory and Functions.ppt
Introduction to set theory with application
A set is a structure, representing an unordered collection (group, plurality)...
SetTheory.ppt
SetTheory.ppt
Sets functions-sequences-exercises
Math arihant handbook.pdf all formula is here
Unit 1 Set Theory-Engineering Mathematics.pptx
Set theory. lesson. probability and statistics
Sets.pptx
Ad

Recently uploaded (20)

PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Well-logging-methods_new................
PDF
composite construction of structures.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Lecture Notes Electrical Wiring System Components
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
additive manufacturing of ss316l using mig welding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
web development for engineering and engineering
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Welding lecture in detail for understanding
R24 SURVEYING LAB MANUAL for civil enggi
Well-logging-methods_new................
composite construction of structures.pdf
Digital Logic Computer Design lecture notes
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Lecture Notes Electrical Wiring System Components
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
additive manufacturing of ss316l using mig welding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Embodied AI: Ushering in the Next Era of Intelligent Systems
CH1 Production IntroductoryConcepts.pptx
web development for engineering and engineering
Foundation to blockchain - A guide to Blockchain Tech
Welding lecture in detail for understanding

Discrete mathematic

  • 2. Unit-I Sets, Relations and Functions: Operations and Laws of Sets, Cartesian Products, Binary Relation, Partial Ordering Relation, Equivalence Relation, Image of a Set, Sum and Product of Functions, Bijective functions, Inverse and Composite Function, Size of a Set, Finite and infinite Sets, Countable and uncountable Sets, Cantor's diagonal argument and The Power Set theorem, Schroeder-Bernstein theorem. Unit-II Principles of Mathematical Induction: The Well-Ordering Principle, Recursive definition, The Division algorithm: Prime Numbers, The Greatest Common Divisor: Euclidean Algorithm, The Fundamental Theorem of Arithmetic. Basic counting techniques-inclusion and exclusion, pigeon-hole principle, permutation and combination. (A30506) DISCRETE MATHEMATICS B. Tech (CSE) III Semester
  • 3. Unit-III Propositional Logic: Syntax, Semantics, Validity and Satisfiability, Basic Connectives and Truth Tables, Logical Equivalence: The Laws of Logic, Logical Implication, Rules of Inference, The use of Quantifiers. Proof Techniques: Some Terminology, Proof Methods and Strategies, Forward Proof, Proof by Contradiction, Proof by Contraposition, Proof of Necessity and Sufficiency. Unit-IV Algebraic Structures and Morphism: Algebraic Structures with one Binary Operation, Semi Groups, Monoids, Groups, Congruence Relation and Quotient Structures, Free and Cyclic Monoids and Groups, Permutation Groups, Substructures, Normal Subgroups, Algebraic Structures with two Binary Operation, Rings, Integral Domain and Fields. Boolean Algebra and Boolean Ring, Identities of Boolean Algebra, Duality, Representation of Boolean Function, Disjunctive and Conjunctive Normal Form
  • 4. Unit-V Graphs and Trees: Graphs and their properties, Degree, Connectivity, Path, Cycle, Sub Graph, Isomorphism, Eulerian and Hamiltonian Walks, Graph Coloring, Coloring maps and Planar Graphs, Coloring Vertices, Coloring Edges, List Coloring, Perfect Graph, definition properties and Example, rooted trees, trees and sorting, weighted trees and prefix codes, Bi- connected component and Articulation Points, Shortest distances. Text books: 1. Kenneth H. Rosen, Discrete Mathematics and its Applications, 7th Edition, Tata McGraw – Hill 2. Susanna S. Epp, Discrete Mathematics with Applications,4th edition, Wadsworth Publishing Co. Inc. 3. C L Liu and D P Mohapatra, Elements of Discrete Mathematics A Computer OrientedApproach, 3rd Edition by, Tata McGraw – Hill.
  • 5. © Dr. Eric Gossett 5 What Is Discrete Mathematics? • What it isn’t: continuous • Discrete: consisting of distinct or unconnected elements • Countably Infinite • Definition Discrete Mathematics – Discrete Mathematics is a collection of mathematical topics that examine and use finite or countably infinite mathematical objects.
  • 6. Discrete mathematics is an essential part in Computer Science Engineering (i.e., CSE) as well as in Information Technology (i.e., IT) because: •It contains the logic development with respect to real life situations as well as to solve programming complexity. •It helps in learning Data Science, Deep Learning and Big data like courses. •The rules in algorithms are designed with the help of discrete mathematics. •To extract the data in database systems, we connect certain traits of piece of information. This is all done through the discrete math concept of sets. Importance of DM
  • 7. DM finds its application in variety of computer science domains including Machine Learning, Big Data, Cryptography etc. As a subject, unlike algebra and geometry, it is less about formulas and more about concepts. Game theory, Automata theory, Graph theory are all disciplines of Discrete Mathematics.
  • 8. 8 Sets: Learning Objectives • Learn about sets • Explore various operations on sets • Become familiar with Venn diagrams
  • 9. A set is defined as a collection of distinct objects of the same type or class of objects. The purposes of a set are called elements or members of the set. An object can be numbers, alphabets, names, etc. Examples of sets are: A set of rivers of India A set of vowels. A set of Vegetables Sets
  • 10. A set is denoted by the capital letter A, B, C, etc. while the fundamentals of the set by small letter a, b, x, y, etc. If A is a set, and a is one of the elements of A, then we denote it as a ∈ A. Here the symbol ∈ means -"Element of/ Belongs“. A={ Apple, Banana, Grapes, Kiwi, Star fruit,…etc} A set of fruits
  • 11. a) Statement form method In this, well-defined description of the elements of the set is given and the same are enclosed in curly brackets. Example: The set of odd numbers less than 7 is written as: {odd numbers less than 7 } b) Roster or tabular form: In this form of representation we list all the elements of the set within braces { } and separate them by commas. Example: If A= set of all odd numbers less then 10 then in the roster from it can be expressed as A={ 1,3,5,7,9}. c) Set Builder form: In this form of representation we list the properties fulfilled by all the elements of the set. We note as {x: x satisfies properties P}. and read as 'the set of those entire x such that each x has properties P.‘ Example: If B= {2, 4, 8, 16, 32}, then the set builder representation will be: B={x: x=2n, where n ∈ N and 1≤ n ≥5} Sets Representation:
  • 12. Standard Notations: x ∈ A x belongs to A or x is an element of set A. x ∉ A x does not belong to set A. ∅ Empty Set. U Universal Set. N The set of all natural numbers. I The set of all integers. I0 The set of all non- zero integers. I+ The set of all + ve integers. C, C0 The set of all complex, non-zero complex numbers respectively. Q, Q0, Q+ The sets of rational, non- zero rational, +ve rational numbers respectively. R, R0, R+ The set of real, non-zero real, +ve real number respectively.
  • 13. Standard Sets of Numbers 1. N = Natural numbers 2. W = Whole numbers 3. Z or I = Integers 4. E = Even natural numbers. 5. O = Odd natural numbers.
  • 14. The total number of unique elements in the set is called the cardinality of the set. The cardinality of the countable infinite set is count ably infinite. Examples: 1. Let P = {k , l, m, n} The cardinality of the set P is 4. 2. Let A is the set of all non-negative even integers, i.e. A = {0, 2, 4, 6, 8, 10......}. As A is countably infinite set hence the cardinality. Cardinality of a Sets:
  • 15. Types of Sets 1. Finite Sets 2. Infinite Sets 3. Subsets 4. Proper Subset 5. Improper Subset 6. Universal Set 7. Null Set or Empty Set 8. Singleton Set 9. Equal Set 10. Equivalent Sets 11. Disjoint Sets 12. Power Sets : The power of any given set A is the set of all subsets of A and is denoted by P (A). If A has n elements, then P (A) has 2n elements. Example: A = {1, 2, 3} P (A) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}.
  • 16. Operations on Sets The four basic operations are: 1. Union of Sets 2. Intersection of sets 3. Complement of the Set 4. Cartesian Product of sets For example; Let Ω={1,2,3,4,5,6,7,8} set A = {1,2,3, 4} and set B = {3,4, 5,6} A ∪ B = {2, 4, 5, 6, 7, 8} Therefore, A ∪ B = {x : x ∈ A or x ∈ B}
  • 17. Some properties of the operation of union: i. A∪B = B∪A (Commutative law) ii. A∪(B∪C) = (A∪B)∪C (Associative law) iii. A ∪ ϕ = A (Law of identity element, is the identity of ∪) iv. A∪A = A (Idempotent law) v. U∪A = U (Law of ∪) ∪ is the universal set. Notes: A ∪ ϕ = ϕ ∪ A = A i.e. union of any set with the empty set is always the set itself.
  • 18. For example; Let Ω={1,2,3,4,5,6,7,8} set A = {1,2,3, 4} and set B = {3, 4, 5,6} A ∩ B = { 3,4} Therefore, A ∩ B = {x : x ∈ A and x ∈ B} Some properties of the operation of intersection i. (A∩B = B∩A (Commutative law) ii. (A∩B)∩C = A∩ (B∩C) (Associative law) iii. ϕ ∩ A = ϕ (Law of ϕ) iv. U∩A = A (Law of ∪) v. A∩A = A (Idempotent law) vi. A∩(B∪C) = (A∩B) ∪ (A∩C) (Distributive law) Here ∩ distributes over ∪ vii. A∪(B∩C) = (AUB) ∩ (AUC) (Distributive law) Here ∪ distributes over ∩ Notes: A ∩ ϕ = ϕ ∩ A = ϕ i.e. intersection of any set with the empty set is always the empty set.
  • 19. Complement of a Set: The complement of a set, denoted A', is the set of all elements in the given universal set U that are not in A. In set- builder notation, A' = {x ∈ U : x ∉ A}. For example; Let Ω={1,2,3,4,5,6,7,8} set A = {1,2,3, 4} A' = { 5,6,7,8} Therefore, A' = {x ∈ U : x ∉ A } • The complement of a universal set is an empty set. • A set and its complement are disjoint sets.
  • 20. Some properties of complement sets (i) A ∪ A' = A' ∪ A = ∪ (Complement law) (ii) (A ∩ B') = ϕ (Complement law) (iii) (A ∪ B) = A' ∩ B' (De Morgan’s law) (iv) (A ∩ B)' = A' ∪ B' (De Morgan’s law) (v) (A')' = A (Law of complementation) (vi) ϕ' = ∪ (Law of empty set) (vii) ∪' = (ϕ and universal set)
  • 21. If A and B are two non-empty sets, then their Cartesian product A × B is the set of all ordered pair of elements from A and B. A × B = {(x, y) : x ∈ A, y ∈ B} For example; Let Ω={1,2,3,4,5,6,7,8} set A = {1,2,3, 4} and set B = {3, 4, 5,6} A × B = {(1,3),(1,4),(1,5),(1,6),(2,3),(2,4),(2,5),(2,6),(3,3),(3,4),(3,5),(3,6)(4,3),(4,4),(4,5),(4,6)} Therefore, A × B = {(x, y) : x ∈ A, y ∈ B} Cartesian product
  • 22. More laws of algebra of sets: 6. For any two finite sets A and B; (i) A – B = A ∩ B' (ii) B – A = B ∩ A' (iii) A – B = A ⇔ A ∩ B = ∅ (iv) (A – B) U B = A U B (v) (A – B) ∩ B = ∅ (vi) A ⊆ B ⇔ B' ⊆ A' (vii) (A – B) U (B – A) = (A U B) – (A ∩ B) 7. For any three finite sets A, B and C; (i) A – (B ∩ C) = (A – B) U (A – C) (ii) A – (B U C) = (A – B) ∩ (A – C) (iii) A ∩ (B - C) = (A ∩ B) - (A ∩ C) (iv) A ∩ (B △ C) = (A ∩ B) △ (A ∩ C)
  • 23. Laws of Algebra of Sets 1. Commutative Laws: For any two finite sets A and B; (i) A U B = B U A (ii) A ∩ B = B ∩ A 2. Associative Laws: For any three finite sets A, B and C; (i) (A U B) U C = A U (B U C) (ii) (A ∩ B) ∩ C = A ∩ (B ∩ C) Thus, union and intersection are associative. 3. Idempotent Laws: For any finite set A; (i) A U A = A (ii) A ∩ A = A 4. Distributive Laws: For any three finite sets A, B and C; (i) A U (B ∩ C) = (A U B) ∩ (A U C) (ii) A ∩ (B U C) = (A ∩ B) U (A ∩ C) Thus, union and intersection are distributive over intersection and union respectively. 5. De Morgan’s Laws: For any two finite sets A and B; (i) A – (B U C) = (A – B) ∩ (A – C) (ii) A - (B ∩ C) = (A – B) U (A – C) De Morgan’s Laws can also we written as: (i) (A U B)’ = A' ∩ B' (ii) (A ∩ B)’ = A' U B'
  • 24. Let P and Q be two non- empty sets. A binary relation R is defined to be a subset of P x Q from a set P to Q. If (a, b) ∈ R and R ⊆ P x Q then a is related to b by R i.e., aRb. If sets P and Q are equal, then we say R ⊆ P x P is a relation on P Example: (i) Let A = {a, b, c} B = {r, s, t} Then R = {(a, r), (b, r), (b, t), (c, s)} is a relation from A to B. (ii) Let A = {1, 2, 3} and B = A R = {(1, 1), (2, 2), (3, 3)} is a relation (equal) on A. Relations •If a set A has n elements, A x A has n2 elements. So, there are 2n2 relations from A to A. •If A has m elements and B has n elements. There are m x n elements; hence there are 2m x n relations from A to A.
  • 25. Domain and Range of Relation Domain of Relation: The Domain of relation R is the set of elements in P which are related to some elements in Q, or it is the set of all first entries of the ordered pairs in R. It is denoted by DOM (R). Range of Relation: The range of relation R is the set of elements in Q which are related to some element in P, or it is the set of all second entries of the ordered pairs in R. It is denoted by RAN (R). Example: 1.Let A = {1, 2, 3, 4} B = {a, b, c, d} R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}. DOM (R) = {1, 2} RAN (R) = {a, b, c, d}
  • 26. Complement of a Relation A relation R from a set A to set B. The complement of relation R denoted by R is a relation from A to B such that R = {(a, b): {a, b) ∉ R}. Example: X = {1, 2, 3} Y = {8, 9} R = {(1, 8) (2, 8) (1, 9) (3, 9)} Find the complement relation of R. R ={(2,9),(3,8)}
  • 27. Representation of Relations 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 Mij = 1 if (ai,bj )∈ R Example 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)} 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 A = {1, 2, 3, 4} R = {(1, 2) (2, 2) (2, 4) (3, 2) (3, 4) (4, 1) (4, 3)}
  • 28. 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. 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 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) 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. Example Let P = {1, 2, 3, 4} Q = {x, y, z, k} R = {(1, x), (1, y), (2, z), (3, z), (4, k)}.
  • 29. Composition of Relations Let A, B, and C be sets, and let R be a relation from A to B and let S be a relation from B to C. That is, R is a subset of A × B and S is a subset of B × C. Then R and S give rise to a relation from A to C indicated by R◦S and defined by: a (R◦S)c if for some b ∈ B we have aRb and bSc. is, R ◦ S = {(a, c)| there exists b ∈ B for which (a, b) ∈ R and (b, c) ∈ S} The relation R◦S is known the composition of R and S; it is sometimes denoted simply by RS. Let R is a relation on a set A, that is, R is a relation from a set A to itself. Then R◦R, the composition of R with itself, is always represented. Also, R◦R is sometimes denoted by R2. Similarly, R3 = R2◦R = R◦R◦R, and so on. Thus Rn is defined for all positive n.
  • 30. Example1: Let X = {4, 5, 6}, Y = {a, b, c} and Z = {l, m, n}. Consider the relation R1 from X to Y and R2 from Y to Z. R1 = {(4, a), (4, b), (5, c), (6, a), (6, c)} R2 = {(a, l), (a, n), (b, l), (b, m), (c, l), (c, m), (c, n)} (i) R1 o R2 = {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l),
  • 31. The composition relation R1o R1 -1 as shown in fig:
  • 32. Types of Relations 1. Reflexive Relation: A relation R on set A is said to be a reflexive if (a, a) ∈ R for every a ∈ A. Example: If A = {1, 2, 3, 4} then R = {(1, 1) (2, 2), (1, 3), (2, 4), (3, 3), (3, 4), (4, 4)}. Is a relation reflexive? Solution: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1, 1), (2, 2), (3, 3), (4, 4) ∈ R. 2. Irreflexive Relation: A relation R on set A is said to be irreflexive if (a, a) ∉ R for every a ∈ A. Example: Let A = {1, 2, 3} and R = {(1, 2), (2, 2), (3, 1), (1, 3)}. Is the relation R reflexive or irreflexive? Solution: The relation R is not reflexive as for every a ∈ A, (a, a) ∉ R, i.e., (1, 1) and (3, 3) ∉ R. The relation R is not irreflexive as (a, a) ∉ R, for some a ∈ A, i.e., (2, 2) ∈ R.
  • 33. 3. Symmetric Relation: A relation R on set A is said to be symmetric iff (a, b) ∈ R ⟺ (b, a) ∈ R. Example: Let A = {1, 2, 3} and R = {(1, 1), (2, 2), (1, 2), (2, 1), (2, 3), (3, 2)}. Is a relation R symmetric or not? Solution: The relation is symmetric as for every (a, b) ∈ R, we have (b, a) ∈ R, i.e., (1, 2), (2, 1), (2, 3), (3, 2) ∈ R but not reflexive because (3, 3) ∉ R. Example of Symmetric Relation: Relation ⊥r is symmetric since a line a is ⊥r to b, then b is ⊥r to a. Also, Parallel is symmetric, since if a line a is ∥ to b then b is also ∥ to a. 4. Antisymmetric Relation: A relation R on a set A is antisymmetric iff (a, b) ∈ R and (b, a) ∈ R then a = b. Example1: Let A = {1, 2, 3} and R = {(1, 1), (2, 2)}. Is the relation R antisymmetric? Solution: The relation R is antisymmetric as a = b when (a, b) and (b, a) both belong to R. Example2: Let A = {4, 5, 6} and R = {(4, 4), (4, 5), (5, 4), (5, 6), (4, 6)}. Is the relation R antisymmetric? Solution: The relation R is not antisymmetric as 4 ≠ 5 but (4, 5) and (5, 4) both belong to R.
  • 34. 5. Asymmetric Relation: A relation R on a set A is called an Asymmetric Relation if for every (a, b) ∈ R implies that (b, a) does not belong to R. 6. Transitive Relations: A Relation R on set A is said to be transitive iff (a, b) ∈ R and (b, c) ∈ R ⟺ (a, c) ∈ R. Example1: Let A = {1, 2, 3} and R = {(1, 2), (2, 1), (1, 1), (2, 2)}. Is the relation transitive? Solution: The relation R is transitive as for every (a, b) (b, c) belong to R, we have (a, c) ∈ R i.e, (1, 2) (2, 1) ∈ R ⇒ (1, 1) ∈ R. Note1: The Relation ≤, ⊆ and / are transitive, i.e., a ≤ b, b ≤ c then a ≤ c (ii) Let a ⊆ b, b ⊆ c then a ⊆ c (iii) Let a/b, b/c then a/c. Note2: ⊥r is not transitive since a ⊥r b, b ⊥r c then it is not true that a ⊥r c. Since no line is ∥ to itself, we can have a ∥ b, b ∥ a but a ∦ a. Thus ∥ is not transitive, but it will be transitive in the plane.
  • 35. 7. Identity Relation: Identity relation I on set A is reflexive, transitive and symmetric. So identity relation I is an Equivalence Relation. Example: A= {1, 2, 3} = {(1, 1), (2, 2), (3, 3)} 8. Void Relation: It is given by R: A →B such that R = ∅ (⊆ A x B) is a null relation. Void Relation R = ∅ is symmetric and transitive but not reflexive. 9. Universal Relation: A relation R: A →B such that R = A x B (⊆ A x B) is a universal relation. Universal Relation from A →B is reflexive, symmetric and transitive. So this is an equivalence relation.
  • 36. Consider a given set A, and the collection of all relations on A. Let P be a property of such relations, such as being symmetric or being transitive. A relation with property P will be called a P-relation. The P-closure of an arbitrary relation R on A, indicated P (R), is a P-relation such that R ⊆ P (R) ⊆ S Closure Properties of Relations (1) Reflexive and Symmetric Closures: The theorem tells us how to obtain the reflexive and symmetric closures of a relation easily. Theorem: Let R be a relation on a set A. Then: a. R ∪ ∆A is the reflexive closure of R b. R ∪ R-1 is the symmetric closure of R.
  • 37. Example1: Let A = {k, l, m}. Let R is a relation on A defined by R = {(k, k), (k, l), (l, m), (m, k)}. Find the reflexive closure of R. Solution: R ∪ ∆ is the smallest relation having reflexive property, Hence, RF = R ∪ ∆ = {(k, k), (k, l), (l, l), (l, m), (m, m), (m, k)}. Example2: Consider the relation R on A = {4, 5, 6, 7} defined by R = {(4, 5), (5, 5), (5, 6), (6, 7), (7, 4), (7, 7)} Find the symmetric closure of R. Solution: The smallest relation containing R having the symmetric property is R ∪ R-1,i.e. RS = R ∪ R-1 = {(4, 5), (5, 4), (5, 5), (5, 6), (6, 5), (6, 7), (7, 6), (7, 4), (4, 7), (7, 7)}.
  • 38. (2)Transitive Closures: Consider a relation R on a set A. The transitive closure R of a relation R of a relation R is the smallest transitive relation containing R. Recall that R2 = R◦ R and Rn = Rn-1 ◦ R. The following Theorem applies: Theorem1: R* is the transitive closure of R. Suppose A is a finite set with n elements. R* = R ∪R2 ∪.....∪ Rn Theorem 2: Let R be a relation on a set A with n elements. Then Transitive (R) = R ∪ R2∪.....∪ Rn Example1: Consider the relation R = {(1, 2), (2, 3), (3, 3)} on A = {1, 2, 3}.Then R2 = R◦ R = {(1, 3), (2, 3), (3, 3)} and R3 = R2 ◦ R = {(1, 3), (2, 3), (3, 3)} Accordingly, Transitive (R) = {(1, 2), (2, 3), (3, 3), (1, 3)}
  • 39. Equivalence Relations A relation R on a set A is called an equivalence relation if it satisfies following three properties: a. Relation R is Reflexive, i.e. aRa ∀ a∈A. b. Relation R is Symmetric, i.e., aRb ⟹ bRa c. Relation R is transitive, i.e., aRb and bRc ⟹ aRc.
  • 40. Example: Let A = {1, 2, 3, 4} and R = {(1, 1), (1, 3), (2, 2), (2, 4), (3, 1), (3, 3), (4, 2), (4, 4)}. Show that R is an Equivalence Relation. Solution: Reflexive: Relation R is reflexive as (1, 1), (2, 2), (3, 3) and (4, 4) ∈ R. Symmetric: Relation R is symmetric because whenever (a, b) ∈ R, (b, a) also belongs to R. (2, 4) ∈ R ⟹ (4, 2) ∈ R. Transitive: Relation R is transitive because whenever (a, b) and (b, c) belongs to R, (a, c) also belongs to R. (3, 1) ∈ R and (1, 3) ∈ R ⟹ (3, 3) ∈ R. So, as R is reflexive, symmetric and transitive, hence, R is an Equivalence Relation. Note1: If R1and R2 are equivalence relation then R1∩ R2 is also an equivalence relation.
  • 41. Let R be any relation from set A to set B. The inverse of R denoted by R-1 is the relations from B to A which consist of those ordered pairs which when reversed belong to R that is: R-1 = {(b, a): (a, b) ∈ R} Example1: A = {1, 2, 3} B = {x, y, z} Solution: R = {(1, y), (1, z), (3, y) R-1 = {(y, 1), (z, 1), (y, 3)} Clearly (R-1)-1 = R Note1: Domain and Range of R-1 is equal to range and domain of R. Example2: R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 3), (3, 2)} R-1 = {(1, 1), (2, 2), (3, 3), (2, 1), (3, 2), (2, 3)} Note2: If R is an Equivalence Relation then R-1 is always an Equivalence Relation. Inverse Relation
  • 42. Note 3: If R is a Symmetric Relation then R-1=R and vice-versa. Note 4: Reverse Order of Law (AOB)-1 = A-1 or B-1 (COBOA)-1 = A-1 or B-1 or C-1.
  • 43. Partial Order Relations A relation R on a set A is called a partial order relation if it satisfies the following three properties: a. Relation R is Reflexive, i.e. aRa ∀ a∈A. b. Relation R is Antisymmetric, i.e., aRb and bRa ⟹ a = b. c. Relation R is transitive, i.e., aRb and bRc ⟹ aRc. Example1: Show whether the relation (x, y) ∈ R, if, x ≥ y defined on the set of +ve integers is a partial order relation. Solution: Consider the set A = {1, 2, 3, 4} containing four +ve integers. Find the relation for this set such as R = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3), (1, 1), (2, 2), (3, 3), (4, 4)}. Reflexive: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1, 1), (2, 2), (3, 3), (4, 4) ∈ R. Antisymmetric: The relation is antisymmetric as whenever (a, b) and (b, a) ∈ R, we have a = b. Transitive: The relation is transitive as whenever (a, b) and (b, c) ∈ R, we have (a, c) ∈ R. Example: (4, 2) ∈ R and (2, 1) ∈ R, implies (4, 1) ∈ R.
  • 44. 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 of a Function: Let f be a function from P to Q. The set P is called the domain of the function f. Co-Domain of a Function: Let f be a function from P to Q. The set Q 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).
  • 45. Example: Find the Domain, Co-Domain, and Range of function. Let x = {1, 2, 3, 4} y = {a, b, c, d, e} f = {(1, b), (2, a), (3, d), (4, c)} If f: P → Q, then f (P) = {f(x): x ∈ P} = {y: y ∈ Q | ∃ x ∈ P, such that f (x) = y}. •Domain of function: {1, 2, 3, 4} •Range of function: {a, b, c, d} •Co-Domain of function: {a, b, c, d, e}
  • 46. If P and Q are two non-empty sets, then a function f from P to Q is a subset of P x Q, with two important restrictions. 1. ∀ a ∈ P, (a, b) ∈ f for some b ∈ Q 2. If (a, b) ∈ f and (a, c) ∈ f then b = c. If a set A has n elements, then there are nn functions from A to A. https://www.youtube.com/watch?v=i0TH4TC2 TwY
  • 47. Representation of a Function The two sets P and Q are represented by two circles. The function f: P → Q is represented by a collection of arrows joining the points which represent the elements of P and corresponds elements of Q Let X = {a, b, c} and Y = {x, y, z} and f: X → Y such that f= {(a, x), (b, z), (c, x)}
  • 48. Let X = {x, y, z, k} and Y = {1, 2, 3, 4}. Determine which of the following functions. Give reasons if it is not. Find range if it is a function. a. f = {(x, 1), (y, 2), (z, 3), (k, 4) b. g = {(x, 1), (y, 1), (k, 4) c. h = {(x, 1), (x, 2), (x, 3), (x, 4) d. l = {(x, 1), (y, 1), (z, 1), (k, 1)} e. d = {(x, 1), (y, 2), (y, 3), (z, 4), (z, 4)}.
  • 49. Types of Functions 1. Injective (One-to-One) 2. Surjective (Onto) 3. Bijective (One-to-One Onto) 4. Into 5. One-One Into 6. Many-One 7. Many-One Into 8. Many-One Onto
  • 50. 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. 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.
  • 51. 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. 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. 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.
  • 52. 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. 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.
  • 53. 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. Identity Functions 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
  • 54. 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)} f-1 ={(k, 1), (l, 3), (m,2)} Invertible (Inverse) Functions
  • 55. Compositions of Functions Two 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.
  • 56. (gof) (1) = g [f (1)] = g (a) = 5 (gof) (2) = g [f (2)] = g (a) = 5 (gof) (3) = g [f (3)] = g (b) = 7. 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.
  • 57. Example2: 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. a. If f and g are one-to-one, then the function (gof) (gof) is also one-to- one. b. If f and g are onto then the function (gof) (gof) is also onto. c. Composition consistently holds associative property but does not hold commutative property.
  • 58. Mathematical Functions 1. Floor Functions: 2. Ceiling Functions 3. Remainder Functions 4. Exponential Functions 5. Logarithmic Functions
  • 59. 1. Floor Functions: The floor function for any real number x is defined as f (x) is the greatest integer 1 less than or equal to x. It is denoted by [x]. Example: Determine the value of (i)[3. 5] (ii)[-2.4] (iii)[3. 143]. Solution: (i)[3 . 5] = 3 (ii) [-2 .4] = -3 (iii) [3. 143] = 3 2. Ceiling Functions: The ceiling function for any real number x is defined as h (x) is the smallest integer greater than or equal to x. It is denoted by [x]. Example: Determine the value of (i)[3. 5] (ii) [-2.4] (iii) [3. 143]. Solution: (i)[3. 5] = 4 (ii) [-2 .4] = -2 (iii) [3. 143] = 4.
  • 60. 3. Remainder Functions: The integer remainder is obtained when some a is divided by m. It is denoted by a (MOD m). We can also define it as, a (MOD m) is the unique integer t such that a = Mq + t. Here q is quotient 0 ≤ r < M. Example: Determine the value of the following: (i) 35 (MOD 7) (ii) 20 (MOD 6) (iii) 4 (MOD 9) (iv) 27(MOD 4) Solution: (i) 35 (MOD 7) = 0 (ii) 20 (MOD 6) = 2 (iii) 4 (MOD 9) = 4 (iv) 27(MOD 4)=3
  • 61. 4. Exponential Functions: Consider two sets A and B. Let A = B = I+ and also let f: A → B be defined by f (n) = kn. Here n is a +ve integer. The function f is called the base k exponential function. Note 1: kt= k. k. k.......k (t times). 2: k0=1,k-M= 1/kM 3. For rational number, a/b, the exponential function is Example: Determine the value of the following: (i) 103 (ii) 51/2 (iii) 3-5
  • 62. 5. Logarithmic Functions: Consider two sets A and B. Let A = B = R (the set of real numbers and also let f_n:A→B be defined for each positive integer n > 1 as fn (x)=logn(x) the base n of x. Note 1: k = logn x and nk are equivalent. 2. For any base n, logn 1=0 as n0=1. 3. For any base n, logn n=1 as n1=n. Example: Determine the value of the following: (i) log216 (ii) log2 100 (iii) log2 0.001. Solution: (i)log216 = 4 as 24=16. (ii)log2 100 = 6 as 26= 64 but 27=128 which is greater (iii)log2 0.001=-9 as 2-9=but 2-10=which is greater.
  • 63. The Rule of Sum and Rule of Product are used to decompose difficult counting problems into simple problems. The Rules of Sum and Product •The Rule of Product − If a sequence of tasks T1,T2,…,Tm can be done in w1,w2,…wm ways respectively and every task arrives after the occurrence of the previous task, then there are w1×w2×⋯×wm ways to perform the tasks. Mathematically, if a task B arrives after a task A, then |A×B|=|A|×|B|. •The Rule of Sum − If a sequence of tasks T1,T2,…,Tm can be done in w1,w2,…wm ways respectively (the condition is that no tasks can be performed simultaneously), then the number of ways to do one of these tasks is w1+w2+⋯+wm. If we consider two tasks A and B which are disjoint (i.e. A∩B=∅), then mathematically |A∪B|=|A|+|B|.
  • 64. Example 1− A boy lives at X and wants to go to School at Z. From his home X he has to first reach Y and then Y to Z. He may go X to Y by either 3 bus routes or 2 train routes. From there, he can either choose 4 bus routes or 5 train routes to reach Z. How many ways are there to go from X to Z? Solution − From X to Y, he can go in 3+2=5 ways (Rule of Sum). Thereafter, he can go Y to Z in 4+5=9 ways (Rule of Sum). Hence from X to Z he can go in 5×9=45 ways (Rule of Product). Example 2: How many bit strings of length seven are there? Solution: Since each bit is either 0 or 1, applying the product rule, the answer is 27 = 128. Example 3: How many different car license plates can be made if each plate contains a sequence of three uppercase English letters followed by three digits?
  • 65. Finite set: A set is said to be a finite set if it is either void set or the process of counting of elements surely comes to an end is called a finite set. In a finite set the element can be listed if it has a limited i.e. countable by natural number 1, 2, 3, ……… and the process of listing terminates at a certain natural number N. Infinite set: A set is said to be an infinite set whose elements cannot be listed if it has an unlimited (i.e. uncountable) by the natural number 1, 2, 3, 4, ………… n, for any natural number n is called a infinite set. A set which is not finite is called an infinite set. Examples of finite set: 1. Let P = {5, 10, 15, 20, 25, 30} Then, P is a finite set and n(P) = 6. 2. Let Q = {natural numbers less than 25} Then, Q is a finite set and n(P) = 24. 3. Let R = {whole numbers between 5 and 45} Then, R is a finite set and n(R) = 38. 4. Let S = {x : x ∈ Z and x^2 – 81 = 0} Then, S = {-9, 9} is a finite set and n(S) = 2. 5. The set of all persons in India is a finite set. 6. The set of all birds in HYD is a finite set. Examples of infinite set: 1. Set of all points in a plane is an infinite set. 2. Set of all points in a line segment is an infinite set. 3. Set of all positive integers which is multiple of 3 is an infinite set. 4. W = {0, 1, 2, 3, ……..} i.e. set of all whole numbers is an infinite set. 5. N = {1, 2, 3, ……….} i.e. set of all natural numbers is an infinite set. 6. Z = {……… -2, -1, 0, 1, 2, ……….} i.e. set of all integers is an infinite set.
  • 66. • A set S is finite if there is a bijection between S and {1, 2, . . . , n} for some positive integer n, and infinite otherwise. (I.e., if it makes sense to count its elements.) • Two sets have the same cardinality if there is a bijection between them. Cantor’s Diagonal Argument Note: “Bijection”, remember, means “function that is one-to-one and onto”.
  • 67. A set S is called countably infinite if there is a bijection between S and N. That is, A Set is countable, because you can count it label the elements of S. { 1, 2, . . . n} lable with N. * NOTE: not all infinite sets are countably infinite. In fact, there are infinitely many sizes of infinite sets. Georg Cantor proved a approach that the set of real numbers is not countable. That is, it is impossible to construct a bijection between N and R. In fact, it’s impossible to construct a bijection between N and the interval [0, 1] (whose cardinality is the same as that of R).
  • 68. Georg Cantor proved a approach that the set of real numbers is not countable. That is, it is impossible to construct a bijection between N and R. In fact, it’s impossible to construct a bijection between N and the interval [0, 1] (whose cardinality is the same as that of R).
  • 69. Cantor’s proof: Suppose that f : N → [0, 1] is any function.
  • 70. Statement: If there exist injective functions f:A->B and g: B->A between the sets A and B, Then there exists a bijective function h:A->B. In terms of the cardinality of two sets, this means that if A<=B and B<=A, then A=B; that is A and B are equipollent. Schroeder-Bernstein theorem