πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Representation of Relations

Relations can be represented in many ways. Some of which are as follows:

1. Relation as a Matrix: Let P = [a1,a2,a3,.......am] and Q = [b1,b2,b3......bn] are finite sets, containing m and n number of elements respectively. R is a relation from P to Q. The relation R can be represented by m x n matrix M = [Mij], defined as

Mij = 0      if  (ai,bj) βˆ‰ R
       1     if   (ai,bj )∈ R

Example

  1. Let     P = {1, 2, 3, 4}, Q = {a, b, c, d}  
  2. and     R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}.  

The matrix of relation R is shown as fig:

Representation of Relations

2. Relation as a Directed Graph: There is another way of picturing a relation R when R is a relation from a finite set to itself.

Example

  1. A = {1, 2, 3, 4}  
  2. R = {(1, 2) (2, 2) (2, 4) (3, 2) (3, 4) (4, 1) (4, 3)}  
Representation of Relations

3. Relation as an Arrow Diagram: If P and Q are finite sets and R is a relation from P to Q. Relation R can be represented as an arrow diagram as follows.

Draw two ellipses for the sets P and Q. Write down the elements of P and elements of Q column-wise in three ellipses. Then draw an arrow from the first ellipse to the second ellipse if a is related to b and a ∈ P and b ∈ Q.

Example

  1. Let P = {1, 2, 3, 4}  
  2.     Q = {a, b, c, d}  
  3.     R = {(1, a), (2, a), (3, a), (1, b), (4, b), (4, c), (4, d)  

The arrow diagram of relation R is shown in fig:

Representation of Relations

4. Relation as a Table: If P and Q are finite sets and R is a relation from P to Q. Relation R can be represented in tabular form.

Make the table which contains rows equivalent to an element of P and columns equivalent to the element of Q. Then place a cross (X) in the boxes which represent relations of elements on set P to set Q.

Example

  1. Let P = {1, 2, 3, 4}   
  2.     Q = {x, y, z, k}  
  3.     R = {(1, x), (1, y), (2, z), (3, z), (4, k)}.  

The tabular form of relation as shown in fig:

Representation of Relations

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>