Answer to Question #255706 in Discrete Mathematics for Vvk

Question #255706
Let A={1,2,3,4,5} and R be the relation on A such that R={(1,1),(1,4),(2,2),(3,4),(3,5),(4,1),(5,2),(5,5)}. Find the transitive closure of R by Warshall's Algorithm
1
Expert's answer
2021-10-25T16:23:26-0400

Let "A=\\{1,2,3,4,5\\}" and "R" be the relation on "A" such that "R=\\{(1,1),(1,4),(2,2),(3,4),(3,5),(4,1),(5,2),(5,5)\\}." Let us find the transitive closure of "R" by Warshall's Algorithm:


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



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


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


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


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


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


It follows that the transitive closure "R^*" of "R" is the following:


"R^*=\\{(1,1),(1,4),(2,2),(3,1),(3,2),(3,4),(3,5),(4,1),(4,4),(5,2),(5,5)\\}."



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