1. Give the order in which DFS first visits each vertex in the following digraph. This is called the preorder. (Iterate through the vertices incident from v in increasing order.) see image.
2. Give the order in which DFS finishes visiting each vertex in the following DAG. This is called the postorder. (Iterate through the vertices incident from v in increasing order.) (20 Points) see image.
3. Use the postorder from the previous question to topologically sort the DAG.
1. Consider the following weighted undirected graph. see image.
List the edges in the MST in the order in which they are discovered by Prim's algorithm, starting the search at A. Since all edge weights are distinct, identify each edge by its weight (instead of its endpoints).
2. Repeat question 1 for Kruskal's algorithm.
3. Explain briefly, but rigorously, why running Kruskal's algorithm with the squares of the weights yields an MST on the original network (with the original weights). Assume all weights are nonnegative.