# Undocumented GraphComputationGraphProduct usage

According to Mathworld there is an undocumented function

GraphComputationGraphProduct[G1, G2, "Cartesian"]


To compute the cartesian graph product.

Now in line with the example shown:

I would expect

GraphComputationGraphProduct[PathGraph[Range[2]], PathGraph[Range[3]], "Cartesian"]


To product the ladder graph shown on the right. Yet, the end result seems to be which doesn't even have the right number of nodes.

Is the function just unfinished (and presumably the reason for its undocumented nature), or is there some way to coax it into providing the correct answer?

• It does have 6 nodes but two nodes overlap as you can see by adding the options VertexLabels -> "Name" and ImagePadding -> 20. – kglr Aug 7 '18 at 4:34
• ... You can set the layout using GraphLayout -> {"GridEmbedding", "Dimension" -> {2, 3}} . – kglr Aug 7 '18 at 4:35

For the given inputs GraphProduct produces a graph with 6 vertices, but, somehow, vertices 1 and 6 overlap:

GraphComputationGraphProduct[PathGraph[Range[2]], PathGraph[Range[3]], "Cartesian",
ImagePadding -> 20, VertexLabels -> "Name"]


VertexList @ %


{1, 2, 3, 4, 5, 6}

You can use the option GraphLayout to specify the layout you would like to have, e.g.,

GraphComputationGraphProduct[PathGraph[Range[2]], PathGraph[Range[3]], "Cartesian",
`