Relation matrix & graphs in relations

2,457 views 20 slides Aug 05, 2019
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

Relation Matrix & Graphs in Relations


Slide Content

Relation Matrix & Graph
Ms. RachanaPathak
([email protected])
Assistant Professor, Dept of Computer Science and Engineering
Walchand Institute of Technology, Solapur
(www.witsolapur.org)

LearningOutcome
2Walchand Institute of Technology, Solapur
Attheendofthissession,
Studentswillbeabletoevaluaterelationmatrixandgraphsonit.

Prerequisite
•Basics of Discrete Mathematics
•Basics of Relation
Walchand Institute of Technology, Solapur 3

Introduction
Relation Matrix
•A relation R from a finite set A to a finite set B can be
represented by a matrix called the relation matrix of R.
•Let A ={a1,a2,a3…am} and B= {b1,b2,b3……bn} be finite set
containing m and n elements, respectively, and R be the
relation from A to B.
•Then R can be represented by an m x n matrix Mr= [rij],which
is defined as follows:
Walchand Institute of Technology, Solapur 4

rij= 1, if aiR bj
0, if aiRbj
Note that the matrix MRhas the elements as 1’s and 0’s.
Walchand Institute of Technology, Solapur 5

Example
Let A = {1,2,3,4} and B ={b1,b2,b3}. Consider the relation R =
{(1,b2),(1,b3),(3,b2),(4,b1),(4,b3)}. Determine the matrix of the
relation.
Solution :
A = {1,2,3,4} B = {b1,b2,b3}.
Relation R = {(1,b2),(1,b3),(3,b2),(4,b1),(4,b3)}.
Matrix of the Relation R is written as-
Walchand Institute of Technology, Solapur 6

Example
b1b2b3
1 0 1 1
2 0 0 0
3 0 1 0
4 1 0 1
Walchand Institute of Technology, Solapur 7

Example
0 1 1
0 0 0
0 1 0
1 0 1
Walchand Institute of Technology, Solapur 8

Think & Write?
Let A = {1,2,3,4}. Find the relation R on A determined by the
matrix.
MR = 1 0 1 0
0 0 1 0
1 0 0 0
1 1 0 1
Walchand Institute of Technology, Solapur 9

Answer
The relation R =
{(1,1),(1,3),(2,3),(3,1),(4,1),(4,2),(4,4)}
Walchand Institute of Technology, Solapur 10

Properties of a Relation in a Set
Walchand Institute of Technology, Solapur 11
•All diagonal entries must
be 1
Reflexive
•Rij= Rijfor every iand j Symmetric
•Rij= 1 & Rji= 0 for i≠jAnti-symmetric

Reflexive
Walchand Institute of Technology, Solapur 12
MR = 1 0 1 0
0 1 1 0
1 0 1 0
1 1 0 1

Symmetric
MR = 1 2 3 4
1
2
3
4
Walchand Institute of Technology, Solapur 13
1 1 0 1
1 1 0 0
0 0 0 0
1 0 0 0

Anti-Symmetric
MR = 1 2 3 4
1
2
3
4
Walchand Institute of Technology, Solapur 14
1 0 0 0
1 1 0 0
0 0 0 0
1 0 0 0

Graph
Walchand Institute of Technology, Solapur 15
•A relation defined in afinite set can also be represented pictorially with
the help of a graph.
•Let R be a relation in a finite set A = {a1,a2,….an}.
•Elements of A are represented by points or circles called nodes.
•These nodes are called vertices
•Arcs are used to show the connection called as edge.
•Let us see some examples :

.b
. a aRb
.
Walchand Institute of Technology, Solapur 16
Here we say a
is in relation
with a
^
Here we say a
is in relation
with b

“a is in relation with b and b is in relation
with b”
“ a is in relation with b and b in relation with
c and c is in reltionwith a”
Walchand Institute of Technology, Solapur 17
Image source : 1. Discrete Mathematics with combinatoricsand graph theory-S. SANTHA (CENGAGE Learning)

Conclusion :
In this session, We have studied all about POSET.
Walchand Institute of Technology, Solapur 18

References
•1. Discrete mathematical structures with applications to computer science --J. P.
Tremblay & R. Manohar(MGH International)
•Reference Books:
•1. Discrete Mathematics with combinatoricsand graph theory-S. SANTHA
(CENGAGE Learning)
•2. Discrete Mathematical Structures –Bernard Kolman, Robert C. Busby (Pearson
Education)
•3. Discrete mathematics --Liu (MGH)
19Walchand Institute of Technology, Solapur

ThankYou!!!
20Walchand Institute of Technology, Solapur
Tags