A minimum spanning tree is a spanning tree of a network made with the minimum sum of edges available.
First, list down all the vertices connected to vertex PP and find which one has the lowest value.
PP
==
(27,19,(27,19,1818))
Next, list down all the vertices connected to vertices PP and QQ and find which one has the lowest value.
PQPQ
==
(27,(27,1919,22,24),22,24)
Keep doing this process until you have all the vertices connected. Keep in mind that a spanning tree cannot have any cycles and will have one less edge than its vertices.
Notice that the lowest value connected to vertices PP, QQ, and RR is 2222, but using that edge will create a cycle. Therefore, we pick the second lowest value, which is 2424.
PQTPQT
==
(27,22,(27,22,2424,31,32),31,32)
PQTRPQTR
==
(27,32,31,(27,32,31,2626))
Finally, get the sum of the edges of the spanning tree.
minimum length
==
19+18+24+2619+18+24+26
==
8787
8787
Question 3 of 4
3. Question
Find the length of the minumum spanning tree of this network.
Prim’s Algorithm is a method of finding a minimum spanning tree by continuously listing the edges connected to a vertex and picking the edges with the lowest weight.
First, draw a diagram to plot the vertices of the network.
Next, pick a starting vertex and list down the value of the edges connected to it. We can start at vertex AA.
AA
::
(3,5)(3,5)
Pick the edge with the lowest weight and draw it in the diagram
AA
::
((33,5),5)
Next, list the edges connected to AA and GG, pick the one with the lowest weight and add it to the diagram.
AGAG
::
(5,(5,44,8),8)
Next, list the edges connected to AA, GG and BB, pick the one with the lowest weight and add it to the diagram.
AGBAGB
::
(8,(8,22,7,4),7,4)
Next, list the edges connected to AA, GG, BB and CC, pick the one with the lowest weight and add it to the diagram.
AGBCAGBC
::
(8,7,4,(8,7,4,33))
Next, list the edges connected to AA, GG, BB, CC and DD, pick the one with the lowest weight and add it to the diagram.
AGBCDAGBCD
::
(4,8,(4,8,33,5),5)
Next, list the edges connected to AA, GG, BB, CC, DD and EE, pick the one with the lowest weight and add it to the diagram.
AGBCDEAGBCDE
::
((22,5,8,4),5,8,4)
Notice that all the vertices are now connected and we have 66 edges, one less than the number of vertices.
This diagram fits the criteria of a spanning tree and is also using the edges with the minimum weights.
Finally, get the sum of the edges of the spanning tree.
minimum length
==
3+2+4+3+3+23+2+4+3+3+2
==
1717
1717
Question 4 of 4
4. Question
Find the length of the minumum spanning tree of this network.
Kruskal’s Algorithm is a method of finding a minimum spanning tree by selecting the edges by least to most.
First, draw a diagram to plot the vertices of the network.
Next, list down the edges with the values going from least to most. Since we only need 55 edges to make a spanning tree for this network, pick the 55 edges with the least value.
FEFE
==
22
EBEB
==
22
DCDC
==
22
EAEA
==
33
BCBC
==
33
FAFA
==
44
EDED
==
44
ABAB
==
55
ECEC
==
55
Now draw the 55 edges with the lowest values in the diagram
Notice that all the vertices are now connected and we have 55 edges, one less than the number of vertices.
This diagram fits the criteria of a spanning tree and is also using the edges with the minimum weights.
Finally, get the sum of the edges of the spanning tree.