the following graph represents the computers in an office building and the length of wire needing to connect…

the following graph represents the computers in an office building and the length of wire needing to connect them in yards. use kruskals algorithm to connect all the computers. determine the total amount of wire needed to connect the computers.

the following graph represents the computers in an office building and the length of wire needing to connect them in yards. use kruskals algorithm to connect all the computers. determine the total amount of wire needed to connect the computers.

Answer

Explanation:

Step1: List all edges and their weights

Edges and weights: $(v_2,v_4) = 4$, $(v_4,v_5)=2$, $(v_5,v_7)=2$, $(v_7,v_9)=3$, $(v_3,v_6)=2$, $(v_5,v_3)=5$, $(v_2,v_5)=7$, $(v_1,v_2)=9$, $(v_2,v_3)=8$, $(v_1,v_3)=12$, $(v_4,v_7)=10$, $(v_5,v_6)=11$, $(v_7,v_8)=4$, $(v_8,v_9)=13$, $(v_6,v_8)=4$

Step2: Sort edges by weight in ascending order

$(v_3,v_6)=2$, $(v_4,v_5)=2$, $(v_5,v_7)=2$, $(v_7,v_9)=3$, $(v_2,v_4)=4$, $(v_7,v_8)=4$, $(v_6,v_8)=4$, $(v_5,v_3)=5$, $(v_2,v_5)=7$, $(v_1,v_2)=9$, $(v_2,v_3)=8$, $(v_4,v_7)=10$, $(v_5,v_6)=11$, $(v_1,v_3)=12$, $(v_8,v_9)=13$

Step3: Select edges for minimum - spanning tree without creating cycles

Select $(v_3,v_6)$ (weight 2), $(v_4,v_5)$ (weight 2), $(v_5,v_7)$ (weight 2), $(v_7,v_9)$ (weight 3), $(v_2,v_4)$ (weight 4), $(v_7,v_8)$ (weight 4), $(v_6,v_8)$ (weight 4), $(v_5,v_3)$ (weight 5)

Step4: Calculate total weight of selected edges

$2 + 2+2 + 3+4 + 4+4 + 5=26$

Answer:

26