BishopsGraph - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory[SpecialGraphs]

  

BishopsGraph

  

construct bishop's graph

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

BishopsGraph(m,n)

BishopsGraph(m,n, player)

Parameters

m, n

-

positive integers

player

-

string, one of "white", "black", or "both"

Description

• 

BishopsGraph(m,n) creates the m by n bishop's graph on m*n vertices. This is the bipartite graph representing all legal moves of a bishop chess piece on an m by n chessboard.

• 

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

• 

BishopsGraph(m,n,"white") command creates the m by n white bishop's graph on m*n vertices. BishopsGraph(m,n,"black") similarly creates a black bishop's graph.

• 

These are the graphs representing the legal moves of the white or black bishop chess piece, respectively, on an m by n chessboard.

• 

The white and black bishop's graphs correspond to the two connected components of the bishop's graph.

• 

An m by n white or black bishop's graph has 2mn3m3n+4 edges when m and n are both greater than 1, and zero edges otherwise.

Examples

withGraphTheory:

withSpecialGraphs:

BBishopsGraph4,6

BGraph 1: an undirected graph with 24 vertices and 52 edges

(1)

IsPlanarB

false

(2)

IsConnectedB

false

(3)

The two connected components of the bishop's graph correspond to the squares reachable by the white bishop and the black bishop.

ConnectedComponentsB

1:1,1:3,1:5,2:2,2:4,2:6,3:1,3:3,3:5,4:2,4:4,4:6,1:2,1:4,1:6,2:1,2:3,2:5,3:2,3:4,3:6,4:1,4:3,4:5

(4)

DrawGraphB

With the third parameter we can specify that the graph contain only the moves of the white or black bishop.

WBBishopsGraph4,6,white

WBGraph 2: an undirected graph with 24 vertices and 26 edges

(5)

DrawGraphWB

Compatibility

• 

The GraphTheory[SpecialGraphs][BishopsGraph] command was introduced in Maple 2023.

• 

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

See Also

ChromaticNumber

IsPlanar

KingsGraph

KnightsGraph

QueensGraph

RooksGraph

SpecialGraphs

 


Download Help Document