1. Using Warshalls algorithm, compute the reflexive-transitive closure of the relation below.Show the matrix after the reflexive closure and then after each pass of the outermost for loopthat computes the transitive closure.[0 0 0 0 11 0 0 0 00 0 1 1 00 0 1 0 01 0 1 0 1]
2. Using the matrix in the previous problem show the final result of executing Floydsalgorithm on that matrix to produce a matrix containing path lengths.3. Show the graph that corresponds to the matrix in the first problem assuming the rows andcolumns correspond to the vertices a, b, c, d and e. Show its condensation graph, renaming itsvertices. Determine any topological order of that graph and create an adjacency matrix withthe vertices ordered in that topological order. Finally compute the reflexive-transitive closureof that matrix. What characteristic of that matrix indicates that it defines a total order?4. Using Floyds algorithm, compute the distance matrix for the weight directed graph definedby the following matrix:[0 4 52 0 3 3 2 0 2 4 0]Show the intermediate matrices after each iteration of the outermost loop.
Reviews
There are no reviews yet.