Re: new Graph function + combinatorica: various problems

• To: mathgroup at smc.vnet.net
• Subject: [mg116375] Re: new Graph function + combinatorica: various problems
• From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
• Date: Sat, 12 Feb 2011 05:19:50 -0500 (EST)
• References: <ij2v05\$7uu\$1@smc.vnet.net>

```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... at 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.
>