|
|
- In the above figure there are two least weighted edges. We can choose any one of them. Lets choose edge (v4,v5).
- Next least weighted edge is between (v3,v6), add this edge to MST edges, since it is not creating any cycle.
- Next edge is (v7,v9). Repeat the processes of adding edges till we found n-1 edges without forming any cycle. The number of vertices's in the graph is n.
- This is method is Kurskal's algorithm, named after the inventor.
- The following sequence of figures shows a way of adding edges to obtain a MST.
|
|