I want to split an undirected graph by multiple minimum spanning trees. There are some special (root) nodes from which I want to start constructing a minimum spanning tree and I know every weight between nodes.
Is there any algorithm to solve this problem? If there are no strict methods, any approximate methods are fine for me.
I attach two output examples. I will be glad if you help me. Thank you.

