Find transitive closure using matrices and Algorithm 1: {1,2,3,4}
A) {(1, 2), (2, 1), (2, 3), (3, 4) (4, 1)}
Step by step for a five year old
Expert Answer
We can use Warshall’s algorithm for finding the Transitive Closure of a matrix. By using the formula below we can construct The Relation matrix
from
.
where is the adjacency matrix of given data. k is the relation degree.
For Given data the adjacency matrix is given below.
By using the formula mentioned above, Consider the first row and first column, The matrix will be:
So will be the transitive closure of the given data.
Hence the solution provided.