I’ve implemented Prim’s algorithm to find the minimum-weight spanning tree of my graph, and it works fine.
Now I’d like to select the “best” head in the spanning tree. By “best” I mean the more balanced head, should I display the tree in a treeView UI for instance. I’m sure there are plenty of algorithms for that, but I don’t know how to name the problem !
One criteria you can use is the average distance from node to all the other nodes. Choose the node with minimum average distance. You can also probably try average square distance etc.