Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive


  • To: mathgroup at
  • Subject: [mg60946] graphs
  • From: leigh pascoe <leigh at>
  • Date: Wed, 5 Oct 2005 02:27:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Dear Mathgroup,

I am using Combinatorica to study a board game represented by a graph. 
The nxn graph can be created using


The vertices of the graph are numbered from the bottom left in rows, 
hence to refer to the matrix (row,column) location of a vertex we define 
a linking function.


Now to complete the graph we draw edges from cell(i,j) to cell(i-1,j+1), 
where these vertices exist. Here is an example for the 4x4 case


This works ok, but I now have several problems: I would like to write 
the above statement as an implied loop for a general nxn gridgraph. I 
can't seem to get the correct syntax for this. Can anyone help me?

Then I would like to define some functions on the graph, referring to 
the vertices by there grid position. However when I add or delete a 
vertex, the numbering on the graph changes. I would like to be able 
mutate the graph, but still be able to address vertices by the original 
labels, as defined by the cellindex[i,j] function (or any other for that 
matter. Any suggestions?

A third problem (bug?) is that in the ShowGraph command the vertex label 
on the left loses the left most digit(s) when displayed, as shown above. 
I just note that here in case someone at Wolfram wants to fix it.

The documentation for this package is also rather (very) limited. I 
bought the book on the package, which gives some more details, but many 
functions still remain undocumented. Does anyone know a better source?

Thanks for your replies.


  • Prev by Date: Re: Partition(divid string to substring
  • Next by Date: Re: axes for Plot3D
  • Previous by thread: Re: Format.m , FortranAssign : weird identifiers for temporary variables
  • Next by thread: Re: graphs