Answer to Question #281095 in Discrete Mathematics for Ashwini

Question #281095

Consider a relation R= {(1, 1) (1, 3), (2, 2), (2,3) (3,1)on the set A = (1,2,3) Find transitive using warshalls algorithm... closure of the relation R consider

1
Expert's answer
2021-12-22T09:36:21-0500

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


Let us state the steps of the Warshall's algorithm:


1. Let "W:=M_R,\\ k:=0."

2. Put "k:=k+1."

3. For all "i\\ne k" such that "w_{ik}=1" and for all "j" let "w_{ij}=w_{ij}\\lor w_{kj}."

4. If "k=n" then stop and "W=M_{R^*}," else go to step 2.


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


"W^{(0)}=M_R\n=\\begin{pmatrix}\n1 & 0 & 1 \\\\\n0 & 1 & 1\\\\\n1 & 0 & 0 \n\\end{pmatrix}"


"W^{(1)}\n=\\begin{pmatrix}\n1 & 0 & 1 \\\\\n0 & 1 & 1\\\\\n1 & 0 & 1 \n\\end{pmatrix}"


"W^{(2)}\n=\\begin{pmatrix}\n1 & 0 & 1 \\\\\n0 & 1 & 1\\\\\n1 & 0 & 1 \n\\end{pmatrix}"


"M_{R^*}=W^{(3)}\n=\\begin{pmatrix}\n1 & 0 & 1 \\\\\n1 & 1 & 1\\\\\n1 & 0 & 1 \n\\end{pmatrix}"


It follows that "R^*=\\{ (1,1),(1, 3), (2,1),(2,2), (2,3), (3,1),(3,3)\\}."

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS