chap graphs figure example graph for exercises explain whyin the worst casedijkstra' algorithm is (asymptoticallyas efficient as any algorithm for finding the shortest path from some vertex to another vertex show the shortest paths generated by running dijkstra' shortest-paths algorithm on the graph of figure beginning at vertex show the values as each vertex is processedas in figure modify the algorithm for single-source shortest paths to actually store and return the shortest paths rather than just compute the distances the root of dag is vertex such that every vertex of the dag can be reached by directed path from write an algorithm that takes directed graph as input and determines the root (if there is onefor the graph the running time of your algorithm should be th(| | | write an algorithm to find the longest path in dagwhere the length of the path is measured by the number of edges that it contains what is the asymptotic complexity of your algorithm write an algorithm to determine whether directed graph of |vvertices contains cycle your algorithm should run in th(| | |time write an algorithm to determine whether an undirected graph of |vvertices contains cycle your algorithm should run in th(| |time the single-destination shortest-paths problem for directed graph is to find the shortest path from every vertex to specified vertex write an algorithm to solve the single-destination shortest-paths problem list the order in which the edges of the graph in figure are visited when running prim' mst algorithm starting at vertex show the final mst list the order in which the edges of the graph in figure are visited when running kruskal' mst algorithm each time an edge is added to the