MathGroup Archive 2012

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

Search the Archive

Re: Where is ShowGraph?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125970] Re: Where is ShowGraph?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Tue, 10 Apr 2012 02:30:13 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204090932.FAA28441@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

First, you have the wrong syntax to obtain a Knight's tour graph. What 
you've obtained as result of

   GraphData["KnightsTour"]

is not a single graph, but rather a list of all those Knight's Tour 
graphs that Mathematica has available. To get a particular one of these, 
use e.g.,

   GraphData[{"KnightsTour", {2, 5}}]

The output will be a visual representation of the graph.

Second, not all of the Combinatorica add-on package functionality has 
been subsumed by built-in (i.e., Kernel-implemented) functions. If you 
want to use, e.g., ShowGraph -- which is strictly a Combinatorica 
package function and not a built-in kernel function, you have to load 
the package. Thus:

   <<Combinatorica`

   ShowGraph[CompleteGraph[5]]

Unfortunately, the Mathematica developers seem not to have completely 
ported over from Combinatorica to the kernel _all_ the functionality in 
the former. So at times we're left with this awkward combination of 
using both the newer kernel functions and the older Combinatorica 
functions. And that can lead to a lot of confusion, not least the 
General::compat message you get when you load Combinatorica.


On 4/9/12 5:32 AM, James Stein wrote:
> I assume Combinatorica comes preloaded with Mathematica 8, because my
> attempt to load Combinatorica gives an error message "Combinatorica Graph
> and Permutations functionality has been superseded by preloaded
> functionaliy[sic]."
>
> And indeed, so it seems, as this code works fine:
>     g = GraphData["KnightsTour"]
> resulting in an apparently sensible list structure for g.
>
> However, online documentation for Combinatorica describes a routine
> ShowGraph, giving this example:
>     ShowGraph[CompleteGraph[5]]
> But ShowGraph is not defined (apparently not preloaded). Indeed,
> 'ShowGraph' appears in blue text (undefined) in the aforementioned
> documentation page.
>
> I visited www.combinatorica.com, as suggested by the documentation, without
> edification.
>
> What am I missing?  How do I display the graph 'g'?
>

-- 
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: Plotting vectors on a linear function
  • Next by Date: Re: Intersection problem
  • Previous by thread: Re: Where is ShowGraph?
  • Next by thread: Re: Where is ShowGraph?