M-III Resourse Book (Comp)
M-III Resourse Book (Comp)
ISO 9001:2015 NBA NAAC Accredited AICTE-CII Survey rating Among Top 250 Colleges 68 & 78 in All India Rank by Outlook
Certified Accredited Institute in Platinum category for in NIRF Ranking survey published in June 2019 &
Industry linkages May 2018 respectively
Institute Programs with 'A' Grade 2019-20 & 2020-21
Mathematics-III
A.Y. 2024-25 (SE SEMESTER III (CS & E/COMP/IT))
Module 1 consists of Set Theory and Proofing Techniques, where Basic operations
on sets, Cartesian products, disjoint union (sum), power sets and laws of set theory are
discussed. Counting Principle, Basic counting techniques – inclusion and exclusion,
pigeon-hole principle.
Module 3 consists of Partially ordered set, where Partial Orderings & Partially
Ordered Sets, Hasse Diagrams, lattice, complete, distributive, modular and
complemented lattices was discussed with supported problems. Boolean and pseudo-
Boolean lattices were also studied.
Module 4 consists of Graph Theory, where Graph and Graph Models, Graph Terminology,
Special types of Graphs, Representing Graphs and Graph Isomorphism Paths and circuits,
Euler and Hamiltonian Graphs and concept of Trees were studied. Bipartite graph, Trees,
planner graph and graph coloring were also discussed with real life application-based
problems.
Module 5 consists of Logic, where propositions and logical operations, truth tables,
equivalence, implications, laws of logic, normal forms, predicates & quantifiers,
mathematical induction were studied in detailed and examples based on properties
were focused upon. Applications of Logic was discussed to solve real life problems.
Mathematical Induction.
1. Resource book is for structured and guided teaching learning process and
therefore learners are recommended to come with the same in every lecture.
2. Teaching will be done on the basis of resource book and home assignments will
be covered from the same for the benefit of the learners.
3. Resource book is framed to improve the academic result and therefore the
learners are recommended to take up all the module contents, home assignments and
exercise seriously.
4. A separate notebook should be maintained for every subject.
5. Lectures should be attended regularly. In case of absence, topic done in the class
should be referred from the module before attending the next lecture.
6. Motivation, weightage and pre‐requisite in every chapter have been included in
order to maintain continuity and improve the understanding of the content to
clarify topic requirement from exam point of view.
7. For any other additional point related to the topic instructions will be given by
the subject teacher from time to time.
Mathematics-III
SUBJECT RELATED
1. Neat and labelled diagram should be drawn as per the requirement of the question
mentioned in the question paper.
2. Read the question paper thoroughly first then choose the questions. Attempt the
one that you know the best first but do not change the internal sequence of the
sub questions.
3. Minimum passing marks in End Semester Examination (ESE) is 24/60 and
Internal Assessment (IA) comprising of In-Semester Examination (ISE – 20
marks) and Innovative Examination (IE – 20 marks) is 16/40 and in Term Work
10/25.
4. For further subject clarification/ doubt in the subject, learners can contact the subject
teacher.
Course Objectives:
The course intends to deliver the fundamental knowledge of set theory, function, relation,
pigeonhole principle, recurrence relation, generating function, partially order set, Lattice.
To prepare the students to understand various concepts in graph theory, Logic and
Algebraic Structure.
Course Outcomes:
Online References:
5 Logic 94-109
Set theory is a branch of mathematical logic that studies sets, which informally are
collections of objects. The language of set theory can be used in the definitions of nearly
all mathematical objects. Sets are important everywhere in mathematics because every
field of mathematics uses or refers them in some way. They are important for building more
complex mathematical structure.
2. Syllabus:
Module Content Duration Self-
Units study
Weightage
duration
4. Learning Objective:
1. Student shall be able to understand the concept of sets.
2. Student shall be able to understand the laws related to set and their real-life
application.
3. Student shall be able to know different types of Set operation.
4. Student shall be able to learn the counting principal of the set theory.
5. Student shall be able to know law of inclusion and exclusion.
Set Theory
Lecture: 01
XII. Proper subset: If A and B are two sets, then A is called the proper subset of B if A ⊆ B but
B ⊇ A i.e., A ≠ B. The symbol ‘⊂’ is used to denote proper subset. Symbolically, we write
A ⊂ B.
Note: i. No set is a proper subset of itself.
ii. Empty set is a proper subset of every set.
XIII. Operations on sets:
2
Mathematics – III (CS & E)
a. Union: If A and B are sets, then the set consisting of all elements that belong to A or
B is said to be union and it is denote by AB. Thus
AB = {x | x A or x B}
b. Intersection: If A and B are sets, then the set consisting of all elements that belong to both
A and B is said to be intersection and it is denote by A B. Thus AB = {x | x A and x
B}.
AUB U AB U
c. Disjoint sets: Two sets that have no common elements are called disjoint sets.
d. Complement of B with respect to A: If A and B are sets, then the set of all elements that
belong to A but not in B is said to be complement of B with respect to A and it is denote by
A – B. thus
A - B = {x | x A and x B}.
e. Symmetric difference: If A and B are sets, then the set of all elements that belong to
A or to B but not to both A and B is said to be symmetric difference and it is denote by
A B. Thus AB = {x | (x A and x B) or (x A and x B) } or AB = (A-B)∪ (B-
A). It is also represented by AB.
5. Sample Problem:
Q.1. Let U = {a, b, c, d, e, f, g, h, k}, A = {a, b, c, g), B = {d, e, f, g}, C = {a, c, f} and
D = {f,h,k} compute the following: (a) 𝐴 ∪ 𝐵 (b) 𝐴 ∩ 𝐶 (c) (𝐴 ∪ 𝐵) − 𝐶
(d) 𝐴 ∩ 𝐷 (e) 𝐴 ∪ 𝐵 (f) 𝐴 ⊕ 𝐵 (g) 𝐴 ∪ 𝐵 ∪ 𝐶 (h) 𝐴 ∩ 𝐵 ∩ 𝐶
(i) (𝐴 ∪ 𝐵) ∩ 𝐶 (j) 𝐴 ∩ 𝐵
(b) 𝐴 ∩ 𝐶 = {a, c}
(c) (𝐴 ∪ 𝐵) − 𝐶 ={b, d, e, g}
3
SE Semester III-CBCGS HME 2023-24
(e) 𝐴 ∪ 𝐵={h, k}
𝐴 ⊕ 𝐵 = {a, b, c, d, e, f}
(g) 𝐴 ∪ 𝐵 ∪ 𝐶 = {a, b, c, d, e, f, g}
(h) A B C = {}
(i) (𝐴 ∪ 𝐵) ∩ 𝐶 = {a, c, f}
(j) A∩B = {g}, 𝐴 ∩ 𝐵={a, b, c, d, e, f, h, k}
Exercise 1
2. Let the universal set be the set R of all real numbers and let
A {xR|1 x 5} and B {xR| 3 x 8}. Find each of the following
2. A A is
(a) U (b) (c) A (d) A
1. If a finite set A has n elements, prove that the power set of A has 2n elements.
2. Determine the sets A and B, given that
(i) A B = {1,2,4}, B A= {7,8} and A B = {1,2,4,5,7,8,9}.
4
Mathematics – III (CS & E)
Learning from the topic: Students will be able to understand the concept of sets.
Lecture -02
1. Learning Objective: Student shall be able to understand the laws of sets.
2. Introduction: Set theory follows some of the law related with its operations. These laws
are different from addition and subtraction of real numbers.
(i) Theorems:
1. Laws of idempotent: a) A∪A=A b)A∩A=A
2. Laws of commutativity: a) A∪B=B∪A b)A∩B=B∩A
3. Laws of associativity: a) (A∪B) ∪ C=A∪(B∪C) b) (A∩B)∩C=A∩(B∩C)
4. Laws of distributivity: a) A∩(B∪C) =(A∩B) ∪ (A∩C)
b) A∪(B∩C) = (A∪B) ∩ (A∪C)
g) A B A B
5
SE Semester III-CBCGS HME 2023-24
1. (A∩B)C=(AC)(BC)
2. A−(B∪C) =(A−B) ∩(A−C)
3. A−(B∩C) =(A−B) ∪(A−C)
4. AB=(A−B) ∪(B−A)
4. Key Notations:
1. R= the set of all real numbers.
2. Z: the set of all integers positive or negative including zero.
5. Sample Problem:
( A B) A U ( A B) A A ( A B) ( A A) ( A B)
U ( A B) A B RHS
Exercise 2
6
Mathematics – III (CS & E)
Learning from the topic: Students will be able to understand the laws of sets.
Counting Principle
Lecture -03
7
SE Semester III-CBCGS HME 2023-24
This can be seen by counting how many times each region in the figure to the right is
included in the right-hand side. More generally, for finite sets A1, ..., An one has the
identity
|⋃𝑛 𝐴𝑖| = ∑𝑛 (−1)𝑘+1(∑1≤𝑖 <⋯<𝑖 ≤𝑛|𝐴𝑖 ∩ … . .∩ 𝐴𝑖 |)A
𝑖=1 𝑘=1 1 𝑘 1 𝑘
4. Sample Problem:
Q.1. In a town there are 2000 literate persons. of them 60% read newspaper A, 55%
read newspaper B and 20% read neither A nor B. How many persons read (i) both
Solution: Let there be 100 literate persons in the town. Given that 20 of them do not
Exercise 3
1. It is known that at the university 60% of the professors play tennis, 50% of them play
bridge,70% jog, 20% play tennis and bridge, 30% play tennis and jog, 40% play bridge and
jog. If someone claimed that 20% of the professor’s jog and play bridge and tennis, would
you believe this claim? Why?
2. Thirty cars are assembled in a factory. The options available were a radio, AC and
white-wall tyres. It is known that 15 of the cars have radio, 8 of them AC and 6 of them white-
wall tyres. 3 of them have all 3 options. Find how many cars don’t have any options at
all.
3. 75 Children went to an amusement park where they can ride on the merry-go-round,
roller coaster and ferris wheel. It is known that 20 of them have taken all 3 rides, and 55
8
Mathematics – III (CS & E)
of them have taken at least two of the 3 rides. Each ride costs 0.50 Rs and the total
receipt of the amusement park was 70 Rs. Determine the number of children who did
not try any of the rides.
9
SE Semester III-CBCGS HME 2021-22
(a) Yes (b) No (c) don’t know
I. Suppose you select one course from each group without omission or substitution.
How many complete different four course dinner you can make out of this menu?
II. Suppose you select one course from each group A, B and D and two courses from
group C without omission or substitution. How many different dinner you can
make out of this menu?
2. A survey of a sample of 25 new cars being sold by an auto-dealer was conducted to see
which of the three options: air-conditioning, radio and power windows were already
installed. The survey found: 15 had air-conditioning, 12 had radio, 11 had power
windows, 5 had air-conditioning and power windows, 9 had air-conditioning and
radio, 4 had radio and power windows and 3 had all the three options. Find the number
of cars that had:
(a) only power windows (b) only one of the options (c) at least one option (d) none of
the options (e) air-conditioning and radio but not power windows.
3. A survey of 500 television viewers of a sports channel produced the following information:
285 watch crickets, 195 watch hockey, 115 watch football, 45 watch cricket and
football, 70 watch cricket and hockey, 50 watch hockey and football and 50 do not watch
any of the three kinds of games.
Learning from the topic: Students will be able to understand the real-life application
of Principal of inclusion and exclusion.
Pigeonhole Principal
Lecture -04
1. Learning Objective: Student shall be able to learn Pigeonhole Principal and counting
problems related to it.
2. Introduction: Pigeonhole principal is another counting principal. This principal talks
about the that there must be an object or objects with certain characteristic. For
example, if we consider the case of having been born on the same day of the week for
two people in a group of eight people then this theorem guarantees that there are at
least two people but does not identify the individual members.
3. Important Formulae/ Theorems / Properties:
(i) Pigeonhole Principle: If n pigeons are assigned to m Pigeonholes and m < n
then at least one Pigeonhole contains two or more pigeons.
(ii) The extended Pigeonhole Principle: If there are m Pigeonholes and more than
2m, 3m, …. Pigeons, then at least one Pigeonhole will have more than 2,
3,…..pigeons respectivily.
4. Sample Problem:
10
Mathematics – III (CS & E)
Q.1. If eight persons are chosen from any group, show that at least two of them will
have the same birthday.
Solution:
There are seven days in a week. These 7 days are 7 pigeonholes and 8 persons
from the group are 8 pigeons. Since there are more pigeons than the pigeonholes,
at least two persons will have the same birthday.
Q.2. If any 5 numbers are chosen from 1 to 8, show that the sum of two of them will
be 9.
Solution:
Let us construct 4 sets each containing two numbers out of the above 8 numbers such
that the sum of them is 9 as follows: (1,8), (2,7), (3,6), (4,5). Each of the 5 numbers
chosen from 1 to 8 must belong to one of these 4 sets. Since there are four sets and
we have chosen 5 numbers, the pigeonhole principle states that two of the chosen
numbers must belong to the same set.
Q.3. Show that in a group of 50 students at least 5 are born in the same month.
Solution:
Consider the months as pigeonholes and students as pigeons. Consider even
distribution, if there are 48 students, (48/12=4) 4 are born in each month. Since
there are 50 students at least 5 are born in the same month.
Exercise 4
1. If five points are taken in a square of side 2 units, show that atleast two of them are
̅
no more than ̅ √̅2̅ units apart.
2. Consider a regular hexagon whose sides are of length 1 unit. If any seven points are
chosen in the region bounded by the hexagon, show hat at least two of them will be
no more than 1 unit apart.
3. Consider an equilateral triangle whose sides are of length 3 units. If ten points are chosen
lying on or inside the triangle, then shoe that atleast two of them are no kore than 1 unit
apart.
4. Show that if any ten positive integers are chosen, two of them will have the same
remainder when divided by 9.
5. Show that any set of six positive integer whose sum is 13 must contain a subset
whose sum is three.
Let’s check the takeaway from lecture
Choose the correct option from the following:
1. If 7 colors are used to paint 50 bicycles at least how many bicycles will be of the
same color?
(a) 2 (b) 7 (c) 8 (d) 6
2. If nine persons are chosen from any group, then how many of them will have
the same birthday ?
(a) least two (b) least three (c) least four (d) don’t know
1. Show that if 7 numbers are chosen from 1 to 12 then two of them will add upto 13.
2. Show that among any group of 5 integers (not necessarily consecutive), there are two
with the same remainder when divided by 4.
3. If a fair die is thrown 7 times show that it will show one of the numbers 1,2,3,4,5 and
13
SE Semester III-CBCGS HME 2021-22
6 atleast twice.
4. If a number has 11digits then show that atleast two digits are repeated.
5. What is the least number of people required to guarantee that atleast two of them are
born (i) on the same day, (ii) in the same month?
Learning from the topic: Student will be able to learn Pigeonhole Principal and
counting problems related to it.
2 . Let A,B,C Be the three non-empty sets the under what condition is the following
statement is true.
(a) (A-B)∩ (A-C)=
(b) (A-B) (A-C)=
3. Six friends discover that they have total of Rs 21.61with them on a trip for movie
.Show that one or more of them have at least Rs 3.61.
3. Prove that if any 14 integers are chosen from 1 to 25 then one of them is a multiple of
another number in the subset.
5. Prove that 5+10+15+…+5n=5𝑛(𝑛+1) by mathematical Induction.
2
Level 2
1. Given that A-B=B what can be concluded about A and B .
2. Show that (A-B)-C=A-(BUC).
3. Show that there must be at least 90 ways to choose six integers from 1 to 15 so that all
the choices have the same sum.
4. Determine the cardinality of the set {n7: where n is a positive integer }
5. Prove by mathematical induction that n4-4n2 is divisible by 3 for all n≥ 2.
Level 3
1. Let A and b are two arbitrary set show that P(A∩ B)= P(A) ∩ P(B).
2. Show that for any integer n ,11𝑛+2 + 122𝑛+1 is always divisible by the 133.
3. How many friends must you have to guarantee at least five of them will have
birthday in same month?
4. Determine the number of integer between 1 and 250 that are divisible by any of
integers 2,3,5,7 .
12
Mathematics – III (CS & E)
5. Find the least n for which the statement true and then prove that (1+n2)<2n.
Digital references:
1) [Link]
2) [Link]
Learning Outcomes:
1. Know: Student should be able to
a) set theory
b) Mathematical induction
c) Pegion hole principale and its application.
2. Comprehend: Student should be able to comprehend concept of set theory and counting
principals and mathematical induction.
3. Apply, analyze and synthesize: Student should be able to
Apply set theory and counting principal aling with application of mathematical induction
Self-Evaluation
Add to Knowledge: Set theory is the mathematical theory of well-determined collections, called
sets, of objects that are called members, or elements, of the set. Pure set theory deals
exclusively with sets, so the only sets under consideration are those whose members are also
sets. The theory of the hereditarily-finite sets, namely those finite sets whose elements are
also finite sets, the elements of which are also finite, and so on, is formally equivalent to
arithmetic. So, the essence of set theory is the study of infinite sets, and therefore it can be
defined as the mathematical theory of the actual—as opposed to potential—infinite..
13
SE Semester III-CBCGS HME 2021-22
14
Mathematics – III (CS & E)
Module 2
Relation & Function
1. Motivation: The present module deals with the relation and functions. In particular,
the student should be able use the Concept of the relation and functions in higher
mathematics & their project work.
Two variables may be linked by some type of relationship. That brings us to the concept of
relations. In contrast, a function defines how one variable depends on one or more other
variables. There is nothing such as application of functions in our daily life. Like we use
differentiation to find velocity, integration to find areas and volumes, Linear
programming to get maximum profit, functions cannot be used like this, but it makes our
mathematics easy, it becomes hard to explain mathematics without functions.
2. Syllabus:
Lecture: 07
1. Learning Objective: Students shall be able to understand the mathematical modelling
of the Relation.
2. Introduction: A relation between two sets is a collection of ordered pairs containing one
object from each set. If the object x is from the first set and the object y is from the
second set, then the objects are said to be related if the ordered pair (x,y) is in the
relation. A function is a type of relation
Relation: If A and B are two non-empty sets, then a relation R from A to B is a subset of A x
B. If R ⊆ A x B and (a, b) ∈ R, then we say that a is related to b by the relation R, written as
a R b.
Inverse Relation:
If A and B are two non-empty sets and R be a relation from A to B, such that R = {(a, b) : a
∈A, b ∈ B}, then the inverse of R, denoted by R-1 , a relation from B to A and is defined by
R-1 = {(b, a) : (a, b) ∈ R}
(i) Void Relation: As Φ ⊂ A x A, for any set A, so Φ is a relation on A, called the empty or
Void relation.
(iii) Identity Relation: The relation IA = {(a, a): a ∈ A} is called the identity relation on A.
16
Mathematics – III (CS & E)
5. Sample Problem:
4. Let A= {eggs, milk, corn} and B= {cows, goats, hens} we can define a relation r from A
to b by (a, b)R if a is produced by the b.
Solution: The relation will be formed as R={(eggs, hens),(Milk, Cows),(Milk, Goat)}.
Exercise 07
1. Given A={1 ,2,3} and B={ a , b} then Find . (a) A×B (b) B×A (c) B×B.
2. Given that A= {1,2} ,b={ x, y, z} and c={3,4} Find A×B×C.
3. Find the Number of relation from A= {a, b, c} to B={1,2}.
4. Find x and y given that (2x , x+y)=(6,2)
5. Let R be the relation on the positive integer N defined by the equation x+3y=12 that is
R={(x , y): x+3y=12}.
6. Prove that (A×B)∩( A× C) =A× (B∩ 𝐶)
Lecture: 08
1. Learning objective: Students shall be able to understand the composition of two
relation and the pictorial representation of the Relation.
2. Introduction: Two Relation can be clubbed with each other by the process of
composition. The visual understanding of relation can be seen by its pictorial
representation.
3. Definition:
(1) Composition of Relation
Let R and S be two relations from sets A to B and B to C respectively, then we can
define Relation S o R from A to C such that (a, c) ∈ So R ⇔ ∃ b ∈ B such that
(a, b) ∈ R and (b, c) ∈ S. This relation S o R is called the composition of R and S.
(i) R o S ≠ S o R (ii) (S o R)-1 = R-1 o S-1
known as reversal rule.
(2) Representation of Relations of Finite set: Suppose A and B are finite sets. The
following are two ways of picturing a relation R from A to B.
(i) Form a rectangular array whose rows are labeled by the elements of A and whose
columns are labeled by the elements of B. Put a 1 or 0 in each position of the
array according as aAis or is not related to bB. This array is called the matrix of
the relation.
(ii) Write down the elements of A and elements of b in two disjoint disks and then draw
an arrow from aA to bB whenever a is related to b. This picture will be
called the arrow diagram of the relation.
(iii) There is another way of picturing a relation R when R is relation from a finite
set to itself. First, we write down all the elements of the set and then we draw
an arrow from each element x to the element y whenever x is related to y. This
diagram is called diagraph or directed graph of the relation.
(i) Draw a small circle for each element of A and write the element in that
circle. These circles are called vertices.
(ii) If the element 𝑎𝑖 is related to the element 𝑎𝑗 i.e., 𝑎𝑖𝑅𝑎𝑗 draw a straight line
or an arc with an arrow in the direction from 𝑎𝑖 to 𝑎𝑗. Such a straight line or
an arc with an arrow is called an edge.
(iii) If an element 𝑎𝑖 is related to itself, we draw an arc with an arrowhead starting and
ending at 𝑎𝑗. Such an arc is called a loop.
(iv) The resulting pictorial representation is called directed graph or diagraph
of R.
(v) Thus, if a relation R on A is represented by a digraph, then the edges and
loops in the diagraph correspond to the pairs in R and the vertices
correspond to the element of A.
(vi) Conversely if a diagraph is given, we can write the set of the corresponding
relation.
4. Sample Problem:
(1) Suppose that A = {1,2,3} and B = {1,2}. Let R be the relation from A to B
containing (a,b) if a ∈ A, b ∈ B, and a > b. What is the matrix representing R
(Assuming the ordering of elements is the same as the increasing numerical
order)?
Solution: Because R = {(2,1), (3,1),(3,2)}, the matrix is
0 0
MR=[1 0]
1 0
(2) Let A = {a1,a2, a3} and B = {b1,b2, b3,b4, b5}. Which ordered pairs are in the
relation R represented by the matrix.
0 1 0 0 0
MR=[1 0 1 1 0]
1 0 1 0 1
Solution: Because R consists of those ordered pairs (ai,bj) with mij = 1, it follows
that: R = {(a1, b2), (a2, b1),(a2, b3), (a2, b4),(a3, b1), {(a3, b3), (a3, b5)}.
(4) Let A={a,b,c,d} and let r be the relation on A that has a Matrix.
1 0 0 0
0 1 0 0
MR=[ ]
1 1 1 0
0 1 0 1
Solution:
b
c
a
19
SE Semester III-CBCGS HME 2021-22
d
The diagraph of the relation R is shown in the figure. The following table gives the
indegree and outdegree of all the vertices. Note that sum of all the indegrees must
equal the sum of all out degrees.
a b c D
In-degree 2 3 1 1
Out- degree 1 1 3 2
(3). Let A={1,4,5} and Let R be given by the diagraph shown in the following figure
5
1 0 1 1
Solution: MR= 4 [1 1 0] R= {(1,4),(1,5),(4,1),(4,4),(5,4),(5,5)}
5 0 1 1
Exercise 08
1. Let A= {a, b, c} and let r and s be the relation on A whose Matrices are
1 0 1 1 0 0
MR= [1 1 1] & Ms= [0 1 1] then show that MSoR=MR ×MS .
0 1 0 1 0 1
2. Let A= {a , b} ,R={(a, a) ,(b, a) , (b, b) } and .Then find SoR and RoS.
3. Let A={1,2,3,4} and let R={(1,1) ,(1,2), (2,3) ,(2,4) (3,4) ,(4,1) ,(4,2) } S={ (3,1) ,(4,4) ,(2,3)
,(2,4) ,(1,1) ,(1,4)} Than compute RoR, SoR, RoS ,SoS .
4. Find the Relation represented by the diagraph.
2
1 3
5 4
5. If A={1,2,3,4} ,B={1,4,6,8,9} if aRb if and only if b=a2 and aSb if and only if a<b than
find R and S , is Ros possible to evaluate .
1. Let X = {4, 5, 6}, Y = {a, b, c} and Z = {l, m, n}. Consider the relation R1 from X to Y and
20
Mathematics – III (CS & E)
R2 from Y to Z. R1 = {(4, a), (4, b), (5, c), (6, a), (6, c)} and R2 = {(a, l), (a, n), (b, l), (b,m),
(c, l), (c, m), (c, n)} than composition of R1 o R2 is
(a) {(4, l), (4, n), (4, m), (5, l), (5, m), (n, n), (6, l), (6, m), (m, n)}
(b) {(4, l), (n, 4), (4, m), (l, 5 ), (5, m), (5, n), (6, l), (6, m), (6, n)}
(c) {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (6, l), (6, m), (6, n)}
(d) {(4, l), (4, n), (4, m), (5, l), (5, m), (5, n), (l, l), (6, m), (n, n)}
2. The R o R in the above example is
(a) {(2, 2), (3, 2), (2, 3), (3, 4), (2, 2), (4, 5), (5, 2), (5, 3), (5, 5)}
(b) {(2, 2), (3, 2), (3, 3), (3, 4), (4, 2), (4, 5), (5, 2), (5, 3), (5, 5)}
(c) {(2, 2), (3, 2), (3, 3), (5, 4), (5, 2), (4, 5), (5, 2), (5, 3), (5, 5)}
(d) {(2, 2), (3, 2), (3, 3), (3, 4), (4, 2), (4, 4), (5, 2), (5, 4), (5, 5)}
]
0 0 1 1
1 0 0 0
1 1 0 0 0
⎡0 0 1 1 0⎤
2. Let A={a, b, c, d, e} and MR= 0 0 0 1 1 than find the diagraph of It.
⎢0 1 1 0 0⎥
[1 0 0 0 0]
3. Let R be the Relation whose diagraph is given as
1 3
7 5
6
If R is defined on {1,2,3} and S is defined on {4,5,6,7} then find RoS.
4. What are the ordered pairs in the relation represented by this directed graph?
21
SE Semester III-CBCGS HME 2021-22
Lecture: 09
1. Learning objective: Students shall be able to understand the properties of the relation and
the partial order Relation.
2. Introduction: In many applications to the computer science and applied mathematics,
we deal with relations on the set A rather than relations from A to B. Moreover, these
relation s often satisfy certain properties.
3. Definition:
(i ) Reflexive Relation: A relation R is said to be reflexive relation if every element of A
is related to itself. Thus, (a, a) ∈ R, ∀ a ∈ A = R is reflexive.
(ii) Symmetric Relation: A relation R is said to be symmetric relation, iff (a, b) ∈ R (b, a)
∈ R, ∀ a, b ∈ A i.e., a R b ⇒ b R a, ∀ a, b ∈ A ⇒ R is symmetric.
(vii) Total Order Relation: A Relation R on a set A is said to be a total order relation on
A, if R is a partial order relation on A.
22
Mathematics – III (CS & E)
4. Sample Problems:
(3,3) } .
Q (2) Let m, n and d be integers with d 0. Then if d divides (m-n), denoted by d | (m-n),
i.e. m-n=dk for some integer k, then we say m is congruent to n modulo d, written simply
as m ≡n (mod d).
Solution: Let R be the relation of congruence modulo 3 on the set of all integers, i.e. m R
n m n (mod) 3 3 | (m-n) . Show R is an equivalence relation.
(b) Symmetric: for any m,n if mRn, i.e. m n (mod 3) then there exists a k such
that m-n =3k. This means n-m=3(-k), i.e. n m (mod 3), implying finally nRm. For
(c) Transitive: for any m,n,p , if mRn and nRp, then there exists r,s such that m-n =3r
and n-p=3s. Hence m-p=(m-n)+(n-p)=3(r+s), i.e., mRp.
We thus conclude that R is an equivalence relation
Exercise 09
23
SE Semester III-CBCGS HME 2021-22
2. Let A = {a, b, c} and relation R= {(a, a), (b, b), (c, c), (b, c)} n a set A, then R is
(a) transitive relation (b) Symmetric relation (c) equivalence relation (d) None of these
3. A relation R on a set of real numbers defined as R ={(a,b): a ≤ b2 } is
(a)Reflexive (b) Symmetric (c) Transitive (d) None of the above
5. Let A = {1,2,3}, which of the following is not an equivalence relation on A?
(a) {(1,1,), (2,2,), (3,3)} (b) {(1,1,), (2,2,), (3,3), (1,2), (2,1)} (c) {(1,1,), (2,2,), (3,3), (2,3), (3,2)}
(d) None of the above.
Homework Problems for the day
1. Determine the Relation on R on the set A is reflexive, irreflexive, symmetric,
asymmetric, antisymmetric, or transitive.
(i) A=Z+, aRb if and only if a=bk for some k∈ 𝑍+ .
(ii) A is the set of all order pair of real numbers (a,b) R (c,d) if and only if a=c.
2. If A=Z+×Z+; (a, b) R (c, d) if and only if b=d. Check it is an equivalence relation or not?
3. Let S = {1,2,3,4,5} and A=S X S define the following relation R on A: (a, b) R (a’, b’) if and
only if ab’=a’b.
(i) Show that R is an Equivalence Relation.
(ii) Compute A/R
4. Let A= {a, b, c, d, e} and R is Relation on A defined by
24
Mathematics – III (CS & E)
1 1 1 0 1
⎡1 1 1 0 1⎤
MR= 1 1 1 0 1
⎢0 0 0 1 0⎥
R. [1 1 1 0 1]
Compute A/
Operation On the Relation
Lecture: 10
1. Learning objective: Students shall be able to understand the operation on the Relation.
2. Introduction: Up till now we have seen the relation and its classifications. Now we
proceed towards the operations on relation which together with relation form the
Mathematical Structure.
3. Definition:
Complementary Relation: Let R and S be Relations from Set A to Set B. If we remember that R
ans S are simply subset of AXB Complement of R, 𝑅̅ is referred as Complementary Relation. It
can be explained by a 𝑅̅ b if and only if a𝑅 b.
4. Sample Example:
Q (1): Let A= {1,2,3,4} and B= {a, b, c}. Let R= {(1, a), (1, b), (2, b), (2, c), (3, b), (4, a)}
And S= {(1, b), (2, c), (3, b), (4, b)} than compute ( a) 𝑅̅ (b) R∩S (c) R∪S and (d) R-1
Solution:
Exercise 10
2. Let R be a Relation from A to B and let S be a relation from B to C. Then for A1 which is subset of A
we have SoR(A1)=S(R(A1)).
3. Let R and S be symmetric relation s on the set A. Prove or disprove that R-S is also a
symmetric relation on A.
4. Let A, B and C be sets, R a relation from a to B and S a Relation from b to c Then prove that
(SoR)-1=R-1oS-1 .
5.
25
SE Semester III-CBCGS HME 2021-22
2. Let A=B=C= Set of real number . Let R and S be the following relation from A to B and
From B to C respectively R={(a,b): a≤2b} and S={(b,c): b≤3c} than is (2,3)∈ 𝑅𝑜𝑆 .
Lecture: 11
1. Learning objective: Students shall be able to understand the concept of closure of a relation
and methods to find the closure.
2. Introduction: The closure of a relation R with respect to property p is
the relation obtained by adding the minimum number of ordered pairs to r to obtain property
p. in terms of the digraph representation of R.
3. Definition:
(i) Reflexive Closure: If R is a relation on a set A then the smallest relation which is reflexive
and Contain R is called the Reflexive closure of R.
(ii) Symmetric Closure: If R is a relation on a set A then the smallest relation on A which is
symmetric and contain R is called the symmetric closure of R.
(iii) Transitive closure: If R is a relation on a set A then the smallest transitive relation on A
which contain R is called Transitive closure of R it is represented by 𝑅∞.
(iv) Warshall’s Algorithm: A general method to find the transitive closure is available. It
is known as Warshall’s algorithm .Let R be a relation on a set A={a 1,a2,…,an}.
Interior vertices
If x1,x2,…xm is a path in R, then any vertices other than x1 and xm are called interior
vertices of the path.
Boolean matrix Wk (n matrices with size n-by-n): For 1 ≤ k ≤n, Wk has a 1 in position
i , j if and only if there is a path from ai to aj in R whose interior vertices, if any, come
from the set {a1,a2, …, ak}
Wn=M R∞
26
Mathematics – III (CS & E)
Since any vertex must come from the set {a1,a2,…,an}, it follows that the matrix Wn has a
1 in position i , j if some path in R connects a i with aj
Let W0=MR and Support Wk-1=[sij] is known, let Wk=[tij] then if tij =1, then there must
be a path from ai to aj whose interior vertices come from the set {a1,a2, …,ak}.
Case 1: If ak is not an interior vertex of this path, then all interior vertices must actually
come from the set {a1,a2,…ak-1}, so sij=1.
i aj
Case 3: if m>n, there must have some vertex appearing two times in the path (why?),
saying xi = xj, where i<j . x0, x1, …, xi, …, xj, xj+1 … xm there must exists another path
from x0 to xm with length less than m (why?), x0, x1, …, xi, xj+1 … xm Therefore, if x0 R ∞
xm , we can find the shortest path from x 0 to xm with length less than or equal to n
(why?) , namely x0 R k xm 1≤ k≤ n
Step 2: List the locations p1,p2,… in column k of Wk-1, where the entry is 1 and the
locations q1,q2,… in row k of Wk-1, where the entry is 1
3. Sample Examples:
Q(1) Let A={ 1,2,3,4} and R={(1,2),(2,3),(3,4),(2,1)} Find the transitive closure of R.
27
SE Semester III-CBCGS HME 2021-22
1 3
The diagraph of R is shown in the figure Since 𝑅∞ is the transitive closure we can proceed
geometrically by computing all pathes. We see that from vertex 1 we have the path for the vertex
2,3,4 and 1 . Note that path from 1 to 1 proceeds from 1 to 2 to 1. Thus we see that the orderd pair
(1,1) ,(1,2),(1,3) and (1,4) are in 𝑅∞ Starting from the vertex 2 we have path to the vertex 2,1,3 and
4 so the ordered pair (2,1),(2,2),(2,3) and (2,4) are in 𝑅∞.The only other path is from vertex 3
to 4 so we have
𝑅∞={(1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3),(2,4),(3,4)}
Q(2) Let A={1,2,3} consider the relation on the set A is R={ (1,1),(1,2),(1,3),(3,3) } Then
reflexive closure of R
Solution: R’={(1,1),(1,2)(1,3),(2,2),(3,3)}
0 1 0 0
1 0 0 1
MR
0 0 0 1
0 0 0 0
Solution:
28
Mathematics – III (COMP)
1110 1111
1111
pi: 1, 2 pi: 1, 2
1110 W3
W2
0001 qj: 4 0001 qj: ф
0000 0000
M R W4 W3
Exercise 11
3. Let A={1,2,3,4} for the relation R whose matrix is given below, find the matrix of
transitive closure by using Warshall’s Algorithm
1 0 0 1 1 1 0 0
MR= 0 1
0 0
(i) [ 1 0
] (ii) MR = [ 0
]
0 0 1 0 0 0 0 0
0 0 0 1 0 0 1 0
0 0 0 1 1 1 0 0
M =[ 0 0] 0 0]
R
0 0 and Ms =[ 1 0
0 1 0 0 0 0 1 0
0 0 1 0 0 1 0 1
2. In the given graph, how many intermediate vertices are required to travel from node a to
31
SE Semester III-CBCGS HME 2021-22
a) 2 b) 0 c) 1 d) 3
1 0 0 1 0 0 0 1
0 1 1 0] (ii) MR=[ 1 0 0 1]
(i) MR=[
0 1 1 0 0 1 0 1
1 0 0 1 0 0 1 0
1 0 1 0 1 0 1 0 1 0
⎡0 0 0 1 0⎤ ⎡1 1 0 0 1⎤
MR= 1 0 0 0 0 and Ms= 1 1 1 0 0
⎢0 0 1 1 0⎥ ⎢0 1 0 0 0⎥
[1 0 1 0 0] [0 1 0 1 0]
Lecture: 12
1. Learning objective: Students shall be able to understand the concept of function and
type of function.
2. Introduction: The closure of a relation R with respect to property p is
the relation obtained by adding the minimum number of ordered pairs to r to obtain property
p. in terms of the digraph representation of R.
3. Definition:
(i) Let A and B be nonempty sets. A function f from A to B, denoted f: A → B is an
assignment of each element of A to exactly one element of B. We write f(a) = b if b is the
unique element of B assigned by the function f to the element a of A.
or
A function f:A → B can also be defined as a subset of A×B (a relation). This subset is restricted
to be a relation where no two elements of the relation have the same first element.
A is called the domain of f. B is called the codomain of f. If f(a) = b, then b is called the
image of a under f. and a is called the preimage of b. The range of f is the set of all
32
Mathematics – III (COMP)
images of points in A under f. We denote it by f(A). Two functions are equal when they
have the same domain, the same codomain and map each element of the domain to the
Injection: A function f is said to be one-to-one , or injective, if and only if f(a) = f(b) implies that
a = b for all a and b in the domain of f. A function is said to be an injection if it is one- to-
one.
Surjection: A function f from A to B is called onto or surjective, if and only if for every
element b ∈ B there is an element a ∈ A with f(a) = b. A function f is called a surjection if it
is onto.
4. Sample Example:
Q (2) Let f be the function from {a, b, c, d} to {1,2,3} defined by f(a) = 3, f(b) = 2, f(c) = 1, and
f(d) = 3. Is f an onto function?
Solution: Yes, f is onto since all three elements of the codomain are images of elements in
the domain. If the codomain were changed to {1,2,3,4}, f would not be onto.
Q (3) Is the function f(x) = x2 from the set of integers to the set of integers onto?
Solution: No. For example, f is not onto because there is no integer x with x2 = −1.
Q (4) Let A=B=R, the set of real numbers. Let f: A B be given by the formula f(x)=2 x3-1
3 1 1
and Let g: B A be given by g(y)=√ 𝑦 + . Show that f is bijection from A to B and g is
2 2
bijection between B and A.
3
1 3 3 1 1
Solution: Let x∈A and y=f(x)=2x -1. Then (y+1) =x therefore x=√ 𝑦 + =g(y) =gof(x)
2 2 2
33
SE Semester III-CBCGS HME 2021-22
Exercise 12
1. Given f:Z->Z. Find whether function is one-to-one and whether it is onto. If the function
is not onto, determine range f(Z). f(x)=x 2+x.
3. Define Bijective function. Show that the function f: R - {2/5} -> R – {4/5} defined by f(x) =
(4x+3)/(5x-3) is a bijection.
4. A={1,2,3,4}, B={1,2,3,4,5,6}. How many functions are there from B to A. How many are
one-to- one and how many onto?
a) 1 b) 2 c) 3 d) 0.5
Lecture: 13
1. Learning Objective: Student will understand composition of the function and analyze the
existence of its inverse and generating function.
2. Introduction: The application of the function starts with the operation of the function
where two functions can be combined is called composition of two function. The
inverse of the function is f -1 which maps the function from codomain to domain.
3. Definition:
34
Mathematics – III (COMP)
Note that g ◦ f is not defined, because the range of f is not a subset of the domain of g.
Q (2). Let f and g be the functions from the set of integers to the set of integers defined
By f (x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What is the
Composition of g and f ?
Solution:
Both the compositions f ◦ g and g ◦ f are defined. Moreover,
and
1. Let f: A→B and g: B→A verify that g=f-1 where A=B=set of Real numbers and
f(a)=𝑎+1 and g(b)=2b-1.
2
35
Mathematics – III (COMP)
2. Let f be a function from A to b. Find f-1
(i) where A= {x: x is real and x≥ -1}; B= {x : x is real and x≥0} ; and f(a)=√𝑎 + 1
(ii) where A=B=R: f(a)=a3+1
3. Let f(x,y)=(2x-y,x-2y) ,(x,y)R X R ,Show that f is one to one and find Inverse of F.
4. Let A=B=C=R and let f: A→B, g: B→C. Defined by f(a)=a+1 and g(b)=b2+2 find
(a) (gof) (-2) (b) (fog)(-2) (c) (gof)(x) (d) (fog)(x)
Let’s check the takeaway from lecture
1. If f is a function defined from R to R, is given by f(x) = 3x – 5 then f –1(x) is given by
(a) 1/(3x-5) (b) (x+5)/3 (c) does not exist since it is not a bijection (d) none of the
Mentioned
2. For an inverse to exist it is necessary that a function should be
(a) injection (b) bijection (c) surjection (d) none of the mentioned
1. Let A=B=C=R and let f: A→b, g: B→ c be defined by f(a)=a-1 and g(b)=b2 then find
(i) (fog) (2) (ii) (gof)(2) (iii) (gof) (x) (iv) (fog)(x)
2. Let f(n) be the number of divisors of n, nZ+. Determine whether f is one to one or
onto (or both or neither).
3. Let A=B=C=R and consider the function f: A→B and g: B→ C defined by f(a)=2a+1,
g(b)=b/3. Verify the theorem that (gof) -1=f-1og-1.
4. Let f: A→ B and g:B→ C be functions . Show that if gof is one -one then f is one one.
5. If A set has ‘n’ element, then how many bijections are there from A to A.
Generating Function
Lecture: 14
1. Learning objective: Students shall be able to understand the concept of Generating function.
2. Introduction: We introduce an alternative way to represent Numeric function. For a
numeric function (a 0, a1 ,a2…ar…) we define an infinite series a0+a1 Z+a2 z 2+a3
z3+…+arzr+.. which is called Generating function of a numeric function of a.
3. Definition and Formulae:
(i) The generating function for the sequence a0, a1,…, ak, … of real numbers is
the infinite series 𝑘=0 G(x)=a0+a1x+ . . .+ak
xk +. . . =∑∞ 𝑎kxk
⚫ Generating functions for finite sequences of real numbers can be defined by extending
a finite sequence a0,a1, … , an into an infinite sequence by setting an+1 = 0, an+2 =
0, and so on.
⚫ The generating function G(x) of this infinite sequence {an} is a polynomial of degree n
because no terms of the form ajxj with j > n occur, that is,
37
SE Semester III-CBCGS HME 2023-24
(ii) Let u be a real number and k a nonnegative integer. Then the extended binomial
𝑢
coefficient ( ) is defined by
𝑘
𝑢−𝑘+1
𝑢 𝑢(𝑢 − 1)(𝑢 − 2). . . 𝑖𝑓 𝑘 > 0
( ){ 𝑘!
𝑘 1 𝑖𝑓 𝑘 = 0
4. Sample Example:
Q(1) What is the generating function for the sequence 1,1,1,1,1,1?
Solution: The generating function of 1,1,1,1,1,1 is
1 + x + x2 + x3 + x4 + x5.
since, we have (x6 − 1)/(x −1) = 1 + x + x2 + x3 + x4 + x5
when x ≠ 1.
Consequently G(x) = (x6 − 1)/ (x −1) is the generating function of the sequence.
Q (2) Find the number of solutions of e1 + e2 + e3 = 17, where e1, e2, and e3 are
nonnegative integers with 2 ≤ e1≤ 5, 3 ≤ e2 ≤ 6, and 4 ≤ e3 ≤ 7.
Solution: The number of solutions is the coefficient of x17 in the expansion of
(x2 + x3 + x4 + x5) (x3 + x4 + x5 + x6) (x4 + x5 + x6 + x7).
This follows because a term equal to is obtained in the product by picking a term in the
first sum xe1, a term in the second sum xe2, and a term in the third sum xe3, where
e1 + e2 + e3 = 17.
There are three solutions since the coefficient of x17 in the product is 3.
Exercise: 14
1. Find the generating function of the sequence 1, a, a2, a3, . . . ,
2. In how many ways can eight identical cookies be distributed among three distinct
children if each child receives at least two cookies and no more than four cookies?
4. Find the values of the extended binomial coefficients −2 and 1/2
( ) ( )
3 3
Let’s check the takeaway from lecture
1. What is the sequence depicted by the generating series 4 + 15x2 + 10x3 + 25x5 + 16x6+⋯?
a) 10, 4, 0, 16, 25, … b) 0, 4, 15, 10, 16, 25,… c) 4, 0, 15, 10, 25, 16,… d) 4, 10, 15, 25,…
38
Mathematics – III (COMP)
a) (1+6𝑥) c)
𝑥3 b) (1−6𝑥)
1 1 d) 1-6x2
(1−4𝑥)
39
SE Semester III-CBCGS HME 2023-24
2. Use generating functions to determine the number of ways to insert tokens worth $1,
$2, and $5 into a vending machine to pay for an item that costs r dollars in both the
cases when the order in which the tokens are inserted does not matter and when the
order does matter. (For example, there are two ways to pay for an item that costs $3
when the order in which the tokens are inserted does not matter inserting three $1
tokens or one $1 token and a $2 token. When the order matters, there are three ways:
inserting three $1 tokens, inserting a $1 token and then a $2 token, or inserting a $2 token and
then a $1 token.)
Level 1
0 1 0 1
1
MR=[ 0 1 1]
0 1 0 0
1 1 0 0
Level 2
1. Explain whether the Relation R on the set is reflexive, Symmetric or transitive where
R is defined on A= {1,2,3,4,5}=B as aRb if and only if a is multiple of b.
2. Let S be the product set {1,2,3}X {a, b}. How many relations are there on S?
40
Mathematics – III (COMP)
Level 3
1. Prove or disprove that if a relation r on a set A is transitive and irreflexive, then it is
symmetric.
2. Let a={1,2,3,4} and consider the partition P={{1,2,3},{4}} of A. Find the equivalence
relation R on A determined by P.
3. For the relation whose matrix is follows
1 0 0 0 0 1
⎡0 1 1 0 1 0⎤
MR = 0 0 0 1 0 1
1 0 0 1 0 1
⎢0 0 1 0 1 0⎥
[0 1 0 0 1 1]
Determine whether R is reflexive, irreflexive, symmetric, asymmetric or transitive.
4. Find the Generating function for nCk , ak .
5. Find the generating function of ak.
Digital references:
1) [Link]
2) [Link]
Learning Outcomes:
1. Know: Student should be able to know
a) Relations
b) Function
c) Generating function.
2. Comprehend: Student should be able to comprehend concept of Relation, Function and
Generating function.
3. Apply, analyze and synthesize: Student should be able to Apply Relation, Function and
Generating Function to solve the problems.
Add to Knowledge: A function in very abstract terms can be thought of as something that
will take an input and produce an output. It depends on the function what kind of input it
will take and what output it will give. But, to imagine, It can be thought of as a machine or a
box which gives an output for a particular value of the input. So, where should one look for it
in day to day lives? It can be seen anywhere, for example, Weatherman takes a reading from
the thermometer. The thermometer usually gives a reading in Celsius or Fahrenheit. The
weatherman then converts it using some formula. That formula can be thought of as
39
something which resides in the “Function Machine” box given in the figure above. It takes
input temperature in degree Celsius and converts it into Fahrenheit. Now, can one reading of
degree celsius give us two different temperature outputs in Fahrenheit? No. That’s why a rule
is put on the function machine that it cannot give two outputs on taking one input.
SE Semester III-CBCGS HME 2021-22
Self-Assessment
1. Are you able to distinguish the different types of relations and functions?
(a) Yes (b) No
4. Will you able to solve the pictorial representation of relation, properties of relation,
partial ordering relation?
(a) Yes (b) No
5. Are you able to find the difference relations and functions and recursively defined
functions?
(a) Yes (b) No
40
Mathematics – III (COMP)
Module 3
Partially Ordered Set(POSET)
1. Motivation: Poset is a branch of mathematical logic that studies sets, which informally are
collections of objects. The language of POset can be used in the definitions of nearly all
mathematical objects. Sets are important everywhere in mathematics because every field of
mathematics uses or refers them in some way. They are important for building more complex
mathematical structure.
2. Syllabus:
4. Learning Objective:
1. Student shall be able to understand the concept of Partially ordered set.
2. Student shall be able to know different types of relations and to identify Poset & draw
Hasse Diagram.
3. Student shall be able to learn pictorial presentation of relation from Hasse diagram
4. Student shall be able to understand chain and draw chain.
5. Students shall be able to understand the lattice
6. Students shall be able to understand the concept of Boolean algebra
Posets, Hasse Diagram, chain
Lecture 15
1. Learning Objective: students shall be able to understand the concept of Poset, Hasse
diagram and chain.
2. Introduction: The concept of ordering does not exist in the theory of sets but if we want
to induct the concept of ordering in a set. This is possible by introducing the concept of
partial ordering on a set.
3. Definition /Formulae:
43
SE Semester III-CBCGS HME 2021-22
(i) Partial Ordering Relation: A relation R on a set is called a partial ordering or partial
order if it is reflexive, antisymmetric and transitive.
(ii) (a) Antisymmetric Relation: A relation R on a set is called antisymmetric if whenever
A partial ordering is shown in (a) of the figure above. The loops due to the reflexive
property are deleted in (b). The edges that must be present due to the transitive property
are deleted in (c). The Hasse diagram for the partial ordering (a), is depicted in (c).
To represent a finite PO set (S, ≼) using a Hasse diagram, start with the directed graph of
the relation:
Remove the loops (a, a) present at every vertex due to the reflexive property.
Remove all edges (x, y) for which there is an element z ∈ S such that x ≺ z and z ≺ y.
These are the edges that must be present due to the transitive property.
Arrange each edge so that its initial vertex is below the terminal vertex. Remove all the
arrows because all edges point upwards toward their terminal vertex.
44
Mathematics – III (COMP)
Remark: The graphical representation of a partial ordering relation in which all arrowheads are
understood to be pointing upward is called the Hasse diagram of the relation.
Remark: The word ordering implies that the objects in the set are ordered according to
some properties or criteria.
4. Sample Example:
Q 1: Show that the “greater than or equal” relation (≥) is a partial ordering on the set of
integers. Is (Z, ≥) PO set?
Solution: To check relation ≥ is partial ordering and (Z, ≥) PO set.
a) Reflexivity: a≥a for every integer.
b) Anti Symmetric: If a≥b and b≥a then a=b.
c) Transitivity: If If a≥b and b≥c then a≥c.
Thus ≥ is a partial ordering relation and hence (Z, ≥) is PO set.
Q 2: Let A = {1, 3, 9, 18} and R is the relation ‘≤’. Prove that (A, ≤) is PO set and draw Hesse
diagram.
Exercise 15
1. Show that the inclusion relation (⊆) is a partial ordering on the power set of a set S. Is
(P(A), ⊆) PO set?
2. Determine whether the relation R is a partial order on set A.
(i) A=Z and aRb iff a=2b.
(ii) A=Z and aRb if and only if b2│a
3. Let A = {1,2,3,4} and R = {(1,1), (2,2), (3,3),(4,4), (1,3), (1,4), (2,3), (2,4), (3,4)}. draw its
Hasse diagram.
45
SE Semester III-CBCGS HME 2021-22
1. Let a set S = {2, 4, 8, 16, 32} and ≤ be the partial order defined by aRb, if a divides b.
Number of edges in the Hasse diagram of is
a) 6 b) 5 c) 9 d) 4
(i) A=Z and aRb if and only if a=bk for some k∈Z+. Note that k depends on a and b
2. Draw the Hasse diagram of D36, where D36 is set of divisors of 36.
3. Determine the Hasse diagram of the relation on A= {1,2,3,4,5} whose matrix is shown as
1 1 1 1 1
⎡0 1 1 1 1⎤
MR= 0 0 1 1 1
⎢0 0 0 1 1⎥
[0 0 0 0 1]
4. Let B= {2,3,6,9,12,18,24} and let A=B X B. Define the following relation on A: (a, b) <(a’,b’)
if and only if a│a’ and b ≤ b’ ,where ≤ is the usual partial order. Show that < is a partial
order.
Lecture 16
1. Learning Objective: students shall be able to understand the concept of Upper bound
and lower bound in a poset.
2. Introduction: Certain elements of a poset are of special importance for many properties and
applications of poset. when order or defined on the elements of a set. It raises the question
of greatest element and least element of a set. The concept of greatest and least element leads
to upper bound and lower bound of a poset.
3. Definition /Formulae:
(i) Comparability: The element a and b of a PO set (S, ≤) are comparable if either a≤b or
b≤a. When a and b are elements of S so that neither a ≰ b or b ≰ a. then a and b are called
incomparable.
46
Mathematics – III (COMP)
(ii) Totally ordered set/ Chain: If (S, ≤) is a PO set and every two elements of S are
comparable, S is called a totally ordered or linearly ordered set, and ≤ is called a total order
or a linear order. A totally ordered set is called a chain.
(iii) Well, ordered: (S, ≤) is a well-ordered set if it is PO set such that ≤ is a totally ordering
and every nonempty subset of S has a least element.
(iv) Maximal Element: Let (A, ≤) be a PO set and a ϵ A . Then the element a is said to be
maximal element of A if there is no b such that a ≤ b. In other words, if in a PO set an element
is not related to any other element.
(v) Minimal Element: Let (A, ≤) be a PO set and a ϵ A. Then the element a is said to be
minimal element of A if there is no b such that b ≤ a. In other words, if in a PO set no element
is related to an element.
(vi) Maximum Element (Greatest Element): Let (A, ≤ ) be a PO set and a ϵ A . Then the
element a is said to be maximum element of A if x ≤ a , for all x ϵ A. In other words, if it is a
maximal element and every element is related to it.
(vii) Minimum Element (Least Element): Let (A, ≤ ) be a PO set and a ϵ A . Then the
element a is said to be minimum element of A if a ≤ x, for all x ϵ A. In other words, if it is a
minimal element and it is related to every element in a PO set.
(viii) Upper Bound (w.r.t subset): Let (A, ≤) be a PO set and B ⊂ A. An element x ϵ A is an upper
bound of B if y≤x for all y in B.
(ix) Lower Bound (w.r.t subset): Let (A, ≤) be a PO set and B ⊂ A. An element x ϵ A is an upper
bound of B if x ≤y for all y in B.
(x) Least Upper Bound (w.r.t subset): Let (A, ≤) be a PO set and B ⊂ A. An element a ϵ A is
a least upper bound of B if it is an upper bound of B such that a≤a whenever a is the upper bound
of B.
(xi) Greatest Lower Bound (w.r.t subset): Let (A, ≤) be a PO set and B ⊂ A. An element a ϵ
A is a greatest lower bound of B if it is a lower bound of B such that a≤a whenever a is the lower
bound of B.
4. Sample Example:
Q 1: Consider the Poset A={a, b ,c ,d ,e ,f ,g ,h} ,whose Hasse diagram is shown in the figure
below .Find all upper and lower bound s of the following subset of A : (a) B1={a ,b } ; (b)
B2={c ,d ,e}
g
f
47
SE Semester III-CBCGS HME 2021-22
d e
c
a b
Solution: (a) B1 has no lower bound, its upper bounds are c , d ,e ,f ,g and h.
(b) The upper bound of B2 are f , g ,f and h ; its lower bounds are c ,a and b.
Q 2: In the above example with the subset B1 and B2 as defined in the example. Find all least
upper bounds and all greatest lower bounds of (A) B 1 ; (b) B2 .
Solution: (a) Since B1 has no lower bounds, so it has no greatest lower bound. However
LUB(B1)= c.
(b) Since the lower bounds of B 2 are c ,a ,and b we find that GLB (B 2 )=c .The upper bound
of B2 are f ,g and h . since f and g are not comparable, we conclude that B 2 has no least upper
bound.
Exercise 16
1. A= {x: x is a real number and 0≤x<1 } with usual partial order ≤. Then find its all minimal
and maximal Elements.
2. Find all the minimal and maximal elements of A= {2 ,3 ,4 ,6 ,8 ,24 ,48} with partial order
of divisibility.
3. Prove that a poset Has at most one greatest element and at most one least element.
5. Determine the Greatest and least element of the following set if it exist
f e
(i) (ii) (iii) 5
d e d 4
c
b c 2 3
a a b 1
2. Let A be the poset of nonnegative real numbers with usual partial order ≤. Then maximal
element of it
4. find the greatest and least element from the partial ordered set on A={2 ,3 ,4 ,6 ,12 ,18 ,24
,36} with partial order of divisibility.
Lattice
Lecture 17
1. Learning Objective: students shall be able to understand the concept of Lattice.
2. Introduction: A poset when becomes more concrete it generates the structure of lattice. It
is quite similar like the structure of the lattice
(ii) Meet: glb or mert or ∧. In other words, greatest among all lower bounds.
(iii) Join Semi Lattice: (lub or V) For every pair of elements lub or join exists then PO set is
called joint Semilattice.
(iv) Meet Semi Lattice : (glb or ∧) For every pair of elements lub or join exists then PO set is
called joint Semilattice.
49
SE Semester III-CBCGS HME 2021-22
(v) Lattice: If a PO set is both joint and meet semilattice then it is called lattice. T hus lattice
is 1. PO set (set L, ≤) 2. 0 element is 0 ≤ x, for every in L 3. I element x ≤ I, for every in L.
(vi) Finite and infinite Lattice: Lattice can be finite as well as infinite (L, V, ∧). The number
of elements are finite then it is finite lattice otherwise infinite lattice.
(vii) Dn: It is a set of all positive integers less then n and divides n.
4. Sample Example:
Q 1: From the Hasse diagram of the PO set prove that the poset is lattice or not
i
h
g
e f
d
b c
a
Solution: Let us find the joint and meet of every pair of elements
∨ a b c d e f g h i
a a b c d e f g h i
b b b e d e h g h i
c c e c g e f g h i
d d d g d g i g i I
e e e e g e h g h I
f f h f i h f i h I
g g g g g g g i i I
h h h h i h h i h I
i i i i i i i i i i
∧ a b c d e f g h i
50
Mathematics – III (COMP)
a a a a a a a a a a
b a b a b b a b b b
c a a c a c c c c c
d a b a d b a d b d
e a b c b e c e e e
f a a c a c f c f f
g a b c d e c g e g
h a b c b e f e h h
i a b c d e f g h i
Since for every pair of points there exist joint and meet hence the above poset is the lattice.
Exercise 17
e f
d
d
c
b c
b
a
a
2. Prove that D30 is a lattice.
(b) a∧ (b ∧ c)= (a ∧ b) ∧ c
2. If every two elements of a poset are comparable then the poset is called
(i) g (ii) g
e f h f
d d e
b c c
a a b
(i) If a≤ b the aV c ≤ b V c
(ii) a∧ c ≤ b∧ c
2. Introduction: Sub lattice is the concept which shows that one part of the lattice also can
be following all the properties of lattice. It leads to the concept of different kind of lattice.
3. Definition:
(i) Dual in Lattice: The dual of any statement in a lattice (L, V, ∧) is defined to be the
statement obtained by interchanging V & ∧.
(ii) Sublattice: Let (L , ≤) be a lattice. A non-empty Subset S of L is called a sublattice if for each
a ∈ S and b ∈ S, ( a V b)∈S and ( a ∧b) )∈S. In other words, if S is a nonempty subset of a
lattice L such that every pair of (a , b) of two elements of S has a join and meet then S is
called a sublattice.
52
Mathematics – III (COMP)
(iii) Bounded Lattice: A lattice is bounded if it has a greatest element (I) and least element
(0).
(iv) Compliment of a element in a Lattice: Let, (L, V, ∧) be a bounded lattice with 0 & I as
least and greatest elements, For any a, b ∈L. If a, V b= I and a ∧b=0 then a and b are called
compliment of each other. Every element of lattice need not have compliment. If compliment
exist, then need not be unique.
(v) Compliment Lattice: A lattice (L, V, ∧) is complimented if every element has at least one
compliment.
(vi) Distributive Lattice: A lattice (L, V, ∧) is Distributive lattice if for all a , b c ∈L we get,
1. a V ( b ∧ c)= ( a V b) ∧ (b V c)
2. a ∧ ( b V c)=:( a ∧b) V (b∧ c)
4. Sample Example:
Q 1. For the given structure answer the following: Is it lattice? , Subset {a, b, c, e} is a
53
SE Semester III-CBCGS HME 2021-22
This subset is not a lattice as join of d , e does not exist. Hence it is not sublattice.
Exercise 18
1. For the given structure answer the following: 1. Is it lattice? , 2. Subset {x, a, y, b} is a
lattice? , [Link] {x, a, c, y} is a lattice? ,4. Subset {x, c, d, y} is a lattice? ,5. Subset
{x, b, d, y} is a lattice?
1 1
a c
c a b
0 0
1. If a lattice has a greatest element and a least element which satisfy 0 ≤ a ≤1 for every a
in the lattice then lattice L is
a) semilattice b) join semilattice c) meet semilattice d) bounded lattice
2. If every two elements of a poset are comparable then the poset is called
a) sub ordered poset b) totally ordered poset c) sub lattice d) semigroup
Homework problem for the Day
2. Find all the sublattice of D24 that contain at least five elements
b c
Boolean Algebra
Lecture 19
1. Learning Objective: students shall be able to understand the concept of Boolean algebra.
2. Introduction: There are certain type of lattice which are important for computer science and
its applications. These lattices are known as Boolean lattice, and it leads to an algebraic structure
which is called Boolean algebra.
3. Definition:
(i) Boolean Lattice: A compliment and distributive lattice (L, ∨ , ∧) is called Boolean Lattice.
(ii) Boolean Algebra: An algebraic structure (L, ∨, ∧,-,0,I) defined by the Boolean lattice is
called Boolean Algebra.
(iii) Every element in a Boolean lattice has a unique compliment. Unary binary operation is
referred as a complementation operation and denoted by ‘-’.
4. Sample Example:
55
SE Semester III-CBCGS HME 2021-22
Solution: x=x ∨ (𝒙 ∧ 𝒂)
=(𝒙 ∨ 𝒙 ) ∧ (𝒙 ∨ 𝒂)
=x∧ (𝒙 ∨ 𝒂)
= x∧ (𝒂 ∨ 𝒙)
=𝒙 ∧ (𝒂 ∨ 𝒚)=(𝒙 ∧ 𝒂) ∨ (𝒙 ∧ 𝒚) = (𝒂 ∧ 𝒙) ∨ (𝒙 ∧ 𝒚) = (𝒂 ∧ 𝒚) ∨ (𝒙 ∧ 𝒚)
=(𝒂 ∧ 𝒙 ) ∨ 𝒚 = (𝒂 ∧ 𝒚) ∨ 𝒚 = 𝒚
Exercise 19
d e e f f e g
b c d b d c
b c
a a a
2. Are there are any Boolean algebra having three elements why or why not.
3. Show that in a Boolean algebra for any a and b ,a ≤ b if and only if b’≤ a’.
(𝑎 ∧ 𝑏) ∨ (𝑎 ∧ 𝑏′) = 𝑎
a) A b) A’ c) 1 d) 0
56
Mathematics – III (COMP)
1. Show that in a Boolean algebra ,for any a and b ,a=b if and only if (𝑎 ∧ 𝑏′) ∨ (𝑎′ ∧ 𝑏) = 0
2. Show that in a Boolean algebra for any a , b and c ,if a ≤ b then (𝑎 ∧ 𝑐) ≤ (𝑏 ∧ 𝑐).
Level 1
1. Determine the Hasse diagrame of the relation on A={1 ,2 ,3 ,4 ,5} whose matrix is
shown as .
1 0 1 1 1
⎡0 1 1 1 1⎤
MR= 0 0 1 1 1
⎢0 0 0 1 0⎥
[0 0 0 0 1]
2. Determine whether the relation R is a Linear order on the set A where A=R and aRb
if and only if a≤ b.
3. Find the minimal Elements of The Poset
4 5
1 2
.
4. Prove that any linear order is distributive lattice.
5. Is the following lattice is Boolean algebra or not?
b c
57
SE Semester III-CBCGS HME 2021-22
Level 2
1. Let A={ 2,4,6,8,12,18,24,36,72} with partial order of divisibility. Draw its Hasse
diagram.
2. Give an example of partial on A={a ,b ,c ,d ,e} that has two maximal element and has
no least element.
3. Let A= {a ,b ,c ,d ,e ,f ,g ,h} and R is the Relation defined as follows
1 1 1 1 0 0 0 0
⎡0 1 0 1 0 0 0 0⎤
⎢0 0 1 1 0 0 0 0⎥
0 0 0 1 0 0 0 0⎥
MR= ⎢
⎢1 1 1 1 1 1 1 1⎥
⎢0 1 0 1 0 1 0 1⎥
⎢0 0 1 1 0 0 1 1⎥
[0 0 0 1 0 0 0 1]
Level 3
1. Find all upper bound of B and all the lower bound of B ,the least upper bound of B
and greatest lower bound of B={3 ,4 ,6}
5 8
4 6 9
3 7
1 2
2. Let A= {2,3,4 . . . , 100 } with partial order of divisibility .How many maximal elements
does ( A ,≤ ) have ?, Give a subset of A that is a linear order under divisibility and is as
large as possible.
3. Prove that if a and b are the elements in a bounded, distributive lattice and if a has a
complement a’ then
(i) 𝑎 ∨ (𝑎′ ∧ 𝑏) = 𝑎 ∨ 𝑏 (𝑖𝑖) 𝑎 ∧ (𝑎′ ∨ 𝑏) = 𝑎 ∧ 𝑏
4. Let n=p1 .p2 . . . pk, where the pi are distinct primes. Then Dn is a Boolean algebra.
58
Mathematics – III (COMP)
5. Show that the lattice whose Hasse diagram is shown as follows is not a Boolean
algebra. I
a f
e d
b c
Digital references:
1) [Link]
2) [Link]
Learning Outcomes:
1. Know: Student should be able to know
b) Lattices
c) Boolean algebra.
3. Apply, analyze, and synthesize: Student should be able to Apply Partial order relation
59
SE Semester III-CBCGS HME 2021-22
Self-Evaluation
2.
(a) Yes (b) No
3.
(a) Yes (b) No
4.
(a) Yes (b) No
5.
(a) Fully understood (b) Partially understood (c) Not at all
60
Mathematics – III (COMP)
Module 4
Graph Theory
1. Introduction: In the last four decades Graph Theory has established itself as a worthwhile
mathematical discipline. The development of many branches in mathematics has been
necessitated while considering certain real-life situations arising in practical life problems
arising in other branches of study. Graph theory also has been independently discovered
many times through some puzzles that are arose from physical world, consideration of
chemical isomers, electrical networks etc. Any real-world situation can be conveniently
represented on a paper by means of a diagram consisting of a set of points or nodes
together with lines or curves joining some or all pairs of these points which is called a
graph. In this module we give the mathematical definition of graph and study some of
graphs and operations on graphs.
2. Syllabus:
Self-study
Module Content Duration Weightage
duration
3. Learning Objective:
1. Student shall be able to define Graphs and its terminology.
2. Student shall be able to Know graph models.
3. Student shall be able to learn special types of graphs.
4. Student shall be able to learn to represent Graphs and Graph isomorphism.
5. Student shall be able to learn about Paths and circuits.
6. Student shall be able to identify Euler and Hamiltonian Graphs.
7. Student shall be able to Know tree and Prefix Code.
Lecture: 21
Graphs: A Graph G = (V,E) consist of nonempty set V of Vertices or nodes or points and a
set of E of Edges or curve or line. Each edge has either one or to vertices associated with it is
called its endpoints. An edge is said to be CONNECT its end points.
61
SE Semester III-CBCGS HME 2023-24
Example: This graph is with four vertices and five edges.
Remarks:
The graphs we study here are unrelated to graph of function studied.
We have a lot of freedom when we draw a picture of graph. All that matter is the
connection made by the edges not the particular geometry depicted, For example the
lengths of edges whether edges cross how vertices are depicted and so on do not
matter.
A graph with the infinite vertex set is called an infinite graph. A graph with finite
vertex set is called finite graph.
Some Terminology
In a simple graph each edge connects two different vertices, and no two edges
connect the same pair of vertices.
Multigraphs may have multiple edges connecting the same two vertices. When m
different edges connect the vertices u and v we say that {u,v} is an edge with
multiplicity m.
An edge that connects a vertex to itself is called loop.
An pseudograph may include loops as well as multiple edges connecting the same
pair of vertices.
Remark: There is no standard terminology for graph theory. So, it is crucial that you
understand the terminology being used whenever you read material about graphs.
DIRECTED GRAPHS
Definition: A directed graph (or digraph) G = (V, E) consists of a nonempty set V of vertices
(or nodes) and a set E of directed edges (or arcs). Each edge is associated with an ordered pair
62
Mathematics – III (COMP)
of vertices. The directed edge associated with the ordered pair ( u, v) is said to start at u and
end at v.
Remark: Graphs where the end points of an edge are not ordered are said to be undirected
graphs.
SOME TERMINOLOGY (CONTINUED)
A simple directed graph has no loops and no multiple edges.
Example:
Example: Show that the in a simple graph having n vertices, there can be atmost n(n-
1)/2 edges.
Solution: For a given n vertices we can join any two of them to get a simple graph.
n(n 1)
But n vertices can be taken two at time in nC ways. Hence, we will have at
2
2
most n(n-1)/2 edges.
Exercise 21
E = {( v1 ,v2), ( v2 ,v2), ( v2 ,v3), ( v2 ,v5), ( v2 ,v4), ( v4 ,v5)} then draw the graph.
Learning from the topic: Students will be able to understand the concept of Simple
graph.
Lecture: 22
Graph terminology & special types of graphs:
Definition 1. Two vertices u, v in an undirected graph G are called adjacent (or neighbors)
in G if there is an edge e between u and v. Such an edge e is called incident with the vertices u
and v and e is said to connect u and v.
Definition 2. The set of all neighbors of a vertex v of G = (V, E), denoted by N(v), is called
the neighborhood of v. If A is a subset of V, we denote by N(A) the set of all vertices in G that
are adjacent to at least one vertex in A. So,
Definition 3. The degree ( or valency ) of a vertex in a undirected graph is the number of edges
incident with it, except that a loop at a vertex contributes two to the degree of that vertex.
The degree of the vertex v is denoted by deg (v) or d(v).
Example: What are the degrees and neighborhoods of the vertices in the graphs G and H?
Solution:
deg(e) = 3, deg(g) = 0.
N(a) = {b, f }, N(b) = {a, c, e, f }, N(c) = {b, d, e, f }, N(d) = {c},
DEGREES OF VERTICES:
Theorem 1 (Handshaking Lemma): If G = (V, E) is an undirected graph with m edges then
2m deg(v)
vV
Proof: Each edge contributes twice to the degree count of all vertices. Hence, both the left-
hand and right-hand sides of this equation equal to the twice the number of edges.
Proof: Let V1 be the vertices of even degree and V2 be the vertices of odd degree in an
undirected graph G = (V, E) with m edges. Then
Exercise 22
1. Find the number of vertices in a simple graph having n edges and having each
vertex of degree 2.
2. Find the number of vertices in a simple graph with exactly 6 edges in which each
vertex is of degree 2
3. Determine the number of edges in a group with 6 nodes, 2 of degree 4 and 4 of
degree 2. Draw such graph.
4. How many edges are there in a graph with 10 vertices of degree six?
5. If a graph has 5 vertices, can each vertex have degree 3?
65
SE Semester III-CBCGS HME 2023-24
Lecture: 23
Directed graphs:
66
Mathematics – III (COMP)
Definition: An directed graph G = (V, E) consists of V, a nonempty set of vertices (or nodes),
and E, a set of directed edges or arcs. Each edge is an ordered pair of vertices. The directed
edge ( u, v ) is said to start at u and end at v.
Definition: Let ( u, v) be an edge in G. Then u is the initial vertex of this edge and is adjacent
to v and v is the terminal (or end) vertex of this edge and is adjacent from u. The initial and
terminal vertices of a loop are the same.
Definition: The in-degree of a vertex v, denoted deg−(v), is the number of edges which
terminate at v. The out-degree of v, denoted deg+(v), is the number of edges with v as their
initial vertex. Note that a loop at a vertex contributes 1 to both the in-degree and the out-
degree of the vertex.
Example: In the graph G we have
Proof: The first sum counts the number of outgoing edges over all vertices and the second
sum counts the number of incoming edges over all vertices. It follows that both sums equal
the number of edges in the graph.
Definition: A Complete graph on n vertices, denoted by Kn, is the simple graph that contains
exactly one edge between each pair of distinct vertices.
67
SE Semester III-CBCGS HME 2023-24
Remark:
Definition: A graph in which every vertex has the same degree is called regular graph. If
the common degree of vertex is r then it is called an r-regular graph of regular graph of degree r.
Observe that all above graphs are regular but not complete except (i). Graph (v) is not
even a simple graph.
Remark:
(1) Complete graph Kn is (n-1) – regular graph.
68
Mathematics – III (COMP)
A cycle Cn for n ≥ 3 consists of n vertices v1, v2 ,⋯ , vn, and edges {v1, v2}, {v2, v3} ,⋯ , {vn-1, vn},
{vn, v1}.
A wheel Wn is obtained by adding an additional vertex to a cycle Cn for n ≥ 3 and connecting
this new vertex to each of the n vertices in Cn by new edges.
An n-dimensional hypercube, or n-cube, Qn, is a graph with 2n vertices representing all bit
strings of length n, where there is an edge between two vertices that differ in exactly one bit
position.
Exercise 23
1. Can a complete graph with 8 vertices have 40 edges excluding self loop.
2. If r and n are odd natural number then there cannot be an regular graph of n
vertices.
3. Can we have a raph in which there are 5 vertices and the degree of each vertex is 3.
4. If G= (V,E) is an r-regular graph with n vertices and m edges then m=nr/2.
69
SE Semester III-CBCGS HME 2023-24
Lecture: 24
Connectivity:
Path & circuit:
Remark :
(1) When the graph is simple, we denote this path by its vertex sequence x0, x1, … ,
xn (since listing the vertices uniquely determines the path).
(2) The number of edges in a path is called length of a path.
Definition: The path is a Circuit if it begins and ends at the same vertex
(2) A path or circuit is simple if it does not contain the same edge more than once.
70
Mathematics – III (COMP)
Some have speculated that almost every pair of people in the world are linked by a small
chain of no more than six, or maybe even, five people. The play Six Degrees of Separation by
John Guare is based on this notion.
Connectedness in Undirected Graphs
Definition: An undirected graph is called connected if there is a path between every pair of
vertices. (or from any vertex to any vertex).
Remark: We say that we disconnect a graph when we remove vertices or edges, or both, to
produce a disconnected subgraph.
Example: G1 is connected because there is a path between any pair of its vertices, as can be
easily seen. However, G2 is not connected because there is no path between vertices a and
f,
for example.
Connected Components:
71
SE Semester III-CBCGS HME 2023-24
Example: The graph H is the union of three disjoint subgraphs H1, H2, and H3, none of
which are proper subgraphs of a larger connected subgraph of G. These three subgraphs
are the connected components of H.
• We can use the adjacency matrix of a graph to find the number of paths between two
vertices in the graph.
Theorem: Let G be a graph with adjacency matrix A with respect to the ordering v1, … , vn
of vertices (with directed or undirected edges, multiple edges and loops allowed). The
number of different paths of length r from vi to vj, where r >0 is a positive integer, equals
the ( i, j) th entry of Ar.
Proof by mathematical induction:
Basis Step: By definition of the adjacency matrix, the number of paths from vi to vj of length
1 is the (i,j)th entry of A.
Inductive Step: For the inductive hypothesis, we assume that that the (i,j)th entry of Ar is the
number of different paths of length r from vi to vj.
– Because Ar+1 = Ar A, the (i,j)th entry of Ar+1 equals bi1a1j + bi2a2j + ⋯ + binanj,
where bik is the (i,k)th entry of Ar. By the inductive hypothesis, bik is the
number of paths of length r from vi to vk.
– A path of length r + 1 from vi to vj is made up of a path of length r from vi to
some vk , and an edge from vk to vj. By the product rule for counting, the
number of such paths is the product of the number of paths of length r from vi
72
Mathematics – III (COMP)
to vk (i.e., bik ) and the number of edges from from vk to vj (i.e, akj). The sum
over all possible intermediate vertices vk is bi1a1j + bi2a2j + ⋯ + binanj .
Example: How many paths of length four are there from a to d in the graph G
73
SE Semester III-CBCGS HME 2023-24
Lecture: 25
• The town of Kӧnigsberg, Prussia (now Kalingrad, Russia) was divided into four
sections by the branches of the Pregel river. In the 18th century seven bridges
connected these regions.
• People wondered whether it was possible to follow a path that crosses each bridge
exactly once and returns to the starting point.
• The Swiss mathematician Leonard Euler proved that no such path exists. This result
is often considered to be the first theorem ever proved in graph theory.
Remark : For Euler path each edge exactly once but vertex may repeated.
Example: Which of the undirected graphs G1, G2, and G3 has a Euler circuit? Of those that
do not, which has an Euler path?
Solution: The graph G1 has an Euler circuit (e.g., a, e, c, d, e, b, a) but no Euler path.
The graph G2 has neither an Euler circuit nor path.
74
Mathematics – III (COMP)
The graph G3 has an Euler path (e.g., a, c, d, e, b, d, a, b) but there is no Euler circuit.
Necessary and sufficient conditions for Euler circuits and paths:
• Definition: A graph that contains an Euler circuit is called Euler graph.
• An Euler circuit begins with a vertex a and continues with an edge incident with a,
say {a, b}. The edge {a, b} contributes one to deg (a).
• Each time the circuit passes through a vertex it contributes two to the vertex’s
degree.
• Finally, the circuit terminates where it started, contributing one to deg (a). Therefore
deg (a) must be even.
• A connected graph is Euler circuit iff all vertices are of even degree.
By the same reasoning, we see that the initial vertex and the final vertex of an Euler path have
odd degree, while every other vertex has even degree. So, a graph with an Euler path has
exactly two vertices of odd degree (and rest all vertices with even degree).
EULER PATHS:
Example:
G1 contains exactly two vertices of odd degree (b and d). Hence it has an Euler path, e.g., d,
a, b, c, d, b.
G2 has exactly two vertices of odd degree (b and d). Hence it has an Euler path, e.g., b, a, g,
f, e, d, c, g, b, c, f, d.
G3 has six vertices of odd degree. Hence, it does not have an Euler path.
75
SE Semester III-CBCGS HME 2023-24
G contains all vertices of even degree. Hence it has an Euler circuit. e.g., f, a, b, c, e, d, c, f.
H has also all vertices of even degree. Hence it has an Euler circuit. e.g., e, d, c, e.
Note that none of the above graph is Euler path.
HAMILATONIAN PATHS AND CIRCUITS:
• Euler paths and circuits contained every edge only once. Now we look at paths and
circuits that contain every vertex exactly once.
76
Mathematics – III (COMP)
Definition: A simple path in a graph G that passes through every vertex exactly once is
called a Hamilton path (Hamiltonian path).
Definition: A simple circuit in a graph G that passes through every vertex exactly once is
called a Hamilton circuit (Hamiltonian circuit).
Definition: A graph G has Hamilton circuit then graph is called a Hamilton graph
Remark : That is, a simple path x0, x1, …, xn-1, xn in the graph G = (V, E) is called a Hamilton
path if V = {x0, x1, … , xn-1, xn } and xi ≠ xj for 0≤ i < j ≤ n, and the simple circuit x0, x1, …, xn-1,
xn, x0 (with n > 0) is a Hamilton circuit if x0, x1, … , xn-1, xn is a Hamilton path.
Remark:
In Hamiltonian circuit and path, some edges may not be transverse at all.
There may exist more than one Hamiltonian circuit and path for a given graph.
NECESSARY CONDITIONS FOR HAMILTONIAN CIRCUITS:
• Unlike for an Euler circuit, no simple necessary and sufficient conditions are known
for the existence of a Hamilton circuit.
• However, there are some useful necessary conditions. We describe two of these
now.
Dirac’s Theorem: If G is a simple graph with n ≥ 3 vertices such that the degree of every
vertex in G is ≥ n/2, then G has a Hamilton circuit.
Ore’s Theorem: If G is a simple graph with n ≥ 3 vertices such that deg (u) + deg (v) ≥
n-1 for every pair of nonadjacent vertices, then G has a Hamilton path.
EXAMPLES ON HAMILTON PATHS AND CIRCUITS:
Example: Which of these simple graphs has a Hamilton circuit or, if not, a Hamilton path?
Solution:
G1 has no Hamilton circuit but has path a, b, e, d, c.
G2 has a Hamilton circuit a, b, e, c, d, a and Hamilton path : a, b, e, c, d.
G3 has a Hamilton circuit c, a, b, e, d, c and a Hamilton path c, a, b, e, d.
Remark:
77
SE Semester III-CBCGS HME 2023-24
In Hamiltonian circuit and path, some edges may not be transverse at all.
There may exist more than one Hamiltonian circuit and path for a given graph.
Hamiltonian circuit is always a Hamiltonian path but converse need not be true.
• The famous traveling salesperson problem (TSP) asks for the shortest route a traveling
salesperson should take to visit a set of cities. This problem reduces to finding a
Hamilton circuit such that the total sum of the weights of its edges is as small as
possible.
• A family of binary codes, known as Gray codes, which minimize the effect of
transmission errors, correspond to Hamilton circuits in the n-cube Qn. (See the text for
details.)
Solution:
Exercise 25
78
Mathematics – III (COMP)
79
SE Semester III-CBCGS HME 2023-24
Lecture: 26
REPRESENTING GRAPHS: ADJACENCY LIST
Definition: An adjacency list can be used to represent a graph with no multiple edges by
specifying the vertices that are adjacent to each vertex of the graph.
Example: (i)
Example: (ii)
80
Mathematics – III (COMP)
Example:
When a graph is sparse, that is, it has few edges relatively to the total number of possible
edges, it is much more efficient to represent the graph using an adjacency list than an
adjacency matrix. But for a dense graph, which includes a high percentage of possible
edges, an adjacency matrix is preferable,
Note: The adjacency matrix of a simple graph is symmetric, i.e., aij = aji
Also, since there are no loops, each diagonal entry aij for i = 1, 2, 3, …, n, is 0.
• Adjacency matrices can also be used to represent graphs with loops and multiple
edges.
• When multiple edges connect the same pair of vertices vi and vj, (or if multiple loops
are present at the same vertex), the (i, j)th entry equals the number of edges
connecting the pair of vertices.
Example: We give the adjacency matrix of the pseudograph shown here using the ordering
of vertices a, b, c, d.
• Adjacency matrices can also be used to represent directed graphs. The matrix for a
directed graph G = (V, E) has a 1 in its (i, j) th position if there is an edge from vi to
vj, where v1, v2, … vn is a list of the vertices.
When a graph is Definition: Let G = (V, E) be an undirected graph with vertices where v1,
v2, … vn and edges e1, e2, … em. The incidence matrix with respect to the ordering of V and
E is the n × m matrix M = [mij], where
82
Mathematics – III (COMP)
The rows going from top to bottom represent v1 through v5 and the columns going from left
to right represent e1 through e6.
Example: Pseudograph and Incidence Matrix
The rows going from top to bottom represent v1 through v5 and the columns going from left
to right represent e1 through e8.
ISOMORPHISM OF GRAPHS
Definition: The simple graphs G1 = (V1, E1) and G2 = (V2, E2) are isomorphic if there is a
one-to-one and onto function f from V1 to V2 with the property that a and b are adjacent in
G1 if and only if f(a) and f(b) are adjacent in G 2 , for all a and b in V 1 . Such a function f is
called an isomorphism. Two simple graphs that are not isomorphic are called non-
isomorphic.
Example: Show that the graphs G =(V, E) and H = (W, F) are isomorphic
Solution: The function f with f(u1) = v1,f(u2) = v4, f(u3) = v3, and f(u4) = v2 is a one-to-one
correspondence between V and W.
Note: Adjacent vertices in G are u1 and u2, u1 and u3, u2 and u4, and u3 and u4. Each of the
pairs f(u1) = v1 and f(u2) = v4, f(u1) = v1 and f(u3) = v3 , f(u2) = v4 and f(u4) = v2 , and f(u3) = v3
and f(u4) = v2 consists of two adjacent vertices in H.
Remark:
• It is difficult to determine whether two simple graphs are isomorphic using brute
force because there are n! possible one-to-one correspondences between the vertex
sets of two simple graphs with n vertices.
• The best algorithms for determining whether two graphs are isomorphic have
exponential worst case complexity in terms of the number of vertices of the graphs.
83
SE Semester III-CBCGS HME 2023-24
• Sometimes it is not hard to show that two graphs are not isomorphic. We can do so
by finding a property, preserved by isomorphism, that only one of the two graphs
has. Such a property is called graph invariant.
• There are many different useful graph invariants that can be used to distinguish
non-isomorphic graphs, such as the number of vertices, number of edges, and degree
sequence (list of the degrees of the vertices in nonincreasing order).
Exercise 26
Lecture: 27
• Some local area networks use a star topology, which is a complete bipartite graph K1,n
,as shown in (a). All devices are connected to a central control device.
• Other local networks are based on a ring topology, where each device is connected to
exactly two others using Cn, as illustrated in (b). Messages may be sent around the ring.
• Various special graphs also play a role in parallel processing where processors need
to be interconnected as one processor may need the output generated by another.
85
SE Semester III-CBCGS HME 2023-24
BIPARTITE GRAPHS
Definition: A simple graph G is bipartite if V can be partitioned into two disjoint subsets V1
and V2 such that every edge connects a vertex in V1 and a vertex in V2. In other words, there
are no edges which connect two vertices in V1 or in V2.
It is not hard to show that an equivalent definition of a bipartite graph is a graph where it is
possible to color the vertices red or blue so that no two adjacent vertices are the same color.
since if we color a red, then the adjacent vertices f and b must both be blue.
Solution: We can partition the vertex set into V1 = {v1, v3, v5} and V2 = {v2, v4, v6} so that
every edge of C6 connects a vertex in V1 and V2 .
Solution: If we divide the vertex set of C3 into two nonempty sets, one of the two must
contain two vertices. But in C3 every vertex is connected to every other vertex. Therefore,
the two vertices in the same partition are connected. Hence, C3 is not bipartite.
COMPLETE BIPARTITE GRAPHS
Definition: A complete bipartite graph Km, n is a graph that has its vertex set partitioned into
two subsets V1 of size m and V2 of size n such that there is an edge from every vertex in V1
to every vertex in V2.
Example: We display four complete bipartite graphs here.
86
Mathematics – III (COMP)
Definition: Let G = (V, E) be a simple graph. The subgraph induced by a subset W of the
vertex set V is the graph (W,F), where the edge set F contains an edge in E if and only if both
endpoints are in W.
87
SE Semester III-CBCGS HME 2023-24
• Bipartite graphs are used to model applications that involve matching the elements
of one set to elements in another, for example:
• Job assignments - vertices represent the jobs and the employees, edges link employees
with those jobs they have been trained to do. A common goal is to match jobs to
employees so that the most jobs are done.
vertices represent the men and the women and edges link a a man and a woman if
they are an acceptable spouse. We may wish to find the largest number of possible
marriages.
Definition: The union of two simple graphs G1 = (V1, E1) and G2 = (V2, E2) is the simple
graph with vertex set V1 ⋃ V2 and edge set E1 ⋃ E2. The union of G1 and G2 is denoted by G1
⋃ G2.
Example:
88
Mathematics – III (COMP)
Lecture: 28
PLANER GRAPHS
Definition: If it is possible to draw the diagram of a given graph in such a way that no two
edges intersect (except at a vertex) is called a planner graph.
Definition: The diagram of a graph drawn in such a way that no two edges intersect is
called a plan graph.
Examples:
Exercise 28
89
SE Semester III-CBCGS HME 2023-24
Lecture: 29
GRAPH MODELS:
COMPUTER NETWORKS
When we build a graph model, we use the appropriate type of graph to capture the
important features of the application.
We illustrate this process using graph models of different types of computer
networks. In all these graph models, the vertices represent data centers, and the
edges represent communication links.
To model a computer network where we are only concerned whether two data
centers are connected by a communications link, we use a simple graph. This is the
appropriate type of graph when we only care whether two data centers are directly
linked (and not how many links there may be) and all communications links work in
both directions.
90
Mathematics – III (COMP)
To model a computer network where we care about the number of links between
data centers, we use a multigraph.
To understand the structure of a graph and to build a graph model, we ask these
questions:
91
SE Semester III-CBCGS HME 2023-24
•
Social networks
Communications networks
Software design
Transportation networks
– friendship graphs - undirected graphs where two people are connected if they are
friends (in the real world, on Facebook, or in a particular virtual world, and
so on.)
– collaboration graphs - undirected graphs where two people are connected if they
collaborate in a specific way
Influence graphs - directed graphs where there is an edge from one person to another if the
first person can influence the second person
92
Mathematics – III (COMP)
Example: A friendship graph where two people are connected if they are Facebook friends.
TRANSPORTATION GRAPHS
Graph models are extensively used in the study of transportation networks.
Airline networks can be modeled using directed multigraphs where
93
SE Semester III-CBCGS HME 2023-24
• Graph models are extensively used in software design. We will introduce two such
models here; one representing the dependency between the modules of a software
application and the other representing restrictions in the execution of statements in
computer programs.
• When a top-down approach is used to design software, the system is divided into
modules, each performing a specific task.
94
Mathematics – III (COMP)
TREE
Definition : A connected graph which does not have a circuit or cycle is called a tree.
Definition : A vertex of degree greater than one is called a internal node or branch
node.
Definition : A tree in which exactly one vertex is distinguishable from all vertices is
called a rooted tree, The particular distinguishable vertex is called the root of the tree.
Remark :
(1) A tree is a simple plane graph without loop and multiple edges.
(3) In a tree we can always find a path joining two vertices and such path is unique. This
is because tree is a connected graph.
(5) If we add an edge to a tree we will get cycle. If we remove an edge from a tree we
will get disconnected graph.
Definition : A tree in which one and only one vertex has degree two and the remaining
vertices are of degree one or three is called a binary tree.
95
SE Semester III-CBCGS HME 2023-24
Definition : If in a binary tree every internal node has exactly two branches it is called a
full binary tree.
Definition : A set of sequences formed from two digits 0 and 1 is called a binary prefix
code.
Remark : using 0 and 1 we can represent a binary tree by binary prefix code and vice
versa. For this we agree to assign 0 to the branch going to the left and 1 to the branch
going to the right.
Solution: (a) { 00, 10, 010, 111, 0110, 0111, 1100, 1101 }
96
SE Semester III-CBCGS HME 2023-24
Module 5 Logic
Lecture - 30
5.1. Logic
5.1.1. Motivation: Logic is concerned with all types of reasoning such as valid statements,
mathematical proofs, valid conclusion etc. Logic reasoning is used to prove theorems, to
verify the correctness of computer programs and draw conclusions from experiments.
5.1.2. Syllabus:
[Link] Notations:
94
Mathematics – III (CS & E)
[Link] Definitions: )
if p and q are two statements then “ ~q, p∧q, p∨q, p⟹q, p⟺q are all propositions.
Conjunction: When two or more statement are joined by the connective, denoted by the
symbol”
∧”. The compound statement so formed is called conjunction. If p & q are two statements then
their conjunction p & q written as 𝖠 ∧ 𝖠 is defined in the truth table given below
Truth table p∧ 𝖠
p q 𝑝𝑝𝑝
T T T
T F F
F T F
F F F
Disjunction: When two statement are joined by the connective “𝖠 ∨ 𝖠” the compound statement
so formed is called disjunction and written as 𝖠 ∨ 𝖠”, is defined in truth table given below.
Truth table 𝖠 ∨ 𝖠
p q 𝑝𝑝𝑝
T T T
T F T
F T T
F F F
Negation: If p is the given statement then the negation of p is denoted by “~𝖠"is defined to form
a statement that is true when p is false and false when p is true. The negation of p is read as “not
p”
Truth table ~𝖠
𝖠 ~𝖠
T F
F T
95
SE Semester III-CBCGS HME 2023-24
(I) p implies q
(III) p only if q
p q 𝖠⇒𝖠
T T T
T F F
F T T
F F T
5.1.9 : Examples
Sample Problems:
Write each of the following as conditional sentences in the “If----- then” form
96
Mathematics – III (CS & E)
) formed by
The converse of a given conditional statement 𝖠 ⇒ 𝖠 is a new statement
interchanging the premise p and conclusion q of the given conditional statement If 𝖠 ⇒ 𝖠 then
converse of it is 𝖠
⟹𝖠
p q 𝖠⇒𝖠 𝖠⇒𝖠
T T T T
T F F T
F T T F
F F T T
Sample Problems:
Note: If implication is true then converse may not be true it can be seen from third row of the
above table.
Inverse statement:
If both the premises and conclusion of an implication are negated we get the inverse of that
implication.
p q ∼𝖠 ∼𝖠 𝖠⇒𝖠 ∼ 𝖠 ⇒∼ 𝖠
T T F F T T
T F F T F T
F T T F T F
F F T T T T
From third row it can be seen that inverse is not true hen implication is true.
Contrapositive: if both the premises and conclusion of the implications are first negated and then
interchanged, we get contrapositive statement of the implication.
If 𝖠 ⇒ 𝖠 then contrapositive is ∼ 𝖠 ⇒∼ 𝖠
Truth table of contrapositive
p q ∼𝖠 ∼𝖠 𝖠⇒𝖠 ∼ 𝖠 ⇒∼ 𝖠
T T F F T T
T F F T F F
97
SE Semester III-CBCGS HME 2023-24
F T T F T T
F F T T T T
Note: if the implication are true then contrapositive is true and implication is false then
contrapositive is false.
Sample Problems:
Example: If you are good in mathematics then you are good in Science.
Converse of the statement: If you are good in Science then you are good in maths.
Inverse of the statement: If you are not good in maths then you are not good in Science.
Contrapositive of the statement: If you are not put in science then you are not good in maths.
This statement is true if p and q both are true or false and is false when one of the statement
true and other is false.
p q 𝖠⟺𝖠
T T T
T F F
F T F
F F T
Logical equivalence: Two statements are said to be logically equivalent if their equivalent is
always true.
(2) You can have a cakes are you can eat it.
Truth table: The truth value of a compound statement is completely determined by the truth
value of its component .If a statement is true then its truth value is represented by T and if truth
value is false then it is represented by F.
Propositional variable are constant. English alphabets p, q, r, s…. are used to represent simple
98
Mathematics – III (CS & E)
statement and are called propositional variables. )
Example: p= It is raining.
q= It is cold.
T and F are used to represent true and false statement are called propositional constant.
∼ (𝖠 𝖠 𝖠) ≡∼ 𝖠 ∨∼ 𝖠
∼ (𝖠 ∨ 𝖠) ≡∼ 𝖠 𝖠∼ 𝖠
∼(∼ 𝖠) ≡ 𝖠
(4) Negation of implication
∼ (𝖠 ⟹ 𝖠) ≡∼ (∼ 𝖠 ∨ 𝖠) ≡ 𝖠 𝖠∼ 𝖠
∼ (𝖠 ⇔ 𝖠) ≡∼ (∼ 𝖠 ∨ 𝖠) 𝖠 (𝖠 ∨∼ 𝖠) ≡∼ (∼ 𝖠 ∨ 𝖠) ∨∼ (𝖠 ∨∼ 𝖠)
∼ (𝖠 ⇔ 𝖠) ≡ (𝖠 𝖠∼ 𝖠) ∨ (∼ 𝖠 𝖠 𝖠)
Laws of Logic
(1) 𝖠 ∨ 𝖠 ≡ 𝖠 ∨ 𝖠 (2) 𝖠 𝖠 𝖠 ≡ 𝖠 𝖠 𝖠
(𝖠 𝖠 𝖠) 𝖠 𝖠 ≡ 𝖠 𝖠 (𝖠 𝖠 𝖠) (2) (𝖠 ∨ 𝖠) ∨ 𝖠 ≡ 𝖠 ∨ (𝖠 ∨ 𝖠)
(1) 𝖠 ∨ 𝖠 ≡ 𝖠 (2) 𝖠 𝖠 𝖠 ≡ 𝖠
99
SE Semester III-CBCGS HME 2023-24
∼ (∼ 𝖠) ≡ 𝖠
(1) 𝖠 ∨ (𝖠 𝖠 𝖠) ≡ (𝖠 ∨ 𝖠) 𝖠 (𝖠 ∨ 𝖠) (2) 𝖠 𝖠 (𝖠 ∨ 𝖠) ≡ (𝖠 𝖠 𝖠) ∨ (𝖠 𝖠 𝖠)
(1) 𝖠 ∨∼ 𝖠 ≡ 𝖠 (2) 𝖠 𝖠∼ 𝖠 ≡ 𝖠
(1) ∼ (𝖠 ∨ 𝖠) ≡∼ 𝖠 𝖠∼ 𝖠 (2) ∼ (𝖠 𝖠 𝖠) ≡∼ 𝖠 ∨∼ 𝖠
Statement form: It is a sequence of symbols containing statement variable such that when
statement variable are replaced by a statement then the result is a statement.
It is of three type.
(i) Tautology
(ii) Contradiction
(iii) Contingency
Tautology: A statement form which is always true for all substitution instance is called a
Truth table
𝖠 ∼𝖠 𝖠 ∨∼ 𝖠
T F T
F T T
Contradiction: A statement form which is always flase for all substitution instance is called a
contradiction.
𝖠 ∼𝖠 𝖠 ∧∼ 𝖠
T F F
F T F
100
Mathematics – III (CS & E)
) is called contingency.
Contingency: A statement which is neither tautology nor contradiction
So a contingent is sometime true and sometime false depend upon the truth values of
component statements.
𝖠 𝖠 𝖠∨𝖠 𝖠∧𝖠 ∼𝖠 ∼𝖠
T T T T F F
T F T F F T
F T T F T F
F F F F T T
Duality: Two formulae A & A* are said to be duals of each other if either can be obtained from
other by replacing ∨ 𝖠𝖠 ∧ 𝖠𝖠𝖠 ∧ 𝖠𝖠 ∨ .
Example: dual of (𝖠 ∨ 𝖠) ∧ 𝖠 is (𝖠 ∧ 𝖠) ∨ 𝖠.
𝖠 ≡ 𝖠 𝖠ℎ 𝖠𝖠 𝖠∗ ≡ 𝖠∗
So if two statements are equivalence then their dual are also equivalence.
Exercise 30
101
SE Semester III-CBCGS HME 2023-24
Practice Problems
Using truth tables show that following statement patterns are tautologies.
(1) [(p → q) ∧ ∼q] → (∼p)
(2) [p → (q → r)] ↔ [(p ∧ q) → r]
Using truth tables prove the following logical equivalences:
(1) p ↔ q ≡ (p ∧ q) ∨ (∼p ∧ ∼q)
(2) (p ∧ q) → r ≡ p → (q → r)
Learning from the topic: Students will be able to understand the Mathematical Statements
Normal forms
Lecture – 31
Learning Objective:
1. Student shall be able to learn change of Normal forms.
Elementary sum: A sum of the variables and their negation is called elementary sum.
Note: An elementary product is identically false if and only if it contains at least one pair offactor
in which one is negation of other
An elementary sum is identically true if and only if it contain at least one pair of factor in which
one is negation of another.
102
Mathematics – III (CS & E)
Example: 𝖠 𝖠 (𝖠 ∨ 𝖠), 𝖠 𝖠 (∼ 𝖠 ∨ 𝖠) are in CNF. )
Solution: 𝖠 𝖠 (𝖠 ⟹ 𝖠) ≡ 𝖠 𝖠 (∼ 𝖠 ∨ 𝖠)
≡ (𝖠 𝖠∼ 𝖠) ∨ (𝖠 ∨ 𝖠)
≡ [𝖠 ∨ (𝖠 𝖠 𝖠)] 𝖠 [∼ (𝖠 ∨ 𝖠) ∨∼ 𝖠]
≡ (𝖠 ∨ 𝖠) 𝖠 (𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨∼ 𝖠)(∼ 𝖠 ∨∼
𝖠) Which is in CNF.
(iii) If 𝖠𝖠 𝖠𝖠𝖠 ∼ 𝖠𝖠 are missing in an elementary product 𝖠 then replace 𝖠 by (𝖠 𝖠 𝖠𝖠) ∨(𝖠 𝖠∼
𝖠𝖠).
103
SE Semester III-CBCGS HME 2023-24
(iv) Repeat step 3 until all elementary product are reduced to sum of min terms. Identical
min terms appearing in DNF are deleted.
NOTE:
If the given proposition is a tautology then its PDNF will contain all possible min-terms of its
component.
Solution: ∼ 𝖠 ∨ 𝖠 ≡ [∼ 𝖠 𝖠 (𝖠 ∨∼ 𝖠) ∨ (𝖠 𝖠 (∼ 𝖠 ∨ 𝖠))]
≡ [(∼ 𝖠 𝖠 𝖠) ∨ (∼ 𝖠 𝖠∼ 𝖠) ∨ (𝖠 𝖠∼ 𝖠) ∨ (𝖠 𝖠 𝖠)]
≡ [(∼ 𝖠 𝖠 𝖠) ∨ (∼ 𝖠 𝖠∼ 𝖠) ∨ (∼ 𝖠 𝖠 𝖠) ∨ (𝖠 𝖠 𝖠)]
≡ (∼ 𝖠 𝖠 𝖠) ∨ (∼ 𝖠 𝖠∼ 𝖠) ∨ (𝖠 𝖠
(iv) Repeat step 3 untill all elementary sum are reduced to product of max terms.
Identicalmax terms appearing in CNF are deleted.
Solution: (∼ 𝖠 ⟹ 𝖠) 𝖠 (𝖠 ⟺ 𝖠)
≡ (∼∼ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠)
≡ (𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠)
≡ [(𝖠 𝖠∼ 𝖠) ∨ (𝖠 ∨ 𝖠)] 𝖠 [(∼ 𝖠 ∨ 𝖠) ∨ (𝖠 𝖠∼ 𝖠)] 𝖠 [(∼ 𝖠 ∨ 𝖠) ∨ (𝖠 𝖠∼ 𝖠)
≡ (𝖠 ∨ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠 ∨ 𝖠)(∼ 𝖠 ∨ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠 ∨∼ 𝖠) 𝖠 (𝖠 ∨∼ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨
104
Mathematics – III (CS & E)
∼ 𝖠 ∨ 𝖠) )
≡ (𝖠 ∨ 𝖠 ∨ 𝖠) 𝖠 (𝖠 ∨∼ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠 ∨ 𝖠) 𝖠 (∼ 𝖠 ∨ 𝖠 ∨∼
5.1.12. Predicates
A part of a declarative sentence describing the properties of an object or relation among objects
is called predicates .
In other words predicate is a variable statement which becomes specific when particular values
are assigned to the variables.
“Ram” is subject.
R: Ram
In other words, a predicate is a word or words in a sentence which express the nature of the
subject.
Example: Every rational number is real number. Here “a real number” is predicate.
The statement x is greater than 3 has two parts. The first part is variable x is subject of the
statement and the second part is predicate “is greater than 3” refers to the property of x it is
denoted by P(x).
P(x) is also said to the value of propositional function P at x. So when we assign the value of x
the P(x) become proposition and has a truth value.
There are of two types to change predicate (propositional function) into proposition:
(i) Universal quantification
105
SE Semester III-CBCGS HME 2023-24
While talking about a set, we need a reference set which we called Universal set U. In the same
way when we talk about all, some, none, etc. we need a reference set which we call Universe of
discourse, represented by UoD.
(i) Universal quantification: The symbol ∀𝖠 (for all)is used to represent universal quantifier
and represented as
5.1.14 Existential quantification: The symbol ∃ (there exist) is used to represent existential
quantifier and read in either of the following ways:
Note : 1
106
Mathematics – III (CS & E)
(3) ∃ 𝖠 ∀𝖠 𝖠(𝖠, 𝖠) ≠ ∀𝖠 ∃ 𝖠𝖠(𝖠, )
𝖠) Negation of Quantifier
statement :
Negation of quantified statement changes the quantifier and negates the original statement given
below:
𝖠) is
Exercise 31
(1) Q(x) : 𝖠 < 2 UoD = Set of real numbers Find Truth value of ∀𝖠𝖠(𝖠).
(2) Negation of quantified statement changes the quantifier and negates the original
statement
(a) ∼ [∀𝖠∼ 𝖠(𝖠 )] (b) )∼ [∼ ∃ 𝖠 ∼ 𝖠(𝖠)]
(3) Symbolize the following statements?
Learning from the topic: Students will be able to understand the Normal forms
Lecture – 32
Learning Objective:
1. Student shall be able to learn Mathematical Induction.
107
SE Semester III-CBCGS HME 2023-24
Let P(n) be a statement pr proposition defined by the set of positive integers, “𝖠+”
such that it is either true or false for all 𝖠 ∈ 𝖠+. For the given statement P(n), if we can
prove that
𝖠0).Then we can conclude that P(n) is true for all natural numbers 𝖠 ≥
𝖠0. Step of
(i) Basis of induction: Assume the validity of the statement for the smallest integral value ofn
for which it is true.
(ii) Induction step If the statement is true for n=k, where k denotes any value of n, then it
isalso true for n=k+1.
(iii) Conclusion: The statement is true for all integral values of n equal to or greater than
that for which it is verified in step 1.
Solution: Step 1. If n=1, then left hand side of P(n) is 1 and right hand side is 1. Hence P(n)is
true for n=1.
This shows that if P(n) is true for n=k, then it is also true for n=k+1. Hence , by mathematical
induction P(n) is true for every integral value of n.
Exercise 32
A) Using the principle of mathematical induction, prove that
(1) P(n): =
(2)P(n): 1.2.3+2.3.4+…+n(n+1)(n+2)=
108
Mathematics – III (CS & E)
)
(a) 652 > 189 (b) 42 < 132 (c) 343 > 27 (d) 42 ≤ 431
Learning from the topic: Students will be able to understand the Mathematical Induction
Learning Outcomes
1. Know: Student should be able
to
Self-Assessment
3. Do you understand the Unit step function and its Laplace Transform?
(a) Yes (b) No
Learning Resources:
110
SE Semester III-CBCGS HME 2023-24
Module - 6
Algebraic Structures
6.1. Algebraic Structures
6.1.1 Motivation: Groups and fields are algebraic structures. Group theory is the study a
set of elements present in a group, in Mathematics. A group’s concept is fundamental to
abstract algebra. There are many applications in various areas of computer
programming, physics, electrical engineering, control engineering and signal processing.
Groups are used to solve Rubik’s cube. They are also used to express the fundamental
symmetry of many fundamental laws of nature.
6.1.2 Syllabus:
Lecture: 33
Algebraic Structures:
SE Semester III-CBCGS HME 2023-24
Now, 𝑥 ∘ 0 = 𝑥 + 0 + (𝑥 × 0)
=𝑥
= 0 + 𝑥 + (0 × 𝑥)
=0∘𝑥
Hence, ∃0 ∈ ℝ such that 𝑥 ∘ 0 = 𝑥 = 0 ∘ 𝑥. Hence, 0 is the identity of (ℝ, ∘).
Therefore, (ℝ, ∘) is monoid.
Exercise 33
1. Prove that (ℝ, ÷) is group.
2. Give an example of semigroup and monoid.
3. Give an example for semigroup which is not group.
Learning from the topic: Students will be able to understand the concept of Groups
Lecture: 34
Groups:
SE Semester III-CBCGS HME 2023-24
Group: An algebraic structure (𝐺, °), where 𝐺 is non- empty set and ∗: 𝐺 × 𝐺 → 𝐺 is binary
composition on 𝐺 is said to be group if it satisfies the following properties:
i) Identity: there exist an element 𝑒 ∈ 𝐺 such that ∀𝑎 ∈ 𝐺, 𝑒 ∘ 𝑎 = 𝑎 = 𝑎 ∘ 𝑒.
ii) Inverse: ∀𝑎 ∈ 𝐺, 𝑎 ∘ 𝑎−1 = 𝑒 = 𝑎−1𝑎.
iii) Associativity: ∀𝑎, 𝑏, 𝑐 ∈ 𝐺, 𝑎 ∘ (𝑏 ∘ 𝑐) = (𝑎 ∘ 𝑏) ∘ 𝑐
Example: (ℝ, ×) is group under multiplication as binary operation.
ℤ𝑛 = {0, 1, 2, 3, 4, … , 𝑛 − 1} is group under addition modulo 𝑛.
ℤ𝑚 × ℤ𝑛 = {(𝑝, 𝑞)|𝑝 ∈ ℤ𝑚 & 𝑞 ∈ ℤ𝑛} is group under composition.
Order of Group: The number of elements in the group 𝐺 is called order of group. It is denoted by |G|. If
the number of elements is finite, then the group is said to be Finite Group. If there are infinite number of
elements in the groups, then it is called Infinite Group.
Example: ℤ6 has 6 number of elements in it. Hence the order of ℤ6 is 6. i.e. |ℤ6| = 6.
114
Mathematics – III (COMP)
Order of Element of Group: Order of an element is 𝑟 of group 𝐺 i.e. 𝑂(𝑎) = 𝑟 𝑖𝑓𝑓 𝑎𝑟 = 𝑒, where 𝑒 is
the identity element of 𝐺.
Example: Consider ℤ6 and 2∈ ℤ6.
Abelian Group:
Definition 1. A group 𝐺 is said to be abelian if it satisfies the commutative law under multiplication. i.e.
𝑎𝑏 ∈ 𝐺, ∀𝑎, 𝑏 ∈ 𝐺.
Example: (ℝ, ×) is abelian group under multiplication as binary operation.
Question: Let ℤ be the group of integers with binary operation ∗ ∶ ℤ × ℤ → ℤ defined by
𝑥 ∗ 𝑦 = 𝑥 + 𝑦 − 𝑥𝑦, ∀𝑥, 𝑦 ∈ ℤ. Then, prove that (ℤ, ∗) is abelian.
Solution:
Let 𝑥, 𝑦, 𝑧 ∈ ℤ.
Consider, 𝑥 ∗ 𝑦 = 𝑥 + 𝑦 − 𝑥𝑦 = 𝑦 + 𝑥 − 𝑦𝑥 = 𝑦 ∗ 𝑥, ∀𝑥, 𝑦 ∈ ℤ.
∴ (ℤ, ∗) is abelian group.
Cyclic Group: A group is said to be cyclic is there exist an element 𝑏 ∈ 𝐺 such that every element of 𝐺 is
power of 𝑏. Here, 𝑏 is said to be generator of 𝐺 and we denote 𝐺 =< 𝑏 >.
Example: ℤ𝑛, for all 𝑛 is cyclic group of order under addition modulo 𝑛.
Question: Consider the group ℤ2 × ℤ3 = {(m, n) | m ∈ ℤ2, n ∈ ℤ3}. Show that
ℤ2 × ℤ3 is cyclic by finding generators.
Solution: The operation is component wise addition
(𝑚, 𝑛) + (𝑚′, 𝑛′) = (𝑚 + 𝑚′, 𝑛 + 𝑛′)
It is routine to verify that this is a group, the direct product of ℤ2 and ℤ3.
The element (1, 1) ∈ ℤ2 × ℤ3 has order 6:
1) The number of generators of cyclic group 𝐺 of order 𝑛 is equal to 𝜙(𝑛), where 𝜙(𝑛) is the Euler-
𝜙 function. i.e. 𝜙(𝑛) = totaL number of integers which are relatively prime to n.
115
SE Semester III-CBCGS HME 2023-24
2) The subgroup of cyclic group is cyclic. The converse need not be true.
Lecture: 35
Homomorphism: Let (𝐺, °) and (𝐻, ∗) be two groups and 𝑓: 𝐺 → 𝐻 is a mapping. Then,
𝑓 is said to be homomorphism if 𝑓(𝑎°𝑏) = 𝑓(𝑎) ∗ 𝑓(𝑏), ∀𝑎, 𝑏 ∈ 𝐺.
Example: 𝑓: (ℤ, +) → (ℤ, +) defined by 𝑓(𝑎 + 𝑏) = 𝑓(𝑎) + 𝑓(𝑏).
Remark: Number of Homomorphism 𝑓: ℤ𝑚 → ℤ𝑛 is equal to gcd(𝑚, 𝑛).
Question: Check whether : (ℤ, +) → (ℤ, +) defined by 𝑓(𝑛) = 𝑛2 is homomorphism or
not.
Solution: Let 𝑛, 𝑚 ∈ ℤ.
Consider, 𝑓(𝑛 + 𝑚) = (𝑛 + 𝑚)2
= 𝑛2 + 𝑚2 + 2𝑚𝑛
≠ 𝑓(𝑛) + 𝑓(𝑚)
Hence, 𝑓 is not homomorphism.
117
SE Semester III-CBCGS HME 2023-24
1 0
= {[ ]}
0 1
Isomorphism: Let (𝐺, °) and (𝐻, ∗) be two groups and 𝑓: 𝐺 → 𝐻 is a mapping. Then, 𝑓
is said to be isomorphism if 𝑓 is one-one, onto and Homomorphism.
Question: Show that (ℝ, +) is isomorphic to (ℝ, ×).
Solution: Step I: For 𝑥𝜖ℝ, we define 𝑓(𝑥) = 𝑒 𝑥 . This gives a mapping 𝑓: ℝ → ℝ.
Step II: If 𝑓(𝑥) = 𝑓(𝑦) ⟹ 𝑒 𝑥 = 𝑒𝑦 ⟹ 𝑥 = 𝑦, 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥, 𝑦 ∈ ℝ.
This is one-to-one mapping.
Step III: If 𝑟 ∈ ℝ+, then 𝑓(ln 𝑟) = 𝑒𝑙𝑛𝑟 = 𝑟, 𝑤ℎ𝑒𝑟𝑒 (𝑙𝑛𝑟) ∈ ℝ. Thus 𝑓 is
Onto.
Step IV: For 𝑥, 𝑦 𝜖ℝ, we have 𝑓(𝑥 + 𝑦) = 𝑒𝑥+𝑦 = 𝑒 𝑥 𝑒 𝑦 = 𝑓(𝑥)𝑓(𝑦).
Thus, (ℝ, +) ≅ (ℝ, ×)
Exercise 35
1. 𝑓(𝑥) = 𝑙𝑜𝑔(𝑥) for groups (ℝ+,×) and (ℝ, +) is a group isomorphism.
2. Groups ({0,1,2,3}, +4) and ({2,3,4,1}, +5) are isomorphic.
3. (ℚ, +) is isomorphic to (ℤ, +).
4. Are (ℝ, +) and (ℂ, +) isomorphic additive groups?
Learning from the topic: Students will be able to solve the problems related to algebraic
structures.
Learning Outcomes
5. Higher Engineering Mathematics Ramana B.V. Tata McGraw Hill, New Delhi 11th
Edition 2010
6. Linear Algebra: A Modern Introduction D. Poole Brooks/Cole 2nd Edition 2005
7. An introduction to Linear Algebra V. Krishnamurthy, V.P. Mainra and J.L. Arora
Affiliated East–West press - 2005
Lecture:36
Field: A field is an ordered triplet (F, +, .) where F is a non-empty set and + and . are two binary
operations on F satisfying the following axioms.
F1: ( F,+) is a commutative group.
F2: (a.b).c =a.(b.c) for all a,b,c ∈F (. commutative.)
F3: a.(b+c)=a.b+a.c
and (b+c).a=b.a+c.a for all a,b,c ∈F (. Distributes over +).
F4: (F ~0, .) is a commutative group.
Since
X Y a b 2 c d 2 a c b d
XY a b 2 c d 2 ac 2bd 2 ad bc
and since a c,b d ,ac 2bd ,ad bc are rational numbers X Y and
XY F. Hence F is closed under addition + and multiplication.
F1: Consider (F,+).
(i) Since for all rational numbers addition is associative, we can show that
X Y Z X Y Z. Addition is associative.
2, additive inverse exists.
(iii) Since a b 2 a b 2 0 0 a b
118
Mathematics – III (CS & E)
X Y Z X Y X Z
and X Y Z X Z Y Z ,X ,Y , Z F.
Hence . is distributes over +.
1 1 1 a b 2 a b 2
2 cd 2
X a b 2 a b 2 a b 2 a 2b
(iii) If
c a ,d b .
a2 2b a2 2b
1
c, d Q, F.
X
Hence (F,+,.) is a field.
Exercise 36
1. Show that the set of integers Z is a ring under addition and multiplication. Is it a field?
2. Prove that (Z5, +, .) is a field where Z5 is a set R of residue classes of {0,1,2,3,4}modulo 5.
a b
3. Show that the set of matrices M
, a,b Z form an integral domain. Is it a
5b a
field.
Lecture:37
Encoding Function: If an integer n>m and if there is one to one correspondence e : Bm Bn
then e is called an (m,n) encoding function. In this way every word in Bm is represented by a world in
B n. If bB m then e(b) is called the code word representing b.
Weight: If a world x Bn then the number of 1’s x is called the weight of x and is denoted by x.
F3: It can be shown that 119
SE Semester III-CBCGS HME 2023-24
120
Mathematics – III (CS & E)
We prepare the following table by using 0+0=0, 0+1=1, 1+0=0 and 1+1=0.
For example: 01110+10101=11011; 11011+01110=10101
(i) From the diagonal elements of the above table we see that the identity(00000) of B5 is in N.
(ii) From the table we see that if X,Y belongs to N then X Y also belongs to N.
(iii) Every elements is its inverse.
Hamming Distance: If X, Y are words in Bm then the weight of X Y i.e. X Y is called the
119
SE Semester III-CBCGS HME 2023-24
+ 0 1
0 0 1
1 1 0
120
Mathematics – III (CS & E)
110110
(i) X Y = 000101
X Y 4
110011
01100
(ii) X Y = 010110
X Y 3
011010
Exercise-37
121
SE Semester III-CBCGS HME 2023-24
Online References
1. [Link]
[Link]
2. [Link]
[Link]
3. [Link]
[Link]
equations
122
SE [Link]
esO
terMIIaIp-C
pBinCgGwSitH
hMRE
ev2is0e2d3-B2l4oom’s Taxonomy Level
B. CO and PO Mapping
PO
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO
CO1 H H M L L L M
CO2 H H M L L L M
CO3 H H L L L M
CO4 H H M L L L L M
CO5 H H M L L M
CO6 H H M L L L L M
PO
PSO1 PSO2 PSO3
CO
CO1 H H
CO2 H M
CO3 H M
CO4 H H
CO5 H H
CO6 H H
122