Added minimum spanning tree

Needed for partitioning of an expression into symbols