DM @group5

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

DEFINE THE PROPERTIES OF A RELATION ON A

SET USING THE MATRIX REPRESENTATION OF


THAT RELATION WITH EXAMPLE

A PROJECT REPORT
Submitted by
DIBYANSU SEKHAR DAS(230101120147)
SANJAYA KUMAR PANDA(230101120155)
RUDRA LENKA(230101120156)
YAJNADATTA PATTANAYAK(230101120157)
ASHU KUMAR(230101120161)
in partial fulfillment for the award of the

degree of
BACHELOR OF TECHNOLOGY

in
COMPUTER SCIENCE AND ENGINEERING

SCHOOL OF ENGINEERING AND TECHNOLOGY


PARALAKHEMUNDI CAMPUS
CENTURION UNIVERSITY OF TECHNOLOGY AND MANAGEMENT
ODISHA

MAY 2024
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
SCHOOL OF ENGINEERING AND TECHNOLOGY
PARALAKHEMUNDI CAMPUS

BONAFIDE CERTIFICATE

Certified that this project report “Define the properties of a relation on a set using

the matrix representation of that relation with examples” is the bonafide work of

“DIBYANSU SEKHAR DAS” who carried out the project work under my

supervision. This is to further certify to the best of my knowledge, that

this project has not been carried out earlier in this institute and the university.

SIGNATURE

(Dr. Ashok Mishra)


Dean SoAS

Certified that the above mentioned project has been duly carried out as per the
norms of the college and statutes of the university.

SIGNATURE
(Dr.Debendra Maharana)
HEAD OF THE DEPARTMENT
Professor of Computer Science and Engineering

DEPARTMENT SEAL

i
DECLARATION

I hereby declare that the project entitled “Define the properties of a relation on

a set using the matrix representation of that relation with examples” submitted for

the “Minor Project” of 2 st semester B. Tech in Computer Science and Engineering

is my original work and the project has not formed the basis for the award of any

Degree / Diploma or any other similar titles in any other University / Institute.

Name of the Student: DIBYANSU SEKHAR DAS

Signature of the Student:

Registration No:230101120147

Place:PARALAKHEMUNDI

Date:

ii
ACKNOWLEDGEMENTS

I wish to express my profound and sincere gratitude to Dr. ASHOK


MISHRA,Dean ,SoAS, Paralakhemundi Campus, who guided me into the intricacies of
this project nonchalantly with matchless magnanimity.

I thank Prof. DEBENDRA MAHARANA, Head of the Dept. of Department of


Computer Science and Engineering, SoET, Bhubaneswar Campus and Dr. PRAFULLA
KUMAR PANDA, Dean, School of Engineering and Technology, Paralakhemundi
Campus for extending their support during Course of this investigation.

I would be failing in my duty if I don’t acknowledge the cooperation rendered


during various stages of image interpretation by Dr. ASHOK MISHRA.

I am highly grateful to Dr. ASHOK MISHRA who evinced keen interest and
invaluable support in the progress and successful completion of my project work.

I am indebted to Dr. ASHOK MISHRA for their constant encouragement, co-


operation and help. Words of gratitude are not enough to describe the accommodation
and fortitude which they have shown throughout my endeavor.

Name of the Student:DIBYANSU SEKHAR DAS

Signature of the Student:

Registration No:230101120147

Place:

Date:

iii
TABLE OF CONTENTS

TITLE PAGE NO.

CERTIFICATE i
DECLARATION ii
ACKNOWLEDGEMENT iii

1. CHAPTER – 1 INTRODUCTION...................................................................... 6

2. CHAPTER – 2 PROPERTIES OF A RELATION.............................................. 7 – 8

3. CHAPTER – 3 MATRIX REPRESENTATION OF RELATION.......................... 9

4. CHAPTER – 4 PROPERTIES OF A RELATION USING ITS MATRIX

REPRESENTATION ............................................................................................10 – 15

CONCLUSION

REFERENCES

5
INTRODUCTION
A relation on a set is a way to associate elements of the set with each other. In mathematics,
relations are often studied for their properties and representations. One common way to represent
relations is through matrices, particularly binary matrices. Let's explore the properties of a relation
on a set using the matrix representation.
Relation on a Set:
1. Definition:
 A relation on a set A is a subset of the Cartesian product A×A.
 If R is a relation on set A, and a,b are elements of A, then (a,b) is in R if and only
if
2. Matrix a is related to b.
 A binary matrix can represent a relation on a set. The rows and columns of the
Representation:
matrix correspond to the elements of the set, and the entry in the (i,j) position is 1 if
(ai,aj) is in the relation, and 0 otherwise.
3. Properties:

a. Reflexive:
 A relation is reflexive if every element is related to itself.
 Matrix representation: All diagonal elements in the matrix are 1.
b. Symmetric:
 A relation is symmetric if a is related to b implies that b is related to a.
 Matrix representation: The matrix is symmetric.
c. Antisymmetric:
 A relation is antisymmetric if a is related to b and b is related to a only when
a=b.
 Matrix representation: If (i,j) and (j,i) are both 1, then i=j.
d. Transitivitive:
 A relation is transitive if a is related to b and b is related to c implies that a is
related to c.
 Matrix representation: If (i,j) and (j,k) are both 1, then (i,k) should be 1.
1. Example:
 Let A={1,2,3} and R={(1,1),(1,2),(2,2),(3,3)}.
 Matrix representation:

1 1 0
0 1 0
0 0 1

 This relation is reflexive, symmetric, and transitive.


In summary, the matrix representation of relations on a set provides a convenient way to
analyze and understand their properties, such as reflexivity, symmetry, antisymmetry, and
transitivity. These properties play a crucial role in various mathematical and computer science
applications, including database management, graph theory, and formal language theory.

6
PROPERTIES OF RELATION

Relation are a fundamental concept in mathematics and computer science.Here


are some important properties of relation:

PROPERTIES OF
RELATION
1.
REFLEXIVE .

A relation R on set A is reflexive if,for every element a in A, the pair


(x,x) belongs to R. in other words, every element is related to itself
If (x,x) ∈ ∀x∈
R; A
In other
word:
IA ⊆
R.
2. IRREFLEXIVE

A relation R is irreflexive if, for no element a in A, the pair (a,a)


to R. Inbelongs
other words, no element is related to
itself
 iff (x, x) ∉ R ∀ x ∈
A.
 In other word:- IA 𝖠 R =
Φ.
3 SYMMETRIC
. A relation R is symmetric if, for every pair (a,b) in R, the pair (b,a)
also to R. In simple terms, if a is related to b, then b is also related to
belongs
a
Iff (x,y) ∈ R ⇒(y,x) ∈ R; ∀x,y ∈
A.
In other word:- R=R –1

7
4. ASYMMETRIC

A relation R is asymmetric if, for every pair (a,b) in R, the pair (b,a)
does not belong to R unless a=b. It's a stricter condition than antisymmetry.
iff (x,y) ∈R ⇒ (y,x)∉ R ; ∀x,y ∈ A
In other word:- R ∩ R –1= Φ
5. ANTISYMMETRIC

A relation R is antisymmetric if, for every pair (a,b) in R where a=b, the pair
(b,a) does not belong to R. In other words, if a is related to b, then b is not
related to a unless a=b

Iff (x,y) ∈ R 𝖠 (y,x) ∈ R ⇒ X=Y; ∀X, Y ∈ A.

In other word:- R ∩ R –1 ⊆ IA
6. TRANSITIVE

A relation R is irreflexive if, for no element a in A, the pair (a,a)


belongs to R. In other words, no element is related to itself.
Iff (x,y) ∈ R 𝖠 (y,z) ∈R ⇒ (x,z) ∈ R;∀
X,Y,Z ∈ A. In other words:- R is transitive iff R2
⊆ R.

8
MATRIX REPRESENTATION OF A RELATION (MR)

The matrix representation of a relation is a way to represent a relation


between elements of a set using a matrix. Let's consider a set A with n elements.
The matrix representation of a relation R on A is a square matrix MR of size n×n,
where the entry in the i-th row and j-th column, denoted as MR[i][j], is 1 if
(ai,aj) is in the relation R, and 0 otherwise.
Here's a step-by-step explanation of how to construct the matrix
representation of a relation:
1. Identify the Set A: Determine the set A on which the relation is defined.
2. Assign Indices: Assign indices to the elements of A={a1,a2,
…,an}, then index ai as i.
3. Construct the Matrix: Create an n×n matrix MR filled with 0s. Then, for
each pair (ai,aj) in the relation R, set MR[i][j]=1.

Example:
Let's consider a set A={a,b,c} and a
relation R defined by (a,a),(b,c),(c,b). The
matrix representation MR would be:
1 0 0
0 0 1
0 1 0

In this matrix:
 MR[1][1]=1 because (a,a) is in R.
 MR[2][3]=1 because (b,c) is in R.
 MR[3][2]=1 because (c,b) is in R.
 All other entries are 0 because the corresponding pairs are not
in R. This matrix provides a concise and systematic represent
relationships between elements in a set. The properties of the relation can
way to
often be analyzed by examining the structure of this matrix.

9
PROPERTIES OF A RELATION USING ITS MATRIX
REPRESENTATION

Reflexive relation
A relation is reflexive if and only if all diagonal elements of its matrix are 1.
For a matrix MR, if MR[i][i]=1 for all i, then the relation is reflexive.

Examples of reflexive relations:

The relation ≥(“is greater then or equal to”)on the set of real numbers.
Similarity of triangles.
The relation R = {(1,1),(1,2),(2,2),(3,3),(3,1)} on the set A={1,2,3}.

1 1 0
0 1 0
1 0 1

Reflexive relations are always represented by a matrix that has 1 on the main
diagonal. The digraph of a reflexive relation has a loop from each node to itself.

10
Irreflexive relation

A relation is irreflexive if and only if all diagonal elements of its matrix are
0. For a matrix MR, if MR[i][i]=0 for all i, then the relation is irreflexive.

Examples of irreflexive relations:

The relation<(‘is less then”)on the set of real numbers.


Relation of one person being son of another person.
The relation R={(1,2),(2,1),(1,3),(2,3),(3,1)} on the
set A = {1, 2, 3}.

0 1 1
1 1 0
1 0 0

The matrix of an irreflexive relation has all 0′s on its main diagonal. The
directed graph for the relation has no loops

11
Symmetric relation
Symmetry in the matrix is observed when M[i][j]=M[j][i] for all i and j.
A symmetric matrix corresponds to a symmetric relation.

Examples of symmetric relation:


The relation = (“is equal to”) on the set real number.

The relation “ is perpendicular to” on the set of straight lines in


a plane. The relation R = {(1,1),(1,2),(2,1),(1,3),(3,1)} on the set A=
{1, 2, 3}.

1 1 1
1 0 0
1 0 0

For a symmetric relation, the logical matrix M is symmetric about the main
diagonal. The transpose of the matrix 𝑀𝑇 is always equal to the original
matrix M. In a digraph of a symmetric relation, for every edge between
distinct nodes, there is an edge in the opposite direction.

12
Asymmetric relation
symmetry is observed when M[i][j]=1 implies M[j][i]=0. An asymmetric
matrix corresponds to an asymmetric relation.

Examples of asymmetric relation:

The relation > (“is greater than”) on the set of real numbers.
The family relation “ is father of”.
The relation R = {(2,1),(2,3),(3,1)} on the set A = {1, 2, 3}.

0 0
0
1 0 1
1 0
0
The matrix for an asymmetric relation is not symmetric with respect to the main
diagonal and contains no diagonal elements. The digraph of an asymmetric relation
must have no loops and no edges between distinct vertices in both directions.

13
Antisymmetric relation
The matrix MR satisfies the antisymmetric property because whenever MR
[i][j]=1 and MR[j][i]=1, it implies i=j Antisymmetric represent
matrices antisymmetric relations.

Examples of antisymmetric relation:


The relation ≥ (“is greater then or equal to”) on the set of real numbers.

The subset relation ⊆ on a power set.

The relation R = {(1,1),(2,1),(2,3),(3,1),(3,3)} on the set A = {1, 2,


3}.

1 0 0
1 0 1
1 0 1

In a matrix M = [aij] representing an antisymmetric relation R, all elements


symmetric about the main diagonal are not equal to each other:
aij≠aji for i≠j. The digraph of an antisymmetric relation may have
loops,however connections between two distinct vertices can only go one way.

14
Transitive relation

Transitivity can be inferred by checking whether, for every pair M[i][j]=1 and
M[j][k]=1, it implies M[i][k]=1. A transitive relation is reflected in the matrix.

Examples of transitive relation:

The relation > (“is greater than”) on the set of real numbers.
The relation “ is parallel to “ on the set of straight lines.
The relation R = {(1,2) , (1,3) , (2,2) , (2,3) , (3,3)} on the
set A = {1, 2, 3}.

0 1 1
0 1 1
0 0 1

In a matrix M=[aij] of a transitive relation R, for each pair

of (i,j)− and (j,k)−entries with value 1 there exists the (i,k)−entry with value

1. The presence of 1′s on the main diagonal does not violate transitivity.

15
CONCLUSION
In the course of this project, A relation R on a set A can be represented by a
matrix M R = [m ij], where m ij = 1 if (a i, a j) ∈ R and m ij = 0 otherwise.

The matrix representation of a relation can be used to check whether the relation has
certain properties, such as reflexivity, symmetry, transitivity, etc. For example, a
relation R on a set A is reflexive if the diagonal elements of M R are all 1,
symmetric if M R is equal to its transpose, and transitive if M R is equal to the
Boolean product of M R with itself.
The matrix representation of a relation can also be used to find the closure of a
relation with respect to a property, such as the reflexive closure, the symmetric
closure, or the transitive closure. For example, the reflexive closure of a relation R
on a set A is obtained by setting the diagonal elements of M R to 1, the symmetric
closure is obtained by taking the union of M R and its transpose, and the transitive
closure is obtained by finding the smallest matrix that contains M R and is
transitive
REFERENCES

 Mathematics LibreTexts, which explains how to represent a relation with a matrix,


check its properties, and find its closure.
 GeeksforGeeks, which provides examples and diagrams of relations as matrices and
directed graphs.
 javatpoint, which defines the matrix representation of a relation and its properties.
 Unacademy, which gives a brief overview of the matrix representation of a relation
between two sets

16
COURSE OUTCOME (COs) ATTAINMENT

➢ Expected Course Outcomes (COs):


(Refer to COs Statement in the Syllabus)

➢ Course Outcome Attained:


How would you rate your learning of the subject based on the specified COs?

1 2 4 5 6 7 8 9 10
3
HIGH
LOW
➢ Learning Gap (if any):

➢ Books / Manuals Referred:

Date: Signature of the Student


➢ Suggestions / Recommendations:
(By the Course Faculty)

Date: Signature of the Faculty

18

You might also like