Answer to Question #307874 in Discrete Mathematics for Anil

Question #307874

Q.2- 1) For the given relation R = {(1,1), (1,2), (2,3), (3,1), (3,2)} defined on set A = {1,2,3}, find its transitive closure, R* using Warshall’s algorithm *





1
Expert's answer
2022-03-09T04:31:30-0500

R->"M=\\begin{matrix}\n 1 & 0&1 \\\\\n 1 & 0&1\\\\\n 0&1&0\n\\end{matrix}"

We are only interested in the zeros of the matrix, since only they can change (which means that we have found the path from one vertex to another)

"\\begin{matrix}\n a & b &a\\&b\\\\\n 0 & 0&0\\\\\n0 & 1&0\\\\\n1 & 0&0\\\\\n1 & 1&1\n\\end{matrix}"

1"\\in A"

M1[1,2]=M[1,1]&M[1,2]=0

M1[2,2]=M[2,1]&M[1,2]=0

M1[3,1]=M[3,1]&M[1,1]=0

M1[3,3]=M[3,1]&M[1,3]=0

M1=M

2"\\in A"

M2[1,2]=M1[1,2]&M1[2,2]=0

M2[2,2]=M1[2,2]&M1[2,2]=0

M2[3,1]=M1[3,2]&M1[2,1]=1

M2[3,3]=M1[3,2]&M1[2,3]=1

"M2=\\begin{matrix}\n 1 & 0&1 \\\\\n 1 & 0&1\\\\\n 1&1&1\n\\end{matrix}"

3"\\in A"

M3[1,2]=M2[1,3]&M2[3,2]=1

M3[2,2]=M2[2,3]&M2[3,2]=1

"M3=\\begin{matrix}\n 1 & 1&1 \\\\\n 1 & 1&1\\\\\n 1&1&1\n\\end{matrix}"

in the result

R*={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(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