You are on page 1of 367

Amity School of Engineering & Technology (CSE)

1
Amity School of Engineering & Technology (CSE)

Module I:
❑ Proposition,
❑ Propositional Calculus-
Propositional Variables and
❑ Compound propositions,

2
Amity School of Engineering & Technology (CSE)

1.5 OBJECTIVES
After completing this section, you will be able to

1.5.1 Explain Proposition

1.5.2 Differentiate between simple and compound sentences

1.5.3 Understand basic logical operators

1.5.4 Propositional calculus

1.5.5 Well formed formula(WFF) [A Syntax for Compound


Proposition]

3
Amity School of Engineering & Technology (CSE)

Proposition

A Proposition (or sentence) is a declarative


statement whose truth value is either True or
False but not both.

These two values “True” and “False” is denoted by “T” and “F”
respectively. Sometimes it is also denoted by 1 and 0.

4
Amity School of Engineering & Technology (CSE)

Proposition…
Proposition (Example) Truth value

1. Two is an even integer. T

2. Delhi is the capital of India. T

3. A triangle has four sides. F

4. 3+4=8 F

5. Washington DC is the capital of the United States T

5
Amity School of Engineering & Technology (CSE)

6
Amity School of Engineering & Technology (CSE)

7
Amity School of Engineering & Technology (CSE)

8
Amity School of Engineering & Technology (CSE)

9
Amity School of Engineering & Technology (CSE)

Type of Proposition:
Proposition

Simple Compound

❖ A statement which has no logical connectives (and, or, not etc.) is


called a Simple (atomic) sentences.
For example all the statements in Example1 are all simple statements.

❖ A statement which is made up of two or more simple statements using


a logical connective (such as “and”, “or”, “Not” , “if..then” or “ if and only
if”) is called a compound statement.
Example: “Two is an even integer” and “Delhi is the capital of India” is a
compound statement
10
Amity School of Engineering & Technology (CSE)

Logical connectives:
Given a atomic propositions (denoted by 𝑝, 𝑞, 𝑟..).
To form the compound propositions, the following logical
connectives are used.

Symbol Meaning Example In words Precedence

~ Negation ~𝑝 "𝑛𝑜𝑡 𝑝" 1

∧ Conjunction 𝑝∧𝑞 "𝑝 𝑎𝑛𝑑 𝑞" 2

∨ Disjunction 𝑝∨𝑞 "𝑝 𝑜𝑟 𝑞" 3

⟹ Implication 𝑝⟹𝑞 "𝑖𝑓 𝑝 𝑡ℎ𝑒𝑛 𝑞" 4


(conditional)
⇔ Equivalence 𝑝⇔𝑞 "𝑝 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑞" 5
(Biconditional)

11
Amity School of Engineering & Technology (CSE)

12
Amity School of Engineering & Technology (CSE)

13
Amity School of Engineering & Technology (CSE)

Propositional calculus:

Given a atomic propositions: 𝑝, 𝑞, 𝑟,……

Propositional calculus is a language of


propositions ( or a set of rules) used to
combine the atomic propositions to form the
compound propositions using the logical
connectives (~, ∧, ∨, ⟹ 𝑎𝑛𝑑 ⟺).

14
Amity School of Engineering & Technology (CSE)

Propositional calculus(WFF)
Well formed formula(WFF) [A Syntax for Compound Proposition]

1. Any statement variable (𝑝, is a WFF.

2. If 𝛼 is a WFF, then ~𝛼 is also a WFF.

3. If 𝛼 and 𝛽 are WFFs then (𝛼 ∨ 𝛽), 𝛼 ∧ 𝛽 , (𝛼 ⟹ 𝛽) and (𝛼 ⇔ 𝛽) are


also WFFs

4. A WFF can be constructed only by the finite number of applications of


rule (1) to (3) above.

Note: A WFF is nothing but valid strings with statement letters,


connectives and parenthesis.

Example: (Well-formed formula in propositional logic)


F1: ∼ (𝑝 ∨ 𝑞) ⇔ (∼ 𝑝 ∧∼ 𝑞)
F2: ((𝑝 ⇒ 𝑞) ∧ (𝑞 ⇒ 𝑟)) ⇔ (𝑝 ⇒ 𝑟)
15
Amity School of Engineering & Technology (CSE)

BNF(Backus-Naur form) grammar of sentences in


propositional logic:

16
Amity School of Engineering & Technology (CSE)

17
Amity School of Engineering & Technology (CSE)

18
Amity School of Engineering & Technology (CSE)

19
Amity School of Engineering & Technology (CSE)

20
Amity School of Engineering & Technology (CSE)

21
Amity School of Engineering & Technology (CSE)

22
Amity School of Engineering & Technology (CSE)

23
Amity School of Engineering & Technology (CSE)

24
Amity School of Engineering & Technology (CSE)

25
Amity School of Engineering & Technology (CSE)

26
Amity School of Engineering & Technology (CSE)

27
Amity School of Engineering & Technology (CSE)

28
Amity School of Engineering & Technology (CSE)

29
Amity School of Engineering & Technology (CSE)

30
Amity School of Engineering & Technology (CSE)

31
Amity School of Engineering & Technology (CSE)

32
Amity School of Engineering & Technology (CSE)

Summary

➢ Any declarative statement whose truth value is either True or


False but not both is called a proposition.
➢ Following statements are not a proposition:
Exclamation mark(!), Question mark(?), expression with variable and
Ambiguous statements.
➢ WFF is basically a syntax for writing compound proposition

33
Amity School of Engineering & Technology (CSE)

34
Amity School of Engineering & Technology (CSE)

35
Amity School of Engineering & Technology (CSE)

36
Amity School of Engineering & Technology (CSE)

37
Amity School of Engineering & Technology (CSE)

38
Amity School of Engineering & Technology (CSE)

39
Amity School of Engineering & Technology (CSE)

40
Amity School of Engineering & Technology (CSE)

41
Amity School of Engineering & Technology (CSE)

42
Amity School of Engineering & Technology (CSE)

43
Amity School of Engineering & Technology (CSE)

44
Amity School of Engineering & Technology (CSE)

45
Amity School of Engineering & Technology (CSE)

46
Amity School of Engineering & Technology (CSE)

47
Amity School of Engineering & Technology (CSE)

48
Amity School of Engineering & Technology (CSE)

49
Amity School of Engineering & Technology (CSE)

50
Amity School of Engineering & Technology (CSE)

51
Amity School of Engineering & Technology (CSE)

52
Amity School of Engineering & Technology (CSE)

53
Amity School of Engineering & Technology (CSE)

54
Amity School of Engineering & Technology (CSE)

55
Amity School of Engineering & Technology (CSE)

56
Amity School of Engineering & Technology (CSE)

Discrete structures
Lecture Notes
Module-2 Lecture-1
Relations
Amity School of Engineering & Technology (CSE)

Objectives
After Completing this Module-II, you will be able to:

❑ Define a Relation and various types of relations


❑ Discuss a pictorial representation of relations.
❑ Explain the closure of reflexive, symmetric
and transitive relations.
❑Define and explain the Equivalence relations and
partial order relation (POSET).
2
Amity School of Engineering & Technology (CSE)

Relation
Introduction

We start by considering a simple example.


Let S denote the set of all students at AMITY University, Noida and
Let T denote the set of all teaching staff there.
For every student sS and every teaching staff tT, exactly one of the
following is true:

❖ s has attended a lecture given by t, or


❖ s has not attended a lecture given by t.

We now define a relation R as follows.


Let sS and tT.
We say that sRt if s has attended a lecture given by t. If we now look at
all possible pairs (s,t) of students and teaching staff, then some of these
pairs will satisfy the relation while other pairs may not.
3
Amity School of Engineering & Technology (CSE)

Relation
Introduction
Formally, we define a relation in terms of these “ordered pairs”.
Relations, as noted above, will be defined in terms of ordered pairs (a, b)
of elements, where a is designated as the first element and b as the
second element.

Some definitions required to define relation


Ordered Pair:
Let A and B are two sets and let aA and bB then a set of two elements
whose elements have been listed in a specific order is called an ordered
pair. It is denoted by (a,b).
Particularly:
For different a and b: (a,b)(b,a) and
If (a1,b1)=(a2,b2)  a1=a2 and b1=b2
Thus in case of relation (a,b)(b,a) unless a=b, whereas in case of Sets,
the order of elements is irrelevant; for example {2,3}={3,2}.
4
Amity School of Engineering & Technology (CSE)

Relation
Some definitions required to define relation

Definition2: (Cartesian product of two sets):


Let A and B be two nonempty sets. The set AB = {(a,b) : aA and bB}
is called the Cartesian product of the sets A and B. In other words, AB
is the set of all ordered pairs (a,b), where aA and bB. In short this
product AB is read as “A cross B”.
Example1
Let A = {1, 2} and B= {a, b, c}. Then
AB = {(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)}
BXA = {(a, 1), (a, 2) (b, 1) (b, 2), (c, 1), (c, 2)}
And AXA = {(1, 1), (1,2),(2,1),(2,2)}
Clearly, from this example, we can note down the following points:
ABBA
If A has n elements and B has m elements than AB has m.n elements.
If A= and (or) B= then AB=
If AB=BA  A=B
5
Amity School of Engineering & Technology (CSE)

Relation
RELATION
Let A and B are two nonempty sets. A binary relation or, simply, relation
from A to B is a subset of A X B i.e.
R is a relation from A to B  R (AB)
Note: Relation is derived from Cross-Product.

Example1
Let A = {1, 2,3} and B= {a, b, c}
Then AB={(1,a),(1,b),(1,c),(2,a),(2,b),(2,c),(3,a),(3,b),(3,c)}
R1={(1,a),(1,c)}
R2={(1,a),(2,a),(2,c)}
R3={(3,c)} ,……..
𝑅 𝑚𝑎𝑥 = 𝐴 × 𝐵 𝑅 𝑚𝑖𝑛 = ∅ All these are examples of relations from A to B.

Suppose R is a relation from A to B (i.e. R (AB)).


That is, for each pair aA and bB, exactly one of the following is true:
❖ (a,b)R, we then say “a is R-related to b”. We write aRb.
❖ (a, b)R, we then say “a is not R-related to b”. 6
Amity School of Engineering & Technology (CSE)

Relation
Note:
If set A has n elements and B has m elements, how many relations are
there on the set AB.

Let |A|=n and |B|=m. We know that R (AB) and


| 𝐴𝐵| = 𝑚. 𝑛, Also set of all possible subsets of AB is power set of
AB i.e. P(AB).
Thus if | AB|=m.n, then |P(AB)|=2mn.

Hence If set A has n elements and B has m elements, then there are
2mn relations on it.

7
Amity School of Engineering & Technology (CSE)

Relation
Domain and Range of a Relation
If R (AB) is a relation from AB, then
❖ Domain(R)={a: (a,b)R} and
❖ Range(R)={b: (a,b)R}.
The domain of a relation R is the set of all first elements of the ordered
pairs which belong to R, and the range of R is the set of second
elements.

Example
Let A = {1, 2,3} and B= {a, b, c}
Then AB={(1,a),(1,b),(1,c),(2,a),(2,b),(2,c),(3,a),(3,b),(3,c)}
R={(1,a),(2,a),(2,c)}

❖ Domain(R)={1,2}
❖ Range(R)={a,c}.

8
Amity School of Engineering & Technology (CSE)

Relation
Some Examples
Example1: Let A={1,2,3,4}. Define a relation R on A by writing (x,y)R if
x < y. Then
R = {(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)}.

Example2:
Let A={1,2,3}. Define a relation R on A as
R={(a,b): a is divisible by b. We have R = {(1,1),(2,1),(3,1),(2,2),(3,3)}.

Example3:
Let A be the power set of the set {1,2} in other words, A = {,{1},{2},{1,2}}
is the set of subsets of the set {1,2}. Write a relation on A, where
(P,Q)R, if PQ.
In this case we have:
R = {(,{1}), (,{2}), (,{1,2}), ({1},{1,2}), ({2},{1,2})}.

9
Amity School of Engineering & Technology (CSE)

Module II:
❑ Types of Relation

10
Amity School of Engineering & Technology (CSE)

Types of Relations

11
Amity School of Engineering & Technology (CSE)

Types of Relations
Let A be a given non-empty set then a relation RAA is called a
binary relation on A.
Binary relations that satisfy certain special properties can be very
useful in solving computation problems. So let’s discuss some of
these properties:

We have following types of properties in a (Binary) relation on a


given set A.
1. Reflexive
2. Irreflexive
3. Symmetric
4. Asymmetric
5. Anti-symmetric
6. Transitive

12
Amity School of Engineering & Technology (CSE)
Types of relations (with properties)
Reflexive ∀𝒂 ∈ 𝑨, (𝒂, 𝒂) ∈ 𝑹 Every vertex has a
self loop
Irreflexive If 𝒂 ∈ 𝑨, (a,a)∉R No vertex having
self loop
Symmetric If 𝑎, 𝑏 ∈ 𝑹 ⇒ (b, a) ∈ 𝑅 If a to b is an
arrow then there
must be an
return arrow from
b to a
Asymmetric If 𝑎, 𝑏 ∈ 𝑹 ⇒ (b, a) ∉ 𝑅 No return arrow
No self loop also and no self loop

Anti- If (𝑎, 𝑏 ∈ 𝑹 and (b, a) ∈ 𝑅) ⇒a=b No return arrow


symmetric (*) If ( 𝑎, 𝑏 ∈ 𝑹 and 𝒂 ≠ 𝒃) ⇒ (b, a) ∉ 𝑅 but self loop
allowed
Transitive If ( 𝑎, 𝑏 ∈ 𝑹 and 𝑏, 𝑐 ∈ 𝑹) ⇒ (a, c) ∈ 𝑅
13
Amity School of Engineering & Technology (CSE)

Types of Relation
Reflexive
A relation R on a set A is reflexive if for every aA, aRa. that is, a relation
R in a set A is said to be reflexive if every element of A is related to itself
i.e. aRa is true for every aA.

Definition2: (In terms of directed graph): R is reflexive if there must be a


loop at each node aA.

Example:
Example1: Let A be the set of all straight lines in a plane. The relation R
“x is parallel to y” is reflexive since every straight line is parallel to itself.
Example2: Let A be the set of numbers and relation R in A is defined by
“x is equal to y” is reflexive” since each number is equal to itself.
Example3: Let A={1,2,3} and the relation R in A is defined by
R={(1,1),(2,2),(2,3)} is not reflexive because (3,3) does not belongs to R.
The given relation R will be reflexive, if every ordered pair (a,a)R for all
aA.
14
Amity School of Engineering & Technology (CSE)

Types of Relation
Example:
Consider the following five relations on the set A = {1, 2, 3, 4, 5}:
R1 = {(1, 1), (1, 2), (2,2),(2, 3), (1, 3), (3,3),(4,2),(4, 4),(5,5)}
R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
R3 = {(1, 3), (2, 1)}
R4 = Ø, the empty relation
R5 = A X A, the universal relation
Determine which of the relations are reflexive.

15
Amity School of Engineering & Technology (CSE)

Types of Relation..
Irreflexive Relations

A relations R on a set is irreflexive if (a, a)R for every a є A. Thus R is


not irreflexive if there exist at least one aA such that (a, a)R.
Definition2: (In terms of directed graph): R is Irreflexive if there is no
loop at any node aA.
Note: No self loop allowed

Example:
Example1: Let A= {1,2,3} and let R= {(1, 1),(3,2)}.
Here R is not reflexive since (2,2) or (3,3)R. Also R is not irreflexive,
since (1, 1)R.
Example2: Let A={a,b,c}be a non empty set. Let R={(a,b),(b,c),(c,a)}
Here R is irreflexive since (a,a) )R for every aA. Also note that there is
no loop at any node.

16
Amity School of Engineering & Technology (CSE)

Types of Relation
Example:
Consider the following five relations on the set A = {1, 2, 3, 4, 5}:
R1 = {(1, 1), (1, 2), (2,2),(2, 3), (1, 3), (3,3),(4,2),(4, 4),(5,5)}
R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
R3 = {(1, 3), (2, 1)}
R4 = Ø, the empty relation
R5 = A X A, the universal relation
Determine which of the relations are Irreflexive?

17
Amity School of Engineering & Technology (CSE)

Types of Relation
Symmetric Relation

A relation R on a set A is symmetric if a,b in A, if aRb, then bRa. In


other words a relation R is symmetric if in R whenever (a, b)R then
(b, a)R.
Thus R is not symmetric if there exists a, bA such that (a, b)R but (b,
a)R.

18
Amity School of Engineering & Technology (CSE)

Types of Relation
Example:
Consider the following five relations on the set A = {1, 2, 3, 4, 5}:
R1 = {(1, 1), (1, 2), (2,2),(2, 3), (1, 3), (3,3),(4,2),(4, 4),(5,5)}
R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
R3 = {(1, 3), (2, 1)}
R4 = Ø, the empty relation
R5 = A X A, the universal relation
Determine which of the relations are Symmetric.

19
Amity School of Engineering & Technology (CSE)

Types of Relation
Asymmetric Relation

A relation R on a set A is Asymmetric if a,b in A, if aRb, then bRa in not


allowed. In other words a relation R is Asymmetric if in R whenever (a,
b)R then (b, a)R.
Thus R is not symmetric if there exists a, bA such that (a, b)R but (b,
a)R.
Note: No bidirectional arrow. No self loop at any vertex.

20
Amity School of Engineering & Technology (CSE)

Types of Relation
Anti-Symmetric Relation

A relation R on a set A is anti-symmetric if whenever aRb and bRa then


a = b. That is if (a,b),(b,a)R then there must be the case that a=b. Thus
R is not antisymmetric if there exists a, bA such that (a, b) and (b, a)
belong to R, but
a≠b
Note: No Bi-directional arrow except self loop.

21
Amity School of Engineering & Technology (CSE)

22
Amity School of Engineering & Technology (CSE)

Types of Relation
Transitive Relation

A relation R on a set A is said to be transitive if (a,b)R and (b,c)R


(a,c)R, for all a,b,cA.
In other words relation R is transitive if aRb and bRc implies that aRc, for
all a,b,cA
Thus R is not transitive if there exist a, b, c A such that (a, b), (b, c)R
but (a, c)R.

Example
Consider the following five relations on the set A = {1, 2, 3, 4, 5}:

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

This relation is Transitive

23
Amity School of Engineering & Technology (CSE)

Problems:

Determine whether the relation R on set A={-3,-2,-1,0,1,2,3} is


a)reflexive,
b) symmentric,
c) irreflexive,
d) antisymmetric,
e) asymmetric,
f) transitive,
where (a,b) member of R if and only if a=1.

24
Amity School of Engineering & Technology (CSE)

Problems:

Determine whether the relation R on set of people is reflexive, symmetric,


antisymmetric or transitive where aRb if
a) A is spouse of b

25
Amity School of Engineering & Technology (CSE)

Find which of the following relations are Transitive?

26
Amity School of Engineering & Technology (CSE)

Check your Progress-Transitive Relation

27
Amity School of Engineering & Technology (CSE)

Number of relations possible on a given set A having n elements


Given a set A with |A|=n elements, then the number of relation possible::
2
Total number of relation possible= 2𝑛
Total number of Identity Relations= 1
2 −𝑛
Total number of Reflexive Relations= 2𝑛

2 −𝑛
Total number of Irreflexive Relations= 2𝑛
Total number of symmetric Relations= 2𝑛(𝑛+1)/2

Total number of Anti-symmetric Relations= 2𝑛 . 3𝑛(𝑛−1)/2

Total number of Asymmetric Relations= 3𝑛(𝑛−1)/2


Total number of Reflexive and Symmetric Relations= 2𝑛(𝑛−1)/2
Total number of Transitive Relations= No formula exist

28
Amity School of Engineering & Technology (CSE)

Composition of Relations
Let A, B and C is sets, and let R1 be a relation from A to B and R2 be a
relation from B to C.
That is, R1 (AB) and R2 (BC).
Then the composite of R1 and R2 is a relation from A to C, denoted by
R1R2 and defined by
R1R2={(a,c): there exists bB such that (a,b)R1 and (b,c)R2}
The relation R1R2 is called the composition of R1 and R2.
Suppose R is a relation on a set A, that is R (AA). Then RR, the
composition of R with itself is always defined. RR is sometimes denoted by
R2.
Similarly, R3= RRR, and so on.
Thus Rn is defined for all positive n.

29
Amity School of Engineering & Technology (CSE)

Composition of Relations

30
Amity School of Engineering & Technology (CSE)

Composition of Relations

31
Amity School of Engineering & Technology (CSE)

Composition of Relations
Theorem 2.1: (Show that the composition of relations is Associative).
Let A, B, C and D be sets. Suppose
R is a relation from A to B,
S is a relation from B to C, and
T is a relation from C to D. Then (RS)T = R(ST)
Solution:
L.H.S.: Suppose (a,d) (RS)T  (a,c)RS and (c,d)T
Since (a,c)RS  (a,b)R and (b,c)S
Now (ST)  (b,d)ST
Since (a,b)R and (b,d)ST (a,d) R(ST). Hence proved.

Note: 1) composition of relations is Associative i.e.


(RS)T = R(ST).
2) (RS)(SR)

32
Amity School of Engineering & Technology (CSE)

Check your progress

Q.1:
Let R = {(1, 2), (3, 4), (2, 2)}and S = {(4, 2), (2, 5), (3, 1), (1, 3)}.
Compute RS, SR, R(SR), (RS)R, RRR.
Solution:
a) RS = {(1,5), (3, 2), (2, 5)}
SR = {(4, 2), (3, 2), (1, 4)}. Clearly RS≠ SR
b) R(SR)= {(3, 2)}.
(RS)R = {(3, 2)}. Clearly R(SR)= (RS)R.
c) RRR= {(1, 2), (2, 2)}

33
Amity School of Engineering & Technology (CSE)

Closure of relations

34
Amity School of Engineering & Technology (CSE)

Closure of relations

35
Amity School of Engineering & Technology (CSE)
Closure of relations
Note: To construct Transitive closure t(R), if R contains the pairs
(a,b) and (b,c) then t(R) must contains the pair (a,b), for all a,b,cA.
Finding t(R) can take a lot of time when A has a large number of
elements. There exist an efficient way for computing t(R), known as
warshall’s algorithm (which may be discussed latter).
Example 1
Consider the following relation R on the set A = {1, 2, 3, 4}:
R = {(1, 1), (1, 3), (2, 4), (3, 1), (3, 3), (4, 3)}.
Then r( R ) = R  DA =R  {(2, 2),(4, 4)}={(1, 1), (1, 3), (2, 4), (3, 1),
(3, 3), (4, 3),(2,2),(4,4)}
and s( R) = R  R-1= R{(4, 2), (3, 4)}= {(1, 1), (1, 3), (2, 4), (3, 1),
(3, 3), (4, 3),(4,2),(3,4)
t(R)= RR2R3R4={…..}

36
Amity School of Engineering & Technology (CSE)
Closure of relations

Note: To construct Transitive closure t(R), if R contains the pairs


(a,b) and (b,c) then t(R) must contains the pair (a,c), for all a,b,cA.
Finding t(R) can take a lot of time when A has a large number of
elements. There exist an efficient way for computing t(R), known as
warshall’s algorithm.

38
Amity School of Engineering & Technology (CSE)

Let A={1,2,3,4} and R={(1,2),(2,1),(2,3),(3,4)}. Find the Transitive


closure of R?
Solution:
1. Method1: (using formula: t(R)= RR2R3R4={………..}
2. (Method2): [Using Matrix]:
t(R)= 𝑀𝑅  𝑀𝑅2 𝑀𝑅3 𝑀𝑅4
Where (𝑀
𝑅)2 = 𝑀𝑅 . 𝑀𝑅 etc … .
First, we have to write a matrix for a given relation
0 1 0 0
1 0 1 0
𝑀𝑅 =
0 0 0 1
0 0 0 0

39
Amity School of Engineering & Technology (CSE)

2. (Method2): [Using Matrix] Type equation here.


First, we have to write a matrix for a given relation
0 1 0 0
1 0 1 0
𝑀𝑅 =
0 0 0 1
0 0 0 0

40
Amity School of Engineering & Technology (CSE)

Warshall’s Algorithm (to find Transitive closure)


• The matrix method is better than the 1st method (using formula) and can
be implemented with the help of a program, but it tends to become costly
in terms of time and space requirement in the case of large matrices. So
this method is inefficient too.
• The Warshall's algorithm as described next helps to overcome these
drawbacks.
Method (Warshall’s): first we write 𝑊0 = 𝑀𝑅, Then following steps is
performed.

41
Amity School of Engineering & Technology (CSE)

Warshall’s Algorithm (to find Transitive closure)


Let A={1,2,3,4} and R={(1,2),(2,1),(2,3),(3,4)}. Find the Transitive closure of R?

42
Amity School of Engineering & Technology (CSE)

Warshall’s Algorithm (to find Transitive closure)


Let A={1,2,3,4} and R={(1,2),(2,1),(2,3),(3,4)}. Find the Transitive closure of R?

43
Amity School of Engineering & Technology (CSE)

Warshall’s Algorithm (to find Transitive closure)

44
Amity School of Engineering & Technology (CSE)

Warshall’s Algorithm (to find Transitive closure)

45
Amity School of Engineering & Technology (CSE)

Summary

➢ A relation R on a set A is called reflexive if there is a self loop


at each node in directed graph of a relation.

➢ A relation R on a set A is called symmetric if there is an arrow


from 𝑎 → 𝑏 then there is a return arrow from b → 𝑎 .

➢ A relation R on a set A is said to be transitive if there is an


arrow from 𝑎 → 𝑏 𝑎𝑛𝑑 𝑏 → 𝑐 then there is an arrow from 𝑎 →
𝑐.

46
Amity School of Engineering & Technology (CSE)

Module II:
❑ Digraph Representation of
Relation

47
Amity School of Engineering & Technology (CSE)

OBJECTIVES
After completing this section, you will be able to

➢ Explain Digraph (directed graph)

➢ Understand how to make a digraph of a given relation

48
Amity School of Engineering & Technology (CSE)

Representing Relation using Digraph


Pictorial representation is an another way of
representing a relation (also known as Directed
graph or simply Digraph).

Digraph representation of binary relations:

A binary relation on a set can be represented by a digraph.


Let R be a binary relation on a set A, that is R is a subset of 𝑨 × 𝑨.
Then the digraph, call it G, representing R can be constructed as follows:
1. The vertices of the digraph G are the elements of A, and
2. <x, y> is an arc of G from vertex x to vertex y if and only if <x, y> is
in R.

49
Amity School of Engineering & Technology (CSE)

Example
The less than relation R on the set of integers A ={1,2,3,4} is
the set {(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)}
and it can be represented by the following digraph:

50
Amity School of Engineering & Technology (CSE)

Digraph representation: Reflexive, Symmetric & Transitive


Relation:

51
Amity School of Engineering & Technology (CSE)

52
Amity School of Engineering & Technology (CSE)

Example

53
Amity School of Engineering & Technology (CSE)

Summary
➢ A relation R on a set A is called reflexive if there is a self loop
at each node in directed graph of a relation.

➢ A relation R on a set A is called symmetric if there is an arrow


from 𝑎 → 𝑏 then there is a return arrow from b → 𝑎 .

➢ A relation R on a set A is said to be transitive if there is an


arrow from 𝑎 → 𝑏 𝑎𝑛𝑑 𝑏 → 𝑐 then there is an arrow from 𝑎 →
𝑐.

59
Amity School of Engineering & Technology (CSE)

Module I:
❑ Equivalence and Partial Order
Relation

60
Amity School of Engineering & Technology (CSE)

OBJECTIVES
After completing this section, you will be able to

➢ Define Equivalence Relation

➢ Define Partial Order Relation

➢ Differentiate Between Equivalence Relation and Partial


Order Relation

61
Amity School of Engineering & Technology (CSE)

Equivalence Relation
A relation R in a set A is said to be an equivalence relation if

1) R is Reflexive i.e. aRa aA.


2) R is Symmetric i.e. aRabRa, a,bR.
3) R is Transitive i.e. If aRb and bRc aRc a,b,cA.

Example1: Relation R on a set A defined by “a is equal to b” is an


equivalence relation, since it is reflexive (a = a for every aA), symmetric
(If a = b, then b = a , a,bA) and transitive (If a = b and b = c, then a =
c, a,b,cA).

62
Amity School of Engineering & Technology (CSE)

Equivalence Relation
Let a Relation R is defined on a set 𝐴 = 𝑎, 𝑏, 𝑐 , then find which of the
following relations are Equivalence relation.

1) R1=∅
2) R2={(a,a),(b,b),(c,c)}
3) R3={(a,a),(b,b),(c,c), (b,a)}
4) R4={(a,a),(a,c),(b,a),(c,a)}
5) R5={(a,a),(b,b),(c,c), (a,b),(a,c),(b,a),(c,a)}
6) R6=AxA

63
Amity School of Engineering & Technology (CSE)

Check your Progress1 (Equivalence Relation)

Let a Relation R is defined on a set 𝐴 = 1,2,3 , then find which of the


following relations are Equivalence relation.

1) R1=∅
2) R2={(1,1),(2,2),(3,3)}
3) R3={(1,1),(1,3),(2,1),(3,1)}
4) R4={(1,1),(1,2),(2,1), (2,3),(3,1),(3,2),(3,3)}
5) R5=AxA

64
Amity School of Engineering & Technology (CSE)

Partial Order Relation


A relation R on a set A is called a Partial ordering or a partial order relation,
if it is:
Reflexive, i.e. aRa aA.
Anti-symmetric, i.e. If aRb and bRa a=b a,bA.
Transitive i.e. If aRb and bRc aRc a,b,cA.

The set over which a partial order is defined is called a partially ordered
set (or POSET). It is denoted by (A,R) where A is a given set and R is a
relation which satisfy the above three conditions.

Example: The relation ≤ (less than or equal to) on the set R of real
numbers is a partial order relation.
Since the relation () is:
1. Reflexive i.e. aa, aR
2. Anti-symmetric i.e. a b and b aa=b, a,bR
3. Transitive i.e ab and bc, ac a,b,cR

65
Amity School of Engineering & Technology (CSE)

Partial Order Relation

66
Amity School of Engineering & Technology (CSE)

Hasse Diagram- Pictorial Representation of Poset


Pictorial representation of POSET
▪ This is defined only on poset.
Step1: Since a partial order is reflexive, so every vertex in a
diagraph has a loop. To simplify matter, it will not be shown (Remove
it).
For Example: Consider a following Diagraph:

67
Amity School of Engineering & Technology (CSE)

Hasse Diagram- Pictorial Representation of Poset


Step2: Since Transitive property exists: aRb,bRc → aRc
We omit (drop) an arrow from a→ c.

68
Amity School of Engineering & Technology (CSE)

Hasse Diagram- Pictorial Representation of Poset

Step3: We draw connectivity always in the form of upward arrows so


drop arrows:

and finally, we replace the circle(which represents the vertices) by


dots(.)

69
Amity School of Engineering & Technology (CSE)

Hasse Diagram- Pictorial Representation of Poset

70
Amity School of Engineering & Technology (CSE)

Hasse Diagram- Pictorial Representation of Poset

71
Amity School of Engineering & Technology (CSE)

Hasse Diagram- Pictorial Representation of Poset

72
Amity School of Engineering & Technology (CSE)
Hasse Diagram

Example: Let Dn is the set of all divisor on n.


Draw the Hasse Diagram for
D12, D15, D20, D30.

73
Amity School of Engineering & Technology (CSE)

Maximal and Minimal Elements

Greatest and Least element is also known as First (Maximum) and Last
(minimum) element.

74
Amity School of Engineering & Technology (CSE)

Maximal and Minimal Elements (Example)

75
Amity School of Engineering & Technology (CSE)

Maximal and Minimal Elements (in Hasse Diagram)

76
Amity School of Engineering & Technology (CSE)

Maximal and Minimal Elements (Examples)

77
Amity School of Engineering & Technology (CSE)

Minimum (first or Least) and Maximum (Last or Greatest) element

78
Amity School of Engineering & Technology (CSE)

Minimum (Least) and Maximum (Greatest) element-Example

79
Amity School of Engineering & Technology (CSE)

Upper Bound (UB) and Lower Bound (LB)

Note: UB, LB, LUB and GLB are defined on a subset of Given POSET.

80
Amity School of Engineering & Technology (CSE)

Least Upper Bound (LUB) and Greatest Lower Bound (GLB)

Let B={3,4,5} then


LUB(B)=6 and
GLB(B)=3

Note: 𝐿𝑈𝐵(𝑎, 𝑏) is denoted by (𝒂 ∨ 𝒃) and call it Join of a and b,


similarly 𝐺𝐿𝐵(𝑎, 𝑏) is denoted by (𝒂 ∧ 𝒃) and call it meet of a and b.

81
Amity School of Engineering & Technology (CSE)

Upper Bound (UB), Lower Bound (LB) and


Least-Upper Bound(LUB) and Greatest-Lower Bound (GLB)

82
Amity School of Engineering & Technology (CSE)

Example
Q. Draw the Hasse diagram of poset ({3,5,9,15,24,45},/). Then find the following:

83
Amity School of Engineering & Technology (CSE)
Check your Progress-1

84
Amity School of Engineering & Technology (CSE)

Module#3
Boolean Algebra

85
Amity School of Engineering & Technology (CSE)
Boolean Algebra
Boolean algebra as Lattice:
A lattice is said to be a BA if it is both Distributed and complemented
lattice.
Note: In distributed lattice every element has at most one complement
(means either not exist or only one complement).
And In complemented lattice every element has at least one complement.

A lattice L is said to be a BA if it has exactly one complement for each


element in L.
Ex:

86
Amity School of Engineering & Technology (CSE)
Boolean Algebra
Let B is a nonempty set with
➢ Two binary operator (+) and (*)
➢ One unary operator ‘ (complement), and
➢ Two distinct element 0 and 1, then Boolean algebra can be represented
as a 6 tuple 𝑩, +,∗, ’, 𝟎, 𝟏 , where 0 is a least element and 1 is called a
greatest element.
➢ If the set B satisfy the following properties, then B is called
Boolean algebra:
1.Closure property: 4. Complement law
∀𝒂, 𝒃 ∈ 𝑩 𝒂 + 𝒃 ∈ 𝑩 𝒂 + 𝒂’ = 𝟏
𝒂∗𝒃∈ 𝑩 𝒂 ∗ 𝒂’ = 𝟎
2. Associative Law: 5. Commutative Law
𝒂 + (𝒃 + 𝒄) = (𝒂 + 𝒃) + 𝒄 a+b=b+a
𝒂∗ 𝒃∗𝒄 = 𝒂∗𝒃 ∗c a∗b=b∗a
3. Identity Law: Distributive law:
𝒂+𝟎=𝒂 a + (b ∗ c) = (a + b) ∗ (a + c)
𝒂∗𝟏=𝒂 (a ∗ (b + c) = (a ∗ b) + (a ∗ c)
87
Amity School of Engineering & Technology (CSE)

Point to be remember

1. Boolean algebra is a distributed and


complemented lattice means each element of a
lattice have a unique complement.
2.The representation 𝑩, +,∗, ’, 𝟎, 𝟏 of a set B,
which satisfy the properties (1 to 6) is called a
Boolean algebra.
3.Lattice and Boolean algebra are interconnected
to each other.

88
Amity School of Engineering & Technology (CSE)

Boolean Algebra
▪ Boolean algebra is the theoretical foundation for digital system.
▪ Boolean algebra can have only two values, 0 and 1. The Boolean
0 and 1 do not represent actual numbers, instead a state of a
voltage which is known as the logic level.
▪ Boolean algebra is used as a tool for the analysis and design of
logic circuit.
▪ Boolean algebra provides the operations and the rules for
working with the set {0,1}.
▪ In Boolean algebra, 3 operations are mostly used:
➢ Boolean Complementation (‘)
➢ Boolean Sum (+) and
➢ Boolean Product (.)

89
Amity School of Engineering & Technology (CSE)

Boolean Algebra
• Both sets and propositions satisfy similar laws, These laws are
used to define an abstract mathematical structure called a
Boolean algebra, which is named after the mathematician
George Boole (1815–1864).
• Let B be a nonempty set with two binary operations + and ∗, a
unary operation ‘ , and two distinct elements 0 and 1. Then B is
called a Boolean algebra if the following axioms hold where a, b,
c are any elements in B:
• We will sometimes designate a Boolean algebra by 6 tuples as
(B,+, ∗,’ ,0, 1), which satisfy the following Properties:

90
Amity School of Engineering & Technology (CSE)

Boolean Algebra
(B,+, ∗,’ ,0, 1) is a BA, if the following axioms hold where a, b, c are any elements in B.

[B1] Commutative laws: We say


(1a) a + b = b + a ▪ 0 is the zero element,
▪ 1, is the unit element, and
(1b) a ∗ b = b ∗ a ▪ a’ is the complement of a.
[B2] Distributive laws:
▪ ‘ has precedence over ∗, and ∗ has
(2a) a + (b ∗ c) = (a + b) ∗ (a + c) precedence over +.
(2b) a ∗ (b + c) = (a ∗ b) + (a ∗ c) For example,
[B3] Identity laws: ▪ a + b ∗ c means
a + (b ∗ c) and not (a + b) ∗ c;
(3a) a + 0 = a ▪ a ∗ b’ means a ∗ (b’) and not (a ∗ b)’
▪ Of course when a + b ∗ c is written a + bc
(3b) a ∗ 1 = a
then the meaning is clear.
[B4] Complement laws:
(4a) a + a =1
(4b) a ∗ a= 0
91
Amity School of Engineering & Technology (CSE)

Boolean Algebra

Example1: Let B = {0, 1}, the set of bits (binary digits), with the binary
operations of + and ∗ and the unary operation defined by Fig.1. Then B is a
Boolean algebra. (Note simply changes the bit, i.e., 1= 0 and 0= 1.).

92
Amity School of Engineering & Technology (CSE)
Boolean Algebra- Example

93
Amity School of Engineering & Technology (CSE)

Example3:
Let 𝐷70 = {1, 2, 5, 7, 10, 14, 35, 70}, the divisors of 70. Define +, ∗,
and on 𝐷70 by a + b = lcm(a, b), a ∗ b = gcd(a, b), a’=70/a
Show that 𝐷70 is a Boolean algebra with 1 as a ‘zero element’ and
70 as a Unit (Greatest) element.

It is clear from these two tables a,b,c ∈ 𝐷70

94
Amity School of Engineering & Technology (CSE)

Example3:

95
Amity School of Engineering & Technology (CSE)
Boolean Algebra

96
Amity School of Engineering & Technology (CSE)
Boolean Algebra

97
Amity School of Engineering & Technology (CSE)
Boolean Algebra

98
Amity School of Engineering & Technology (CSE)
Note Point

99
Amity School of Engineering & Technology (CSE)

Proving Theorems of Boolean Algebra


(B,+, ∗,’ ,0, 1) is a BA, if the following axioms hold where a, b, c are any elements in B.
Theorem1: Idempotent law
∀𝒂 ∈ 𝑩
(1) 𝑎 + 𝑎 = 𝑎
(2) 𝑎. 𝑎 = 𝑎
Proof:
(1) LHS

100
Amity School of Engineering & Technology (CSE)

Properties of Boolean Algebra

101
Amity School of Engineering & Technology (CSE)

Properties of Boolean Algebra

Let 11 and 12 be two multiplicative identity in B, then

102
Amity School of Engineering & Technology (CSE)

Properties of Boolean Algebra

103
Amity School of Engineering & Technology (CSE)

Proving Theorems of Boolean Algebra


Theorem2: Prove that the element 0 (additive identity) and 1(multiplicative
identity) are Unique.
Proof:

104
Amity School of Engineering & Technology (CSE)

Properties of Boolean Algebra

105
Amity School of Engineering & Technology (CSE)

Properties of Boolean Algebra


Theorem3:

106
Amity School of Engineering & Technology (CSE)
Properties of Boolean Algebra

107
Amity School of Engineering & Technology (CSE)

Theorem5: De Morgan’s Law


∀a, b ∈ 𝑩
1 𝑎 + 𝑏 ′ = 𝑎′ . 𝑏′
2 𝑎. 𝑏 ′ = 𝑎′ + 𝑏′
Proof: To prove this, we use the concept A+A’=1 and A.A’=0
For (1) we have show that:
(𝑎 + 𝑏) + 𝑎′ . 𝑏′ = 1
LHS (𝑎 + 𝑏 + 𝑎’). (𝑎 + 𝑏 + 𝑏’) = (1 + 𝑏). (1 + 𝑎) = 1.1 = 1=RHS
Also consider
(𝑎 + 𝑏). (𝑎’. 𝑏’) = (𝑎’. 𝑏’). (𝑎 + 𝑏) = (𝑎’. 𝑏’. 𝑎) + (𝑎’. 𝑏’. 𝑏)
= (0. 𝑏’) + (𝑎’. 0) = 0 + 0 = 0

108
Amity School of Engineering & Technology (CSE)

Theorem6:
0’=1 and 1’=0
Proof: 0’=(a.a’)’=a’+(a’)’=a’+a=1
And
1’=(a+a’)’=a’.(a’)’=a’.a=0

109
Amity School of Engineering & Technology (CSE)

Atom and Anti-atom


Atom: Immediate successor of least element
Anti-atom: Immediate predecessor of Greatest element.

In fig2,
Atom: 𝑐
Anti-atom: 𝑎, 𝑏, 𝑔

110
Amity School of Engineering & Technology (CSE)

Example2:
Consider 𝐷110 . Draw its Hasse diagram and find atoms and anti-
atom.

Atom: 2,5,11
Anti-atom: 10,22,55

111
Amity School of Engineering & Technology (CSE)

Example3:
Consider 𝐷210 . Draw its Hasse diagram and find atoms and anti-atom.
𝐷210 = {1, 2, 3, 5, 6, 7, 10,14, 15, 21, 30, 35, 42, 70, 105, 210}

Atom: 2,3,5,7
Anti-atom: 30,42,70,105

112
Amity School of Engineering & Technology (CSE)

Subalgebra:
A Boolean subalgebra, or more simply, a subalgebra, of a Boolean
algebra (B, ≼) is a subset A (i.e 𝐴 ⊆ 𝐵), that contains the Greatest (1)
and Least elements (0) of B , and with any elements 𝑎, 𝑏 ∈ 𝐴 , it contains
𝑎 ∨ 𝑏, 𝑎 ∧ 𝑏 and 𝑎′ as well.
Note: 1) A itself be a BA, and contains 0 and 1 element
Let's consider a subset with
▪ 2 element:
{c,a}, {c,b}….., {c,d}; only {c,d} is a Boolean SA.
▪ 3 element (i.e. odd number of element)
{c,a,d},{c,b,d},{a,d,b},{a,c,b}; odd number of
Element in a subset never will be a Boolean SA in any case, because it itself not
a BA that is one extra element (say in {c,a,d}, a is not having any compliment),
so need not to check 2nd condition, least and greatest element in subset A.
▪ 4 element: {a,b,c,d} is a Boolean subalgebra.
113
Amity School of Engineering & Technology (CSE)

Subalgebra:
❑ Any subset A (of B) having odd number of elements, will not be a BSA.
Because there will be at least one element for which complement is not
exist.
❑Any set having even number of elements may or may not be a BSA.
Example: Find all the Boolean subalgebra of D30.

{1,30}
{ _, _, _ } not a BSA (odd number of element)
{1, _, _, 30} implies {1, 2,15, 30}
{1, 5, 6, 30}
{1, 3, 10, 30}

Total 4 Boolean SA.

114
Amity School of Engineering & Technology (CSE)

Subalgebra:
Example: Find all the Boolean subalgebra of D30, which are not a Boolean
subalgebra of having at least 4 element.

115
Amity School of Engineering & Technology (CSE)

Subalgebra

116
Amity School of Engineering & Technology (CSE)

Subalgebra

117
Amity School of Engineering & Technology (CSE)

Boolean Subalgebra

118
Amity School of Engineering & Technology (CSE)

QUIZ time (11.45-12.10 pm)

119
Amity School of Engineering & Technology

1
Amity School of Engineering & Technology

Contents:
❑ Basic Concepts of Graph
❑Different types of Graph

2
Amity School of Engineering & Technology

Objectives

After completing this section, you will be able to


1) Understand the Concepts of Graphs
2)Apply the knowledge of Graph theory in
computer science.

3
Amity School of Engineering & Technology

Graphs…
Graph is a non-linear Data Structure. Example:
It is a collection of nodes(vertices)
and edges(arcs) that relate nodes to
each other in the graph.
Generally, A Graph is represented as
G = (V, E)
Where,
V is the set of vertices(nodes or
points) and
E is the set of edges(links or arcs). This graph G can be defined as
G= ( V , E )
where, V= {A,B,C,D,E} and
E= {(A,B),(A,C)(A,D),(B,D), (C,D),
(B,E),(E,D)}.
4
Amity School of Engineering & Technology

Graph…
❖ Vertex: An individual data element of a graph is called as
vertex. Vertex is also known as node.
❖ Edge: An edge is a connecting link between two vertices.

Edges are of three types


Undirected Edge : An edge with no (A,B) is equal to

specific direction. It is Bidirectional (B, A)

Directed Edge : An edge which has (A,B) is not

specific direction. It is Unidirectional equal to (B, A)

Weighted Edge - An edge with cost


on it. 5
Amity School of Engineering & Technology

Graph Terminology
Adjacent Nodes: Any two nodes which are connected by an
edge are said to be adjacent nodes.

Source and Destination: If an edge is directed, its first endpoint


is origin and the other endpoint is destination of the edge.

Adjacent edges- Any two edges which are having one common
vertex

Loop or Self Loop: An edge that starts and end at the same
vertex

Parallel Edges- If more than one edge exists between the nodes
then the edges are called the parallel ledges.
6
Amity School of Engineering & Technology

Types of Graphs
Amity School of Engineering & Technology

Types of Graphs
Amity School of Engineering & Technology

Types of Graphs
Null Graph: A graph with no edges is
called a Null Graph.
E(G)=φ
Trivial Graph: A graph with only one vertex.
It’s a smallest possible graph. V(G)≠ φ

Finite Graph: A graph with finite


number of vertices and edges is
called as a finite graph.

Infinite Graph: A graph with V(G)=E(G)=∞


infinite number of vertices and
edges is called as a finite graph.
Amity School of Engineering & Technology

Types of Graphs
Multi Graph: A graph having
no self loops but having
parallel edges.

Pseudo Graph: A graph


having parallel edges
(possibly) and self loops

10
Amity School of Engineering & Technology

Types of Graphs

Directed Graph: A graph with


only directed edges is called as
a directed graph.

Undirected Graph: A graph with


only undirected edges is called
as a undirected graph.

Mixed Graph: A graph with


directed and undirected edges
is called as mixed graph
11
Amity School of Engineering & Technology

Types of Graphs

Simple Graph: A graph without


parallel edges and loops is
called as simple graph

12
Amity School of Engineering & Technology

Types of Graphs

Connected graph: In connected


graph, at least one path exists
between every pair of vertices.

Disconnected Graph: A graph in


which there does not exist any path
between at least one pair of vertices
is called as a disconnected graph.

13
Amity School of Engineering & Technology

Types of Graphs
Regular Graph: It is a graph
where each vertex has the
same degree. If degree of each
vertex is K, Then it is called a K-
regular graph
Note: Every complete graph is regular bit vice-versa is not valid

X Y

14
Amity School of Engineering & Technology

Types of Graphs

X Y
Note: V(G)=V(X) U V(Y) and no edge exit between
any two vertices in X or in Y

Complete Bipartite Graph(𝑲𝒎,𝒏): A


bipartite graph in which each
vertex of X is connected to each
and very vertex of Y. Y
X
Note:Complete Bi-partite graph is represented by Km,n where m,n denotes the no.of vertices in x and Y 15
Amity School of Engineering & Technology

Types of Graphs
Cyclic Graph: A graph with at
least one cycle is called as
cyclic graph.

Wheel Graph: A wheel graph


is obtained by adding a new
vertex to the cycle graph and
that vertex is connected to all
the other vertices of a cycle
graph.

16
Amity School of Engineering & Technology

Graph Terminology
Degree:( for undirected graph): Total number of edges connected to a
vertex.

In-Degree(deg(u)): Total number of edges incident at vertex u.

Out-Degree(deg(u)): Total number of edges outgoing from vertex u.

Isolated vertex: Vertex with degree zero(0).

Pendant Vertex: Vertex with degree 1

There are two types of vertices i.e the vertices with degree even and
vertices with degree odd.
Note: In-Degree and Out-degree is possible in case of Directed Graphs 17
Amity School of Engineering & Technology

Types of Graphs
Amity School of Engineering & Technology

Hand Shaking Theorem/ Sum of degree theorem


The sum of the degrees of the vertices of a graph G is
equal to twice the number of edges in G i.e.

Example: Find the sum of the degrees of the given graph

Solution:

19
Amity School of Engineering & Technology

Hand Shaking Theorem/ Sum of degree theorem


The sum of the degrees of the vertices of a graph G is
equal to

From the above equation , we can say that the


number of vertices with odd degree in G is always even.

20
Amity School of Engineering & Technology

Check Your Progress-1


Q1. A graph contains 21 edges and 3 vertices of degree 4
and all the other vertices of degree 2. Find the total number
of vertices.
Q2. A simple graph has 24 edges and degree of each vertex
is 4. Find the number of vertices.
Q3. Simple graph with 35 edges, 4 vertices of degree 5, 5
vertices of degree 4, 4 vertices of degree 3. Find the vertices
with degree 2?
Q4.

(c) Verify Hand Shaking Lemma


21
Amity School of Engineering & Technology

Check Your Progress-1


Q5. Find the maximum number of vertices in a simple
graph with 35 edges where degree of each vertex is at
least 3.
Q6. Find the minimum number of vertices possible in a
simple graph with 41 edges and degree of each vertex is
atmost 5

22
Amity School of Engineering & Technology

Practice Question
• Maximum degree of a graph >= Sum of degree of individual vertices
2E >= deg(V1) + deg(V2) + ... + deg(Vn)
2 * 35 >= 3 + 3 + ... + 3 ...(I),
70 >= 3n
23.33 >= n or 23 >= n
So the largest number of vertices are 23, with the given constraints

23
Amity School of Engineering & Technology

Havel–Hakami algorithm

This theorem is used to find whether a simple graph (No


self loop, no parallel edges) exists (valid) for a given
degree sequence or not.

Degree Sequence: Arrangement of degree of all the


vertices of a graph G in decreasing order(or increasing
order).
Ex: (3,3,2,2,1) , (3,2,2,1,1,1)

24
Amity School of Engineering & Technology

Havel–Hakami algorithm
Given a degree sequence (in decreasing order)
𝑆 = (𝑑1, 𝑑2, 𝑑3, … … . 𝑑 𝑛 ) 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝑑𝑖 ≥ 𝑑𝑖+1 [ Note that total n degrees are given]

Steps:
• If any 𝑑𝑖 ≥ 𝑛 then Fail. [No degree should be ≥ no. of given vertices]
• If there is an ODD numbers of odd degrees (or sum of all degrees is ODD) then
Fail
• If any 𝑑𝑖 < 0 then fail.
• If all 𝑑𝑖 = 0 [or only even no of 1’s and any no of 0’s) then report success. [This
a condition after applying algorithm]
STEP1: Reorder S in non decreasing order. Pick the vertex with highest degree
(say 𝑑1) . Lets call this value (𝑑1) = 𝐤.
STEP2: Remove 𝑑1 from S.
STEP3: Subtract 1 from the next 𝒌 elements from remaining sequence. That is
(×, 𝒅𝟐 − 𝟏, 𝒅𝟑 − 𝟏, … … . . , 𝒅𝒌+𝟏 −𝟏, 𝒅𝒌+𝟐 , … . . , 𝒅𝒏 )
STEP4: Repeat 1 to 3 until the stopping condition is met (i.e. If all 𝒅𝒊 = 𝟎 [or only
even no of 1’s and any no of 0’s)
25
Amity School of Engineering & Technology

Havel–Hakami algorithm
Question: Check whether a simple graph exits or not for the following degree sequences:
1) 3,2,1,0,0
2) 6,5,4,3,3,1
3) 3,2,1,5,0 that is
5,3,2,1,0

Solution:
1) k=3,
x,1,0,-1,0 [-ve values not possible] fail.
2) k=6, No enough degree exist to subtract (-1), Fail.
3) Number of odd degree is not EVEN, so Fail.

Note: The sequence obtained after applying algorithm might


not be nonincreasing. In such a case, you will have to
rearrange it in nonincreasing order before re-applying the
algorithm.
26
Amity School of Engineering & Technology

Havel–Hakami algorithm
Question: Check whether a simple graph exits or not for the following degree sequences:
1) 7,6,5,4,4,3,2,1
2) 6,6,6,6,3,3,2,2
3) 7,6,6,4,4,3,2,2
4) 8,7,7,6,4,2,1,1

Solution:

27
Amity School of Engineering & Technology

Example
Example: Check whether a simple graph exits for the given
degree sequence or not
7,6,5,4,4,3,2,1
Solution: Check:
No degrees is greater than no of vertices (n=8),
Sum of all degree=EVEN,
Number of ODD degree= EVEN, So we can proceed to apply algorithm.
7 6 5 4 4 3 2 1
5 4 3 3 2 1 0
3 2 2 1 0 0
1 1 0 0 0
0 0 0 0

0,0,0,0- 4nodes with degree 0 represents a NULL graph. 28


Amity School of Engineering & Technology

6,6,6,6,3,3,2,2
Solution: Check:
No degrees is greater than no of vertices (n=8),
Sum of all degree=EVEN,
Number of ODD degree= EVEN, So we can proceed to apply algorithm.

6 6 6 6 3 3 2 2
5 5 5 2 2 1 2
Rearran
ged 5 5 5 2 2 2 1
4 4 1 1 1 1
3 0 0 0 1
Rearran
ged 3 1 0 0 0
0 -1 -1 0

-1 means Invalid graph (Simple graph not possible).


29
Amity School of Engineering & Technology

Check your Progress-1

Check whether a simple graph exits for the given degree


sequence or not
a) 4,4,3,3,2,2
b) 5,3,3,3,2,2,1,1
c) 2,2,2,1,1,1,1
d) 3,3,3,3,2

30
Amity School of Engineering & Technology

Some more important theorem on Degree

Let G is a Graph with v vertices and e edges, and let 𝛿 is the


minimum degree and ∆ is the maximum degree, then
2. 𝑒
𝛿≤ ≤∆
𝑣

31
Amity School of Engineering & Technology

Some more important theorem on Degree

Q.1: What is the maximum number vertices of a graph having 10


edges and minimum degree=3.
Solution: 𝛿=3, e=10
2. 𝑒
𝛿≤
𝑣
So 𝑣 ≤ 2.𝑒
𝛿
20
𝑣≤
3
𝑣 ≤ 6.6
𝑣=6

32
Amity School of Engineering & Technology

Some more important theorem on Degree

Q.2: What is the maximum number vertices of a graph having 11


edges and minimum degree=3.
Solution: 𝛿=3, e=11
2. 𝑒
𝛿≤
𝑣
So 𝑣 ≤ 2.𝑒
𝛿
22
𝑣≤
3
𝑣 ≤ 7.3
𝑣=7
33
Amity School of Engineering & Technology

Walk, Path in Graph:

34
Amity School of Engineering & Technology

Graph Terminology
Walk: It is a sequence of alternating vertices and edges such that
edges and vertices can appear any number of times
Closed walk: When a walk begins and ends at the same vertex , then
it is called a closed walk.
Open Walk: When a walk does not begins and ends at the same
vertex , then it is called an open walk.

Trail: It is a walk in which vertices can be repeated but edges cannot


be repeated. It can be closed and open.
Circuit: A closed trail which begins and ends at the same vertex.is
circuit.
Path: An open walk in which no vertex and edge can appear more than once (No edge and no vertex
repeated). Simple Path: A path in which all vertices are distinct.
Trail: A path in which all edges are distinct

Cycle: A closed path which begins and ends at the same vertex (all vertices
are distinct 35
Amity School of Engineering & Technology

Example:

.
Walk: 1a6b7d2,1a6b7e3h4g5f7b6
open walk: 1c2d7f5f7
closed walk:1c2d7f5f7b6a1
Trail: 7f5g4h3e7b6
Circuit: Closed trail: 7f5g4h3e7, 1a6b7f5g4r3e7d2c1
Path: 1a6b7f5g4
Closed path=Cycle: 1a6b7d2c1

36
Amity School of Engineering & Technology

37
Amity School of Engineering & Technology

Example: Check whether the following sequences


represents trail, path , cycle, circuit.

a) a2b5d8e
b) a2b6e8d5b4c
c) a1a3c7e
d) a3c4b2a
e) a3c7e6b4c

38
Amity School of Engineering & Technology

Graph Terminology
A walk in a graph G is a finite sequence 𝑊 = {𝑣0 , 𝑒1 , 𝑣1 , 𝑒2 , … . . , 𝑒𝑘 , 𝑣𝑘 }
where 𝑣0 , 𝑣1 , … . . 𝑣𝑘 are vertices of G and 𝑒1 , 𝑒2 , … , 𝑒𝑘 are edges joining the
vertices 𝑣𝑖−1 and 𝑣𝑖 , 1 ≤ 𝑖 ≤ 𝑘 (Note that all the 𝑣𝑖𝘍𝑠 or 𝑒𝑖𝘍𝑠 may not be
distinct. There may be repetition.)
Note: In a walk, the vertices as well as edges can be repeated.
The number of edges contained in a walk, i.e. k, is called the length of the
walk W, and is denoted by 𝑙(𝑊).
Example: Consider the graph on 5 vertices and 7 edges given in Fig.2.
Find x1-x5 walks of length 8 and length 4, respectively

39
Amity School of Engineering & Technology

Graph Terminology
Example: Consider the graph on 5 vertices and 7 edges given in Fig.2.
Find x1-x5 walks of length 8 and length 4, respectively

40
Amity School of Engineering & Technology

Path, Close Walk, Open Walk, Cycle

41
Amity School of Engineering & Technology

Path, Close Walk, Open Walk, Cycle

42
Amity School of Engineering & Technology

Isomorphic (similar) Graph


[No of vertices, no. of edges, degree sequence and edge connectivity
must be retained in Both G1 and G2]

43
Amity School of Engineering & Technology

Example: Isomorphic Graphs

44
Amity School of Engineering & Technology

Method to check Isomorphic Graphs

In the given graph G1 and G2, check the following (in


sequence):

1. Number of vertices and No. of edges


2. Number of vertices with given degrees (or degree sequence).
3. Check degree of vertices along with their neighbor vertices.
4. Minimum cycle length, maximum cycle length in G1 and G2.
5. Check the isomorphism of complement graph of G1 and G2
(i.e.G1′ ≅ 𝐺2′).
6. Planner, non planner, connected, disconnected, chromatic
number etc.

45
Amity School of Engineering & Technology
Example

(i) Isomorphic-yes [mapping is as follows: e→4, d→1,c→2,….


(ii) 2nd column (1st graph)-Not a Isomorphic: Total number of vertices are different.
(iii)3rd column (1st graph)-Yes Isomorphic: mapping is as follows: b→5, e→6,….
(iv) 1st col,2nd Graph: Not a isomorphic: Reason: Same no. of vertices, same no. of edges,
same degree sequence, but triangle dce with same side vertex, but in G2 triangle with
different side vertex ( or max. cycle length is different, in G1:max cycle length is 5, but in
G2: max cycle length is 4)
(v) 2nd column (2nd graph): Yes: isomorphic: Vertex, edges, Degrees are same, and mapping
is: d-5, c-4, b-3, a-6, e-1,f-2. (neighbor degrees (say ‘e’) also same.
(vi) Not Isomorphic: Vertex, edges, Degrees are same. Only one vertex with degree 2. so b
is mapped with 6. but its neighbor vertex is not having same degrees.

46
Amity School of Engineering & Technology

Check your progress-1

47
Amity School of Engineering & Technology

Check your progress-2

Show the following graph G and H is isomorphic to each other:

48
Amity School of Engineering & Technology

Check your progress-3


Check whether the following graph G and H is isomorphic to
each other or not?

The Degree sequence of the graph G: 4,2,2,2,2,2,1 and for the graph
H is: 3,3,2,2,2,2,1,1. Hence not a Isomorphic graph.

49
Amity School of Engineering & Technology

Check your progress-4


Check whether the following graph G and H is isomorphic to
each other or not?

50
Amity School of Engineering & Technology

Graph colouring
Vertex colouring:

Note: We generally use the names of the colors, red, green and blue (if
using less number of colors up to 5 or 6). Suppose we need, say, 20
colors, can we still use the names to refer to the colors? Obviously NO.
So, In the diagrams, we will denote the colours as 1, 2,…. and so on.

51
Amity School of Engineering & Technology

Graph (vertex) colouring Algorithm

52
Amity School of Engineering & Technology

Graph (vertex) colouring Algorithm


We use the Welch-Powell Algorithm to obtain a coloring of G.
Ordering the vertices according to decreasing degrees yields the following
sequence: A5, A3, A7, A1, A2, A4, A6, A8

• The first color is assigned to vertices A5 and A1.


• The second color is assigned to vertices A3, A4, and A8.
• The third color is assigned to vertices A7, A2, and A6.
• All the vertices have been assigned a color, and so G
is 3-colorable.
Observe that G is not 2-colorable since vertices A1, A2, and A3,
which are connected to each other, must be assigned
different colors. Accordingly, χ(G) = 3.

Note: Consider the complete graph Kn with n vertices. Since every vertex is adjacent to every
other vertex, Kn requires n colors in any coloring. Thus χ(Kn) = n.

53
Amity School of Engineering & Technology

Graph (vertex) colouring Algorithm

54
Amity School of Engineering & Technology

Graph colouring
Q.1 Find the chromatic number of complete bipartite graph
𝐾𝑚,𝑛
Solution: 𝜒 𝐺 = 2

55
Amity School of Engineering & Technology

Vertex colouring

56
Amity School of Engineering & Technology

Vertex colouring

Find the chromatic number of the following graph

𝜒 𝐺 = 4 and
𝜒 𝐺 =3
57
Amity School of Engineering & Technology

vertex colouring

Q. Show that the chromatic number of the Petersen graph,


given in Fig. 6, is 3

58
Amity School of Engineering & Technology

Vertex colouring

Q. Find the chromatic number of the graph, given in


Fig. 7.

59
Amity School of Engineering & Technology

Vertex colouring
Q. Find the color classes in the two different colorings of the graph given in
Fig.8

60
Amity School of Engineering & Technology

Complete, Regular and Bipartite graph


• Complete Graphs
• A graph G is said to be complete if every vertex in G is connected to every
other vertex in G. Thus a complete graph G must be connected. The
complete graph with n vertices is denoted by Kn. Figure 8.1 shows the
graphs
K1 through K6.

61
Amity School of Engineering & Technology

Complete, Regular and Bipartite graph


Regular Graphs:
• A graph G is regular of degree k or k-regular if every vertex has degree k.
In other words, a graph is regular if every vertex has the same degree.
• The connected regular graphs of degrees 0, 1, or 2 are easily described.
The connected 0-regular graph is the trivial graph with one vertex and no
edges. The connected 1-regular graph is the graph with two vertices and
one edge connecting them. The connected 2-regular graph with n vertices
is the graph which consists of a single n-cycle. See Fig. 8-14.

62
Amity School of Engineering & Technology

Complete, Regular and Bipartite graph


Regular Graphs:
• The 3-regular graphs must have an even number of vertices since the sum
of the degrees of the vertices is an even number (Theorem 8.1). Figure 8-
15 shows two connected 3-regular graphs with six vertices. In general,
regular graphs can be quite complicated. For example, there are nineteen
3-regular graphs with ten vertices. We
• note that the complete graph with n vertices 𝐾𝑛 is regular of degree n − 1.

63
Amity School of Engineering & Technology

Bipartite graph
• A graph G is said to be bipartite if its vertices V can be partitioned into two
subsets M and N such that each edge of G connects a vertex of M to a
vertex of N. By a complete bipartite graph, we mean that each vertex of
• M is connected to each vertex of N; this graph is denoted by 𝑲𝒎, 𝒏 where m
is the number of vertices in M and n is the number of vertices in N, and,
for standardization, we will assume m ≤ n. Figure 8-16 shows the graphs
K2,3, K3,3, and K2,4, Clearly the graph Km,n has (m.n) edges.

64
Amity School of Engineering & Technology

Planar Graph

65
Amity School of Engineering & Technology
Planar Graph
Maps, Regions: A particular planar representation of a finite planar multigraph is
called a map. We say that the map is connected if the underlying multigraph is
connected. A given map divides the plane into various regions. For
example, the map in Fig. with six vertices and nine edges divides the plane into five
regions. Observe that four of the regions are bounded, but the fifth region,
outside the diagram, is unbounded.
Observe that the border of each region of a map consists of edges. Sometimes
the edges will form a cycle, but sometimes not. For example, in Fig. 8-22 the
borders of all the regions are cycles except for r3. However, if
we do move counterclockwise around r3 starting, say, at the vertex C, then we
obtain the closed path (C,D,E, F,E,C)
where the edge {E,F} occurs twice. By the degree of a region r, written deg(r), we
mean the length of the cycle or closed walk which borders r. We note that each
edge either borders two regions or is contained in a region
and will occur twice in any walk along the border of the region.

66
Amity School of Engineering & Technology
Planar Graph
Maps, Regions:

67
Amity School of Engineering & Technology

Characteristics of Planar Graph

Faces/Regions: The planar graph divides a plane into face or regions.


The regions bounded by edges are called interior regions and the region which
is not bounded is called an exterior or outer region.
Each region has some degree associated with it given as-
• Degree of Interior region = Number of edges enclosing that region.
• Degree of Exterior region = Number of edges exposed to that region.

Here, this planar graph splits the plane into 4 regions- R1, R2, R3 and R4 where-
• Degree (R1) = 3
• Degree (R2) = 3
• Degree (R3) = 3
• Degree (R4) = 5
Amity School of Engineering & Technology

Properties of a Planar Graph

• Sum of the degrees of all the vertices of a


planar graph is equal to twice the number
of edges present in the graph

Sum of the degrees of all the regions of a


planar graph is equal to twice the number of
edges present in the graph
Amity School of Engineering & Technology

Euler’s Formula for Number of Regions

If G be a connected planar graph with ‘e’ edges and ‘v’ vertices. Let ‘r’ be the
number of regions in Planar representation of G, Then
r=e-v+2.

Example:
Number of edges = 7
Number of vertices= 5
Number of regions= 7-5+2
=4
Amity School of Engineering & Technology

Detection of Planarity of a Graph

A graph G with ‘e’ number of edges and ‘v’ number of vertices is given.
Then G i planar if
1) A circuit of length 3 is possible in a graph, then
e≤ 3v-6
2) A circuit of length 3 is not possible, then,
e≤ 2n-4
Amity School of Engineering & Technology

Practice Question

Q1. If there are 20 vertices, each of degree 3, then into how many regions does
a representation of this planar Graph splits the plane.
Q2. A connected graph G with 25 vertices are 60 edges is given. Find the
number of regions for the graph.
Q3. Check whether the given graphs are planar or not.
Amity School of Engineering & Technology

Planar Graph

Example2:

73
Amity School of Engineering & Technology

Planar Graph

Theorem 2 (Euler’s formula) : If G is a connected planar graph with V vertices,


E edges and r regions, then the number r of the regions of G is given by
𝑟 = 𝐸 − 𝑉 + 2.
Example2:

74
Amity School of Engineering & Technology

Planar Graph

75
Amity School of Engineering & Technology

Planar Graph

Theorem3: If G is a planar graph, with 𝑣 ≥ 3, then 𝑒 ≤ 3𝑝 ─ 6.


Further, if G is also bipartite, we have 𝑒 ≤ 2𝑣 ─ 4.

76
Amity School of Engineering & Technology

Planar Graph

Example2: Show that 𝐾3,3 is non-planar Graph.


Solution:
Since 𝐾3,3 is bipartite, we can apply Theorem. Here v = 6 and e = 9. But,
2v ─4 = 10 > 9 = e. So, 𝐾3,3 is not planar.

77
Amity School of Engineering & Technology
Planar Graph
Theorem3 (Kuratowski):
To understand the statement, let us first consider Fig. 24 below.

In this figure, we have started with K4 and inserted vertices of degree 2 in


some of the existing edges. For example, in Fig. 24(b), we have inserted a
vertex a on the edge uv. In effect, this replaces the edge uv with two new
edges va and au. We have made similar changes in the graphs in Fig. 24(b),
Fig. 24(c), Fig. 24(d) and Fig. 24(e). In this way we have got subdivisions of
the graph in Fig. 24(a), as you shall now see.
Definition: A graph G(v,e) is a subdivision of a graph G if it can be obtained
by adding one or more vertices of degree 2 on the existing edges of G. In
other words, we ‘subdivide’ some of the existing edges.
78
Amity School of Engineering & Technology

Planar Graph
Theorem3 (Kuratowski):
In 1930, K. Kuratowski, a Polish mathematician, proved a necessary and
sufficient condition for a graph to be planar.

A graph is nonplanar if and only if it contains a subgraph homeomorphic to


𝐾3,3 or 𝐾5.
Or
A graph G is non-planar if and only if it contains a subdivision of K5 or K3,3 as
a subgraph.

79
Amity School of Engineering & Technology

Euler Graph and Hamiltonian Graph

(i) A trail is a walk in which no edge is repeated.


ii) A circuit is a trail whose starting vertex and end vertex
are the same.
iii) A trail which is not a circuit is sometimes called an
open trail.
iv)A circuit (resp. trail) in a graph G containing all the
edges of G, is called an Eulerian circuit (resp. Eulerian
trail).

v) A graph is Eulerian if it contains an Eulerian circuit.

80
Amity School of Engineering & Technology

Euler Graph Example

Now, let us consider some examples of Eulerian graphs. The simplest class
of example is a cycle, for example, C6 in Fig. 5(a). We can get another
example by adding a cycle of length 3 to the graph in Fig. 5(a) at v1 (see Fig.
5(b)).

This is also Eulerian because we can start at the vertex v1, traverse the
inner triangle, come back to v1 and traverse the outer cycle. We get yet
another Eulerian graph by incorporating a cycle of length 6 at v1 to Fig.5 (a)
(see Fig. 5(c)).
81
Amity School of Engineering & Technology

Euler graph
Euler Circuit: A closed trail which visits each and every
edge of the graph exactly once.
Euler graph: A connected graph G which contains an Euler
circuit is called an Euler graph.

Example:
An Euler cycle exits i.e.
BAFBCEFGCDEGB
Therefore, the given graph is an
Euler Graph.

82
Amity School of Engineering & Technology

Euler graph (Check)


Direct Method: If all the vertices of a graph G are having even
degree, then the graph G is an Euler graph.

Example:
deg(A)=deg(D)=2
deg(B)=deg(C)=deg(F)=
deg(G)=deg(E)=4
All the nodes are having even
degree. Therefore the given
graph is Euler’s graph

83
Amity School of Engineering & Technology

Euler graph (Example)

84
Amity School of Engineering & Technology

Euler graph (Example)

The degree sequence of G1 is {8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}. All the


vertices are even, and hence the graph is Eulerian. You can check that the
following gives an Eulerian circuit in it. {x1, x2, x3, x4, x1, x5, x6, x3, x7, x8,
x1, x9, x10, x11, x1, x12, x13, x14, x15, x1}. The degree sequence of G2 is {8,
4, 4, 4, 4, 4, 2, 2, 2, 2}. Since all the degrees are even, it is Eulerian. An
Eulerian circuit in G2 is {x1, x2, x3, x4, x5, x1, x3, x5, x2, x4, x1, x6, x7, x8, x1,
x9, x7, x10, x1}.
85
Amity School of Engineering & Technology

Semi Euler graph


Open Euler circuit: An open trail which visits each and
every edge of the graph exactly once. Starting and ending
vertices are not same.
Semi Euler graph: A connected graph G which contains an
open Euler circuit is called a Semi Euler graph (or Euler Path)

Example:
An Open Euler circuit exits i.e.
BADBCD
Therefore, the given graph is a Semi-
Euler Graph.
86
Amity School of Engineering & Technology

Semi Euler graph


Direct Method: A connected graph is semi Euler graph iff
either 0 (that is no vertices of odd degree) or exactly two
vertices of a graph have odd degrees.
Example:
deg(A)=deg(C)=2(even degrees)
deg(B)=deg(D)=3(odd degrees)
B is the starting vertex and D is the ending
vertex.
Therefore the given graph
is Semi-Euler graph.

87
Amity School of Engineering & Technology

Practice Question on Euler graph


Check which of the following are Euler’s or Semi-Euler’s graph

88
Amity School of Engineering & Technology

Practice Question on Euler graph


Check which of the following are Euler’s or Semi-Euler’s graph

89
Amity School of Engineering & Technology

Hamiltonian Graph
Hamiltonian Circuit: A simple circuit which traverse each
and every vertex of the graph exactly once except the
starting/ending vertex..
Hamiltonian graph: A connected graph G which contains a
Hamiltonian circuit is called a Hamiltonian graph.
Example:
An Hamiltonian cycle exits i.e.
ABCEDA
Therefore, the given graph is an
Hamiltonian Graph.
Note: Every complete graph and cycle graph are Hamiltonian graphs.
90
Amity School of Engineering & Technology

Hamiltonian Graph
Hamiltonian Path: If a path exist which traverse each and
every vertex of the graph exactly once but does not return to
the starting vertex is called a Hamiltonian path.
Example:
A path which traverse each and every
Vertex once exits
Therefore, the path ABCDE is
Hamiltonian path

91
Amity School of Engineering & Technology

Some theorems on Hamiltonian Graph

Dirac’s Theorem: If G is a simple graph with n vertices, where n ≥ 3 If deg(v) ≥ {n}/{2} for each
vertex v, then the graph G is Hamiltonian graph.

Example: Here, n=4, such that n ≥3


deg(G)=deg(E)=DEG(F)=DEG(H)=3
Degree of all the vertices is ≥ 2.5
Therefore the given graph is Hamiltonian graph
92
Amity School of Engineering & Technology

Some theorems on Hamiltonian Graph

Ore's Theorem - If G is a simple graph with n vertices, where n


≥ 2 if deg(x) + deg(y) ≥ n for each pair of non-adjacent vertices
x and y, then the graph G is Hamiltonian graph.

Example: Here, n=5, and n ≥ 2


For all non-adjacent vertices
deg(a)+deg(c)=3+3=6>no. of vertices of a graph.
deg(b)+deg(d)=3+3=6>no. of vertices of a graph.
Therefore the given graph is Hamiltonian graph.

93
Amity School of Engineering & Technology

Tree

• Tree is a non- linear data structure which shows


hierarchical relationship between the elements
• A tree is a connected undirected graph with no
circuits and loops.
• In a tree data structure, if we have N number of
nodes then we can have a maximum of N-1 number
of edges.

Not a tree A tree


Amity School of Engineering & Technology

Rooted Tree

• A rooted tree is a tree in which one vertex has been designated as the
root and every edge is directed away from the root.
• Different choice of root produce different root tree.
Amity School of Engineering & Technology

Weighted Tree

• A tree in which weight or cost of moving


from one node to another is defined on
all the edges of the tree is called a
weighted tree.
Amity School of Engineering & Technology

Properties of Tree

Root- Node at the top of the tree is


root.
Parent- Any node except the root
has one edge upward to a node
called parent.
Child- Node below a given node
connected by its edge downward.
Leaf Node: Node with no children
Sibling- Nodes with same parent .
Subtree- Children of a node are
called subtrees.
Amity School of Engineering & Technology

Properties of Tree

Level- Level presents the generation of a


node. Root is at level 0. Its children are at
level one more than the parent node.
Internal Node- Node with at least one child
External Node( Leaf)- Node with no
children.
Path- It is the sequence of consecutive
edges from source to destination node.
Amity School of Engineering & Technology

Some key Terms


Degree of a node- The number of children of
a node
Degree of a tree- The highest degree of a any
node of a tree
Height of a node- It is the length of the
longest path from a node to a leaf.
Height of a tree- it is the height of the root
Depth of a node- It is the length of the path
from the root to a node.
Depth of a tree-It is the length of the longest
path from root to the leaf.
Amity School of Engineering & Technology

Binary Tree
A tree in which each node contains at most two children
is called as Binary tree. One is known as the left child
and the other is known as the right child.

Note: Binary tree contains at most 2N nodes at level N except at level 0


Amity School of Engineering & Technology

Types of Binary tree


There are two types of binary
tree
1. Complete Binary tree
2. Strictly binary tree.
Amity School of Engineering & Technology

Complete Binary Tree


The binary tree is said to be complete if all its levels,
except possibly the last , have maximum number of
nodes, and if all the nodes at the last appear as far left
as possible.
Amity School of Engineering & Technology

Strictly Binary Tree


If every non leaf node in a binary tree has exactly two
children then the tree is strictly Binary tree.
Amity School of Engineering & Technology (CSE)

MINIMUM COST SPANNING TREE (MCST) PROBLEM

104
Amity School of Engineering & Technology (CSE)
Important Properties of Spanning tree

Definition: 𝐺𝑖𝑣𝑒𝑛 𝑎 𝑔𝑟𝑎𝑝ℎ 𝐺 = (𝑉, 𝐸).


𝐴𝑛 𝑆𝑝𝑎𝑛𝑛𝑖𝑛𝑔 𝑡𝑟𝑒𝑒 𝑇 𝑉’, 𝐸’ ⊆ 𝐺 𝑉, 𝐸 ,
𝑤ℎ𝑒𝑟𝑒 𝑇 𝑉’ = 𝐺 𝑉 𝑎𝑛𝑑 𝑇 𝐸’ = 𝑉 − 1
Properties of Spanning Tree:
1. Spanning tree is having (n-1) edges, where n is a no. of vertices in G.
2. If a Graph is complete (Kn) then no. of possible spanning tree= 𝑛𝑛−2
3. There is no cycle in spanning tree.
4. Number of vertices and edges is same in all spanning tree.

105
Amity School of Engineering & Technology (CSE)

MINIMUM COST SPANNING TREE (MCST) PROBLEM

106
Amity School of Engineering & Technology (CSE)

MINIMUM COST SPANNING TREE (MCST) PROBLEM

107
Amity School of Engineering & Technology (CSE)

MINIMUM COST SPANNING TREE (MCST) PROBLEM

108
Amity School of Engineering & Technology (CSE)
Example1:
Apply Kruskal’s Algorithm on the given graph to fond Minimum Cost Spanning tree

109
Amity School of Engineering & Technology (CSE)

Steps Edge considered Connected Components Spanning Forest (A)

---- {1} {2} (3} {4} {5} {6} {7}


Initialization

110
Amity School of Engineering & Technology (CSE)

Steps Edge considered Connected Components Spanning Forest (A)

111
Amity School of Engineering & Technology (CSE)
Example1:
Apply Kruskal’s Algorithm on the given graph to fond Minimum Cost Spanning tree

112
Amity School of Engineering & Technology

Prim’s Algorithm
Step 1: Select any vertex as the starting

Step 2: Select the shortest edge connected to that vertex

Step 3: Select the shortest edge connected to any vertex already connected

Step 4: Repeat step 3 until all vertices have been connected


Amity School of Engineering & Technology (CSE)

Prim’s Algorithm

114
Amity School of Engineering & Technology (CSE)

Steps Edge considered Connected Components Spanning Forest (T)


(u,v) (A)

Initialization ---- {1} (1)

115
Amity School of Engineering & Technology (CSE)

Steps Edge considered Connected Components Spanning Forest (T)


(u,v) (A)

116
Amity School of Engineering & Technology

Example: Number of Spanning trees for a complete


graph

Note: Here n=3, number of spanning trees= 3(3-2)=3


Amity School of Engineering & Technology

Kruskal’s Algorithm

1. Sort all the edges in non-decreasing order of their weight.


2. Pick the smallest edge. Check if it forms a cycle with the spanning tree
formed so far. If cycle is not formed, include this edge. Else, discard it.
3. Repeat step2 until all the vertices are added in the spanning tree.
Amity School of Engineering & Technology

Kruskal’s Algorithm

Example:

Arrange all edges in their increasing order of weight


Amity School of Engineering & Technology

Kruskal’s Algorithm

Note: costs 4, 5 and 6 will create circuits so will be


discarded
Amity School of Engineering & Technology

Prim’s Algorithm

Example:

Choose any arbitrary node as root node, say S


Amity School of Engineering & Technology

Prim’s Algorithm
Amity School of Engineering & Technology

Practice Questions:
Find minimum Spanning tree for the following using Kruskal’s and Prim’s Algorithm
1. 2.

3. 44.
Amity School of Engineering & Technology (CSE)

Check your progress-1(Home assignment)

124
Amity School of Engineering & Technology (CSE)

Check your progress-1

125
Amity School of Engineering & Technology (CSE)
Check your progress-1

126
Amity School of Engineering & Technology

End of Module#4
Amity School of Engineering & Technology

1
Amity School of Engineering & Technology

Contents:
❑Algebraic structure with one binary
operation,
❑semi groups, monoid and groups,
❑isomorphism, homomorphism, cyclic
group.

2
Module V:
❑ Definition of Algebraic Structures,
❑ SemiGroup
❑ Monoid
❑ Group

3
Amity School of Engineering & Technology

Objectives

After completing this section, you will be able to

1. Understand the Concepts of Group, Semi-


group, Abelian Group etc.
2. Explain the concept of isomorphism,
homomorphism, cyclic group etc.

4
Amity School of Engineering & Technology

5
Amity School of Engineering & Technology

Some important Set

6
Amity School of Engineering & Technology

Binary operations

Definition. Let A be a non-empty set. Then a mapping 𝑓 ∶ 𝐴 × 𝐴 → 𝐴 is


called a binary operation. Thus, a binary operation is a rule that assigns
to each ordered pair (a, b)∈A×A an element of A.

Any operation such as 𝑎 + 𝑏, 𝑎 − 𝑏, 𝑎 × 𝑏 (or function of two variables:


𝑎𝑏 , min(𝑎, 𝑏), max(𝑎, 𝑏) etc. is called Binary operation (say *), if
∀𝒂, 𝒃 ∈ 𝑮, 𝒕𝒉𝒆𝒏 𝒂 ∗ 𝒃 ∈ 𝑮, 𝒂𝒏𝒅 𝒂 ∗ 𝒃 is unique also.

We can also say that the set G is closed with respect to the operation.

7
Amity School of Engineering and
Technology
Algebraic Structure

The Algebraic Structure consist of two components:


1. A non empty set on which the operation is to be performed. For
example-G={1,2,3,4}
2. The binary operator that is used to perform the operation on the
elements of set. Let the operator can be represented by *.

Definition of Algebraic Structure


If a set A with respect to operator * satisfy the closure property then it
is called an algebraic Structure

8
Amity School of Engineering and
Technology
Closure property

The element of the set are said to be closed under particular


operation if the element c generated by operation on any two
elements a and b of the given set also belongs to the same set.

Example: A set N of Natural numbers is closed under addition.


i.e. 2 is a natural number, 3 is a natural number
2+3=5 which is again a natural number.
Therefore, (N,+) is an algebraic structure.

9
Amity School of Engineering and
Technology
Practice Questions
Find which of the following are Algebraic Structures.

1. (N,+) 11. (R,*)

2. (N,-) 12. (R,/)

3. (N,*) 13. (EVEN,+)

4. (N,/) 14. (EVEN,*)

5. (Z,+) 15. (ODD,+)

6. (Z,-) 16. (ODD,*)

7. (Z,*) 17. (RE,.)

8. (Z,/) 18. (RE,+)

9. (R,+) 19. (M,+)

10. (R,-) 20. (M,*)

10
Amity School of Engineering and
Technology
Practice Questions
Find which of the following are Algebraic Structures.

1. (N,+)--Y 11. (R,*)---Y

2. (N,-)---NO 12. (R,/) -----N

3. (N,*)---Y 13. (EVEN,+)-----Y

4. (N,/)---NO 14. (EVEN,*)-----Y

5. (Z,+)---Y 15. (ODD,+)-----N

6. (Z,-)----Y 16. (ODD,*)-------Y

7. (Z,*)----Y 17. (RE,.)------Y

8. (Z,/)-----NO 18. (RE,+)------Y

9. (R,+)----Y 19. (M,+)-----Y

10. (R,-)----Y 20. (M,*)-------Y

11
Amity School of Engineering & Technology

Algebraic Structure (Mathematical Structure)


A non empty set G equipped with some operations is called an algebraic
structure.

GROUP:

12
Amity School of Engineering & Technology

Algebraic Structure (Mathematical Structure)

13
Amity School of Engineering and
Technology
Practice Questions

Let S is the set of two element’s as defined below:


S= {1,-1}
Verify that the given set forms the algebraic structure *
a. * is defined as binary multiplication
b. * is defined as binary addition

14
Amity School of Engineering and
Technology
Semigroup

If an Algebraic Structure satisfy associative property then it is


called a semi group.
OR
The binary operator should follow two properties on the set.
1.Closure Property and
2.Associative Property

Associative Property: A set ‘A’ with respect to operator * is said to


satisfy Associative property if for every a,b,c € A
(a*b)*c=a*(b*c)

15
Amity School of Engineering and
Technology
Practice Questions
Find which of the following are SemiGroups.
1. (N,+)--Y Y 11. (R,*)---Y Y
2. (N,-)---NO 12. (R,/) -----N
3. (N,*)---Y Y 13. (EVEN,+)-----Y Y
4. (N,/)---NO 14. (EVEN,*)-----Y Y
5. (Z,+)---Y Y 15. (ODD,+)-----N
6. (Z,-)----Y N 16. (ODD,*)-------Y Y
7. (Z,*)----Y Y 17. (RE,.)------Y y
8. (Z,/)-----NO 18. (RE,+)------Y y
9. (R,+)----Y Y 19. (M,+)-----Y Y
10. (R,-)----Y N 20. (M,*)-------Y Y (Remember
Matrix chain mault.
(associative
property satisfied)

16
Amity School of Engineering and
Technology
Monoid

If a Semigroup satisfy identity property then it is called a Monoid.


OR
The binary operator should follow three properties on the set.
1.Closure Property and
2. Associative Property
3. Identity Property

Identity Property: A set ‘A’ with respect to operator * is said to satisfy


Identity property if for every a € A, there is an element ‘e’ such that
a*e=e*a=a

17
Amity School of Engineering and
Technology
Find which of the following are Monoids.
1. (N,+)--Y Y Y 11. (R,*)---Y Y Y

2. (N,-)---NO n 12. (R,/) -----N

3. (N,*)---Y Y Y 13. (EVEN,+)-----Y Y Y

4. (N,/)---NO N 14. (EVEN,*)-----Y Y Y

5. (Z,+)---Y Y Y 15. (ODD,+)-----N Y


6. (Z,-)----Y N 16. (ODD,*)-------Y Y Y
7. (Z,*)----Y Y Y 17. (RE,.)------Y y Y
8. (Z,/)----NO N 18. (RE,+)------Y y Y
9. (R,+)----Y Y Y 19. (M,+)-----Y Y Y
10. (R,-)----Y N 20. (M,*)-------Y Y (associative Y
property
satisfied for
matrix multi)

18
Amity School of Engineering and
Technology
Group

If a Monoid satisfy Inverse property then it is called a Monoid.


OR
The binary operator should follow four properties on the set.
1.Closure Property and
2. Associative Property
3. Identity Property
4. Inverse Property

Inverse Property: A set ‘A’ with respect to operator * is said to satisfy


inverse property if for every a € A, there is an element a-1 such that
a* a-1 = a-1 *a=e

19
Amity School of Engineering and
Technology
1. (N,+)--Y Y Y N N 11. (R,*)---Y Y Y Y N

2. (N,-)--- n N 12. (R,/) -----N N


NO
3. (N,*)---Y Y Y Y N 13. (EVEN,+)-----Y Y Y Y Y

4. (N,/)--- N N 14. (EVEN,*)-----Y Y Y N N


NO
5. (Z,+)---Y Y Y Y Y 15. (ODD,+)-----N Y N N

6. (Z,-)----Y N N 16. (ODD,*)-------Y Y Y Y N


7. (Z,*)----Y Y Y Y N 17. (RE,.)------Y y Y Y N
8. (Z,/)---- N N 18. (RE,+)------Y y Y Y N
NO
9. (R,+)---- Y Y Y Y 19. (M,+)-----Y Y Y Y (all N
Y 0’s)
10. (R,-)---- N N 20. (M,*)-------Y Y Y Y (all N
Y (associati diagon
ve al 1,
property identit
satisfied y
for matrix
matrix
multi) 20
Amity School of Engineering and
Technology
Abelian Group

If a group satisfy Commutative property then it is called an Abelian


Group.
OR
The binary operator should follow five properties on the set.
1.Closure Property and
2. Associative Property
3. Identity Property
4. Inverse Property
5. Commutative Property

21
Amity School of Engineering and
Technology
Commutative Property

A set ‘A’ with respect to operator * is said to satisfy commutative


property if for every a,b € A,
a* b = b *a

Example: (Z, +) is a group which satisfy commutative property,


Therefore (Z, +) is an abelian group.

22
Amity School of Engineering and
Technology
Practice Questions
Q1. Find the type of a structure (N, *) where N is a natural number and
a*b=ab

a. Semigroup
b. Not Semigroup
c. Monoid but not a Group
d. Group

23
Amity School of Engineering and
Technology
Practice Questions
Q1. Find the type of a structure (Z, *) where Z is a set of all integers and
𝑎 ∗ 𝑏 = max(𝑎, 𝑏)

a. Semigroup
b. Not Semigroup
c. Monoid but not a Group
d. Group

24
Amity School of Engineering and
Technology
Practice Questions
Q1. Find the type of a structure (Z, *) where Z is a set of all integers and
𝑎 ∗ 𝑏 = m𝑖𝑛(𝑎, 𝑏)

a. Semigroup
b. Not Semigroup
c. Monoid but not a Group
d. Group

25
Amity School of Engineering and
Technology
Practice Questions
Q2. Let Q+ = set of positive rational number and 𝑎 ∗ 𝑏 = 𝑎𝑏3
if (Q+ , *) is an abelian group, which of the following is not true?
a) e=3
b) a-1= 9/a
c) (23)−1 = 6
d) 3-1= 3

Q3. Which of the following are groups?


a) 0, ±2, ±4, ±6, … . , ∞ , +
b) 0, ±𝑘, ±2𝑘, ±3𝑘, … . , ∞ , + , where 𝑘 ∈ 𝑁
c) 2𝑛 ∶ 𝑛 𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 , ×

26
Amity School of Engineering and
Technology
Finite Group

A group with finite number of elements is called a finite group.


Order of a Group (denoted by O(G))= number of distinct elements
present in the group G.

Example: Check whether ({-1,1}, ×) is a group or not


Solution: The given structure is a finite group of order
O(G)=2
Example2: Whether the following finite set is a group or not?
a. ({0,1,2,3,4}, +)
b. ({0,1}, +)
c. ({0,1}, X)

27
Amity School of Engineering and
Technology
Practice Questions

Q1. Check whether fourth root of unity i.e ({1,-1, i, -i}, *) is a group or
not. (Note that 𝑖 = −1 and 𝑖 2 = −1 )

Q.2: Check whether cube root of unity i.e ({1, 𝜔, 𝜔2 }, ×) is a group or


not. (Note that 𝜔3 = 1 )

28
Amity School of Engineering and
Technology
Addition Modulo (+ 𝑚 ) and Multiplicative Modulo (× 𝑚)

Example:
Table for ({0,1,2,3}, +4) and ({1,2,3,4}, ×5)

29
Amity School of Engineering and
Technology
Practice Questions

Q. Which of the following are groups?


1. ({0,1,2,3}, ×4)
2. ({1,2,3}, ×4)
3. ({1,2,3,4,5,6}, ×7)
4. ({2,3,4,5,6}, ×7)
5. ({1,3,5,7}, ×8)
6. ({1,2,4,7,8,11,13,14}, ×15)

30
Amity School of Engineering and
Technology
Practice Questions

Q. Which of the following are groups?


1. ({1,2,3,4}, +5)
2. ({0,1,2,3}, +4 )
3. ({0,2,4,6}, +8 )
4. ({0,1,3,5}, +7 )
5. ({0,2,3,4,6,8}, +9)

31
Amity School of Engineering and
Technology
Check your Progress
Q. Which of the following are groups?
1. ({0,1,2,3,4}, ×5)
2. ({0,1,2,3,4}, +5)
3. ({1,2,3}, ×5)
4. ({1,2,3}, +5)
5. ({0,1,2,3,4,5}, ×6)
6. ({0,1,2,3,4,5}, +6)
7. ({1,2,3,4,5}, ×6)
8. ({1,2,3,4,5}, +6)
9. ({0,2,4}, +6)
10. ({0,2,4}, ×6)
11. ({1,3,5,7}, +8)
32
Amity School of Engineering and
Technology
Order of an element of a Group

If (G,*) be a finite group. Then order can defined for every a € G and
denoted by O(a) as
O(a)=n
Where n is the least positive integer which satisfy the equation an=e,
and e is the identity element.
Order of an identity element is 1.
Let (G,*) be a finite group.
a € G,
a2= a*a, here * is the operator defined for the group
and 2 is the number of times the operand is going to appear in the
equation to derive the identity.

33
Amity School of Engineering and
Technology
Example

Find order of all the elements of a finite group G= ({0,1,2,3},+4)


Solution:
Here 0 is an entity element.
And Order of identity element is 1
i.e 𝑂(0) = 1
𝑂(1) = 4 𝑎𝑠 14 = 0
𝑂(2) = 2 𝑎𝑠 22 = 0
𝑂(3) = 4 𝑎𝑠 34 = 0

Question: a)Find order of all the elements of a finite group G= ({1,-1,i,-i},*)


b)Find order of all the elements of a finite group G= ({1,3,5,7},*8)

34
Amity School of Engineering and
Technology
Cyclic Group
Generator (or Generating) element: In a Group (G,*), an element ‘a’ is called a
generator, if 𝑎 ∈ 𝐺 and ∀ 𝑎 ∈ 𝐺 can be generated (or represented) using powers of a.
Cyclic Group:
A Group (G,*) is said to be cyclic group, if it contains at least one generator element.

Ex1: ({0,1,2,3}, +4) here 1 and 3 is a generator.

Ex2: ({1,3,5,7}, ×8) not having any generator element.

Note: A cyclic group is a group that can be generated by a single element. Every
element of a cyclic group is a power of some specific element which is called a
generator.
A cyclic group can be generated by a generator ‘g’, such that every other element of
the group can be written as a power of the generator ‘g’.

35
Amity School of Engineering and
Technology
Cyclic Group
Example: The set of numbers {1,−1,i,−i} under multiplication operation
is a cyclic group.
• Here i and –i can generate all the element of the set
• As i1 = I, i2 =-1 , i3 =-i, i4 =1
Hence the set is cyclic group.

36
Amity School of Engineering and
Technology
Homomorphism

If (G, *) and (G’, o ) are two groups, the function f :G → G’ is called a


group homomorphism if f (a *b) = f(a) o f(b) for all a, b ∈ G.

37
Amity School of Engineering and
Technology
Homomorphism

Example: Let be R the group of all real numbers with operation


addition, and let R+ be the group of all positive real numbers with
operation multiplication. The function f : R → R+ , defined by
f (x) = ex .Show that the function f is homomorphism

Solution: The given function is homomorphism for any x,y ∈ R


F(x+y)=ex+y = e x *e y = f (x)*f (y).

38
Amity School of Engineering and
Technology
Practice Question

Q1.

Q2.

Q3.

39
Amity School of Engineering and
Technology
Isomorphism

If a Group Homomorphism is Bijective i.e. one to one and onto then


the function is called a group Isomorphism.
OR
A group isomorphism is a bijective group homomorphism. If there is
an isomorphism between the groups (G, *) and (G’, o), we say that (G,
*) and (G’, o) are isomorphic and write (G, *) ≈ (G’, o ).

40
Amity School of Engineering and
Technology
Practice Question

Q1.

Q2.

Q3. Let be R the group of all real numbers with operation addition, and let R+ be
the group of all positive real numbers with operation multiplication. The
function f : R → R+ , defined by f (x) = ex .Show that the function f is
Isomorphism

Q4. Let be R the group of all real numbers with operation addition, and let R+ be
the group of all positive real numbers with operation multiplication. The
function f : R → R+ , defined by f (x) = 2x .Show that the function f is
Isomorphism 41
Amity School of Engineering & Technology

Binary operations-examples

42
Amity School of Engineering & Technology

Binary operations-examples

43
Amity School of Engineering & Technology

Binary operations-examples

44
Amity School of Engineering & Technology

Algebraic Structure (Mathematical Structure)


Ex.1: The set Z of integers is a Group under the operation of Addition,
But (Z,×) is not.

For example, 2 ∈ 𝑍, then its multiplicative inverse is 1Τ2 which is not


an integer but a rational number.

45
Amity School of Engineering & Technology

Algebraic Structure (Mathematical Structure)

46
Amity School of Engineering & Technology

Algebraic Structure (Mathematical Structure)

47
Amity School of Engineering & Technology

Finite and Infinite Group:


Let (G,*) is a group then it said to finite if the set G consists finite
number of distinct elements otherwise it is finite.

Order of a Group:
The number of distinct elements in a group is called the order of the
group denoted by O(G).

48
Amity School of Engineering & Technology

49
Amity School of Engineering & Technology

Hence G is a
group under
multiplication

50
Amity School of Engineering & Technology

51
Amity School of Engineering & Technology

Example4:

52
Amity School of Engineering & Technology

53
Amity School of Engineering & Technology

Check your Progress-1

54
Amity School of Engineering & Technology

Check your Progress-1

55
Amity School of Engineering & Technology

Subgroup:

56
Amity School of Engineering & Technology

57
Amity School of Engineering & Technology

Semigroup:

58
Amity School of Engineering & Technology

Homomorphic mapping (Homomorphism)

59
Amity School of Engineering & Technology

Isomorphic mapping (Isomorphism)

60
Amity School of Engineering & Technology

61
Amity School of Engineering & Technology

62
Amity School of Engineering & Technology

63
Amity School of Engineering & Technology

64
Amity School of Engineering & Technology

End of Module-5
*****************************

65

You might also like