Question: Consider the following graph G with non - negative edge weights. 1 2 a s b c e d 1 2 3 1 0 2
Consider the following graph G with nonnegative edge
weights.
a s
b c e
d
a points Use Prims algorithm to compute the minimum spanning tree of G
You can use the following table to describe the execution of the algorithm. The algorithm maintains a set S of vertices. The d value of a vertex v in S is minu in S:uv in E wu v
The pi value of a vertex v is the vertex u in S such that dv wu v; if dvinfty
then pi v
You can try to complete the value of the table following the Prim algorithm in
our lecture notes, the edges in the MST are and the total weight is
iteration vertex added to S a b c d e
d pi d pi d pi d pi d pi
s s infty s infty s
Table : Prims Algorithm for Minimum Spanning Tree
b points Use Dijkstras algorithm to compute the shortest paths from s to all
other vertices in G
You can use the following table to describe the exec
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
