GridGraph - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


GraphTheory[SpecialGraphs]

  

GridGraph

  

construct grid graph

  

TorusGridGraph

  

construct torus grid graph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GridGraph(m,n)

TorusGridGraph(m,n)

Parameters

m, n

-

positive integers

Description

• 

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.

Examples

> 

with⁡GraphTheory:with⁡SpecialGraphs:

> 

G≔GridGraph⁡5,3

G≔Graph 1: an undirected graph with 15 vertices and 22 edges

(1)
> 

IsBipartite⁡G

true

(2)
> 

DrawGraph⁡G

> 

H≔TorusGridGraph⁡5,3:

> 

IsBipartite⁡H

false

(3)
> 

DrawGraph⁡H

See Also

SpecialGraphs