Lecture 07
Lecture 07
COSC-1103
Symbolically: attested
Graph diagram
Arrow diagram
Directed graph
Matrix
1. Coordinate Diagram (Graph) of a Relation
Let A = {1, 2, 3}
and
B = {x, y} y
Let R be a relation from A to B defined as B
R = {(1, y), (2, x), (2, y), (3, x)} x
The relation may be represented in a
coordinate diagram as: 1 2 3
A
2. Arrow Diagram of a Relation
Let
A = {1, 2, 3}, B = {x, y} 1 R
x
And
R = {1,y), (2,x), (2,y), (3,x)} 2
be a relation from A to B.
y
The arrow diagram of R is: 3
A B
3. Directed Graph of a Relation
Let A = {0, 1, 2, 3} 1
And 0
R = {(0,0), (1,3), (2,1), (2,2), (3,0), (3,1)}
be a binary relation on A.
2 3
DIRECTED GRAPH
4. Matrix Representation of a Relation
Let
A = {a1, a2, …, an}
And
B = {b1, b2, …, bm}.
Let R be a relation from A to B.
Define the n m order matrix M by
1 if ( ai , bi ) R
m(i, j )
0 if ( ai , bi ) R
Solution:
The relation corresponding to the given Matrix is
R = {(1,1), (1,3), (2,1), (3,1), (3,2), (3,3)}
And its Directed graph is given as:
1 2