The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Algorithms.. the images are in the attachments
Â
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.)
Â
Â
Â
        preorder   0                          Â
                   --- --- --- --- --- --- --- ---
Â
Â
Â
Â
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.)
Â
       postorder                                           0
                   --- --- --- --- --- --- --- --- --- ---
Â
Â
3. Use the postorder from the previous question to topologically sort the DAG.
Â
Â
Â
topological order        0                           Â
                   --- --- --- --- --- --- --- --- --- ---
Â
   Â
1. Consider the following weighted undirected graph.
Â
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). (20 Points)
Â
Â
                                       Â
           --- --- --- --- --- --- --- ---
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.
Â
COSC 3304Exercises on Digraphs1.Give the order in which DFSfrstvisits each vertex in the following digraph. This is called thepreorder.(Iterate through the ver±ces incident fromvin increasing order.)preorder0------------------------2.Give the order in which DFSfnishesvisi±ng each vertex in the following DAG. This is calledthepostorder. (Iterate through the ver±ces incident fromvin increasing order.)
Attachments:
-----------