KnightsGraph - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


GraphTheory[SpecialGraphs]

  

KnightsGraph

  

construct knight's graph

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

KnightsGraph(m,n)

Parameters

m, n

-

positive integers

Description

• 

The KnightsGraph(m,n) command creates the m by n knight's graph on m*n vertices. This is the bipartite graph which represents all legal moves of the knight chess piece on an m by n chessboard.

• 

An m by n knight's graph has 4mn6m6n+8 edges when m and n are both greater than 1, and zero edges otherwise.

Examples

withGraphTheory:

withSpecialGraphs:

RKnightsGraph4,6

RGraph 1: an undirected graph with 24 vertices and 44 edge(s)

(1)

IsPlanarR

false

(2)

ChromaticNumberR

2

(3)

DrawGraphR

Compatibility

• 

The GraphTheory[SpecialGraphs][KnightsGraph] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

BishopsGraph

ChromaticNumber

IsPlanar

KingsGraph

QueensGraph

RooksGraph

SpecialGraphs