What kind of argument is expected by MinimumSpanningTree
(from the package Combinatorica`
)? Is it possible that I am providing the right kind of argument, but that conflict between usual definitions and definitions from the package Combinatorica`
prevents correct evaluation?
Note that, conform the documentation page of FindShortestPath
,
graph = System`PetersenGraph[4, 1, EdgeWeight -> {4, 0, 3, 1, 3, 2, 7, 8, 5, 2, 1, 6}]
Produces some weighted graph. We can then do
FindShortestPath[graph, 1, 3]
which works as expected. Note that if we use Combinatorica`PetersenGraph
this will not work. Anyway, I would expect MinimumSpanningTree
to work on at least one of the two graphs generated this way. Unfortunately, I cannot get it it to work. I have been unable to get MimimumSpanningTree
to work on any graph so far.
Remarks
The documentation center provides very little information on MimimumSpanningTree
. The PetersenGraph
may not be a very nice example, as Mathematica seems to point out an error in the syntax even before the package Combinatorica`
is loaded. However, upon asking the FullForm
of the result, everything seems to be as we expect it to be.
Edit: Can I assume there is no efficient way to let MinimumSpanningTree
calculate a minimum spanning tree between many points in $\mathbb{R}^2$? I suppose that for this, one should refer to How to speed up Minimum Spanning Tree algorithm?. As a test I entered a huge graph in MinimumSpanningTree
, but an algorithm by Daniel Lichtblau was faster.
Needs["Combinatorica
"]`ShowGraph@MinimumSpanningTree@PetersenGraph
andNumberOfSpanningTrees@PetersenGraph
=> 2000 $\endgroup$