GraphTheory[SpecialGraphs]
GridGraph
construct grid graph
TorusGridGraph
construct torus grid graph
Calling Sequence
Parameters
Description
Examples
GridGraph(m,n)
TorusGridGraph(m,n)
m, n
-
positive integers
The GridGraph(m,n) command creates the m by n grid graph on m*n vertices.
The TorusGridGraph(m,n) creates the m by n torus grid graph on m*n vertices.
withGraphTheory:withSpecialGraphs:
G≔GridGraph5,3
G≔Graph 1: an undirected graph with 15 vertices and 22 edge(s)
IsBipartiteG
true
DrawGraphG
H≔TorusGridGraph5,3:
IsBipartiteH
false
DrawGraphH
See Also
SpecialGraphs
Download Help Document