Suppose i have a graph and i want to find minimum-spanning-tree. As in imperative languages we have to take specific steps from everynode(example ,we use kruskal's algorithm or prim's algorithm) to find the Minimum spanning tree
but
in declarative language(specially prolog, we can apply same algorithm but those are limited) , If i want to find a minimum spanning tree on the same graph, If i collect all possible hamiltonian paths using findall/3
predicate then chose the one with smallest accumulated cost, is it then also a minimum-spanning-tree?
More specifically , Can we transform the problem of finding minimum spanning tree
to the hamiltonian path finding problem but not in other direction? Because normal algorithms return one specific minimum spanning tree
of a graph but i am more interest in finding more than one minimum spanning trees.