mst function

Compute Minimum Spanning Tree