MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: GraphComplement doesn't work in 7.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97086] Re: [mg97063] GraphComplement doesn't work in 7.0
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Thu, 5 Mar 2009 04:52:49 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200903041212.HAA27227@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

The function GraphComplement IS implemented in the Combinatorica package 
-- but only for the kinds of graph structures handled by Combinatorica.

For example:

   <<Combinatorica`
   g=Hypercube[4];
   ShowGraph[GraphComplement[g]]

This will create and show the complement of the hypercube.

The kind of graph you use, {1->2}, is a newer type of graph structure 
that can be displayed by the new kernel function GraphPlot. But it is 
not the native Combinatorica type of graph, and you would need to 
convert your graph to the Combinatorica type structure first.

This is all an unfortunate result of a very incomplete integration so 
far between the older Combinatorica package (where you use ShowGraph to 
display a graph) and the newer kernel functionality where you use GraphPlot.


Tangerine Luo wrote:
> I find some functions do not work in mathematica 7.0. Why?
> are some function not implemented yet?
> << Combinatorica`
> In[4]:= GraphComplement[{1 -> 2}]
> 
> Out[4]= GraphComplement[{1 -> 2}]
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Legends in GraphicsGrid
  • Next by Date: Problem of evaluate Numerically Eigensystem in Nminimize
  • Previous by thread: GraphComplement doesn't work in 7.0
  • Next by thread: Re: Re: GraphComplement doesn't work in 7.0