Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: new Graph function + combinatorica: various problems
Replies: 8   Last Post: May 5, 2012 4:12 AM

 Messages: [ Previous | Next ]
 sjoerd.c.devries@gmail.com Posts: 893 Registered: 10/6/08
Re: new Graph function + combinatorica: various problems
Posted: Feb 12, 2011 5:19 AM

I posted on graph conversion a couple of weeks ago.

Shading of Graph can be prevented by prepending the System` context
(System`Graph[...]).

The two versions of conversion yield different plots in GraphPlot.
Also my conversion route both yield minimum and maximum spanning trees
(although for the graphs I tested them, they look identical). The
ToCombinatoricaGraph conversion yields graphs for which (for all
graphs I tested) the minimum spanning tree does not plot.

Clearly, there is room for improvement in the graph area.

<< Combinatorica`
<< GraphUtilities`

myM8Graph = GraphData["ZamfirescuGraph48"]

(* conversion 1 *)
myCombinatoricaGraph =

myCombinatoricaGraph // ShowGraph
MinimumSpanningTree[myCombinatoricaGraph] // ShowGraph
MaximumSpanningTree[myCombinatoricaGraph] // ShowGraph

(* conversion 2*)
myCombinatoricaGraph = ToCombinatoricaGraph[myM8Graph];

myCombinatoricaGraph // ShowGraph
MinimumSpanningTree[myCombinatoricaGraph] // ShowGraph
MaximumSpanningTree[myCombinatoricaGraph] // ShowGraph

Cheers -- Sjoerd

On Feb 11, 10:20 am, Cupidio <andreatacche...@gmail.com> wrote:
> Hi,
> I'm experiencing some problems in combining the functionalities of
> combinatorica and the built-in functions for graphs.
>
> makes its use impossible. But while I need some of the functions in
> the combinatorica package (minimum/maximum spanning tree), i prefer
> the graphic and "lexical" representation of the built-in Graph[].
>
> How do I "save" Graph[] when I load combinatorica, or how can I make
> it come back?
>
> Also (and this looks weird!), when i use ToCombinatoricaGraph[] (in
> GraphUtilites package) to convert a graph, the resulting object can be
> processed by MaximumSpanningTree[], yielding a correct result, but not
> by MinimumSpanningTree[] which returns something like:
>
> MinimumSpanningTree[-Graph:<14,8,Directed>-]
>
> ...not even a combinatorica graph object.
>