Initialize the solution set T to be empty. Note that for N nodes, a spanning tree of a connected graph will always contain N-1 edges. The minimum spanning tree is the spanning tree with the minimum total length. See the definition of a tree. The remaining edges in E are all rejected.
T represents the minimum spanning tree.
If you process all the nodes and CNS never drops to one set, then the graph was not connected to begin with. The problem can still be solved, but not with a single spanning tree.