1. Let G be the following weighted graph in Figure 1, with the weights of each edge indicated next to the edge. Kruskal's algorithm is given as follows.
Let G be connected weighted graph of order.
Step 1: Set i = 0, E. = 8.
Step 2: Set X = E(G)- E. Choose an edge e € X such that (1) Eu {e}] does not contain any cycle in G and (ii) w(e) <ule') for all those edges d' satisfying condition (i).
Step 3: Set Eu+1 = EU {e}. If 4+1) = 1 - 1, then (Ei+1] is a minimum spanning tree of G. Otherwise, update Si+1 = SU {v}, increase i by 1 and return to Step 3(a).
By applying Kruskal's algorithm as above, find the minimum spannning tree T of graph G and determine the weght of T 12 3 4 10 4 7 10 14 6 8 11 5 7 Figure 1: Graph G of Question 1
0 comments:
Post a Comment