construct bishop's graph
The BishopsGraph(m,n) command creates the m by n bishop's graph on m*n vertices. This is the bipartite graph which represents all legal moves of the bishop chess piece on an m by n chessboard.
An m by n bishop's graph has 4⁢m⁢n−6⁢m−6⁢n+8 edges when m and n are both greater than 1, and zero edges otherwise.
B ≔ BishopsGraph⁡4,6
B≔Graph 1: an undirected graph with 24 vertices and 52 edge(s)
The two connected components of the bishop's graph correspond to the squares reachable by the white bishop and the black bishop.
The GraphTheory[SpecialGraphs][BishopsGraph] command was introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
Download Help Document