Rook's graph | |
---|---|
8x8 Rook's graph
|
|
Vertices | nm |
Edges | nm(n + m)/2 − nm |
Diameter | 2 |
Girth | 3 (if max(n, m) ≥ 3) |
Chromatic number | max(n, m) |
Properties |
regular, vertex-transitive, perfect well-covered |
In graph theory, a rook's graph is a graph that represents all legal moves of the rook chess piece on a chessboard: each vertex represents a square on a chessboard and each edge represents a legal move. Rook's graphs are highly symmetric perfect graphs; they may be characterized in terms of the number of triangles each edge belongs to and by the existence of a 4-cycle connecting each nonadjacent pair of vertices.
An n × m rook's graph represents the moves of a rook on an n × m chessboard. Its vertices may be given coordinates (x, y), where 1 ≤ x ≤ n and 1 ≤ y ≤ m. Two vertices (x1, y1) and (x2,y2) are adjacent if and only if either x1 = x2 or y1 = y2; that is, if they belong to the same rank or the same file of the chessboard.
For an n × m rook's graph the total number of vertices is simply nm. For an n × n rook's graph the total number of vertices is simply n2 and the total number of edges is n3 − n2; in this case the graph is also known as a two-dimensional Hamming graph or a Latin square graph.
The rook's graph for an n × m chessboard may also be defined as the Cartesian product of two complete graphs Kn and Km, expressed in a single formula as Kn ◻ Km. The complement graph of a 2 × n rook's graph is a crown graph.