Homework 5 Solution

20.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: docx solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (2 votes)

1. Execute Prim’s minimum spanning tree algorithm by hand on the graph below showing
how the data structures evolve specifically indicating when the distance from a fringe
vertex to the tree is updated. Clearly indicate which edges become part of the minimum
spanning tree and in which order. Start at vertex A.


2. Execute Kruskal’s algorithm on the weighted tree shown below. Assume that edges of
equal weight will be in the priority queue in alphabetical order. Clearly show what
happens each time an edge is removed from the priority queue and how the dynamic
equivalence relation changes on each step and show the final minimum spanning tree that
is generated.


3. Give an example of a weighted graph for which the minimum spanning tree is unique.
Indicate what the minimum spanning tree is for that graph. Give another example of a
weighted graph that has more than one minimum spanning tree. Show two different
minimum spanning trees for that graph. What determines whether a graph has more than
one minimum spanning tree?
4. Given the following adjacency lists (with edge weights in parentheses) for a directed
graph:
A: B(5), C(3), D(1)
B: C(1), D(3)
C: B(3), D(7), E(1)
D: A(6), C(3)
E: F(5)
F: D(3), A(4)
Execute Dijkstra’s shortest-path algorithm by hand on this graph, showing how the data
structures evolve, with A as the starting vertex. Clearly indicate which edges become part
of the shortest path and in which order.

  • Homework-5.docx