5.1 Network: Optimise a network
Optimise a network
A shortest path minimises the total weight between two vertices. A minimum spanning tree connects all vertices with minimum total weight.
List edges in increasing weight
Choose the smallest available edge
Reject any edge that creates a cycle
Stop when all vertices connect
Worked example
A–B costs 2, B–C costs 3 and A–C costs 6. Find a minimum spanning tree.
0 / 3 steps
Compare route totals, not the number of edges. More edges can still give a shorter route.