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)=MR=⎝⎛0100010110000010⎠⎞
W(1)=⎝⎛0100010111000010⎠⎞
W(2)=⎝⎛0101010111010010⎠⎞
W(3)=⎝⎛0101010111011111⎠⎞
MR∗=W(4)=⎝⎛1111111111111111⎠⎞
It follows that R∗=A×A is a universal relation on the set A.
Comments