Cost Function

Let be a graph with cost function on edges so

Minimum Cost Spanning Tree

Let be a connected graph
Let be a cost function

Let be a Spanning Tree of then

is a Minimum Cost Spanning Tree (MCST) if

Kruskal's Algorithm

Let
Let be a cost function

Start with

For then
If there exists edge of where such that

then
Let be cheapest such edge then set

and continue

Then denote for the final graph

Running Time

For Kruskal’s Algorithm then if has vertices and edges then there are steps