Message Boards Message Boards

0
|
5033 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Cartesian graph product in version 10?

With a great number of procedures from Combinatorica package already having direct equivalent in the core of Mathematica 10, I cannot find direct analogue of CartesianProduct[] procedure (and, in general, procedures for other graph products). Did anybody develope a separate code for this?

POSTED BY: Tomas Madaras

The CartesianProduct function from Combinatorica is for lists, and can be replicated using Thread[{list1, list2}].

If you are looking for the equivalent of GraphProduct from Combinatorica, according to MathWorld that is GraphComputation`GraphProduct[g1, g2, "Cartesian"]. I find it interesting to find a description of such an undocumented function on MathWorld.

Unfortunately it gives a graph with already set vertex coordinates, so the display may look very strange. I don't know how to remove vertex coordinates from a graph directly without recreating it from it edge and vertex list.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract