Solution to Consider a relation R=\ (1,1),(1, ), (0,2), (2,3) (3,1)) on the set A=\ 1,2,3\ Find … - Sikademy
Author Image

Archangel Macsika

Consider a relation R=\ (1,1),(1, ), (0,2), (2,3) (3,1)) on the set A=\ 1,2,3\ Find transitive closure of the relation R using algorithm Warshall's

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question

Consider a relation R=\{ (1,1),(1, 0), (0,2), (2,3), (3,1)\} on the set A=\{0, 1,2,3\}.


Let us find transitive closure of the relation R using Warshall's algorithm:


W^{(0)}=M_R =\begin{pmatrix} 0 & 0 & 1 & 0\\ 1 & 1 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 0 \end{pmatrix}



W^{(1)} =\begin{pmatrix} 0 & 0 & 1 & 0\\ 1 & 1 & 1 & 0\\ 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 0 \end{pmatrix}


W^{(2)} =\begin{pmatrix} 0 & 0 & 1 & 0\\ 1 & 1 & 1 & 0\\ 0 & 0 & 0 & 1\\ 1 & 1 & 1 & 0 \end{pmatrix}


W^{(3)} =\begin{pmatrix} 0 & 0 & 1 & 1\\ 1 & 1 & 1 & 1\\ 0 & 0 & 0 & 1\\ 1 & 1 & 1 & 1 \end{pmatrix}


M_{R^*}=W^{(4)} =\begin{pmatrix} 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 1 \end{pmatrix}


It follows that R^*=A\times A is a universal relation on the set A.


Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-533-qpid-418