Rook's graph | |
Girth: | (if) |
Properties: |
In graph theory, a rook's graph is an undirected graph that represents all legal moves of the rook chess piece on a chessboard. Each vertex of a rook's graph represents a square on a chessboard, and there is an edge between any two squares sharing a row (rank) or column (file), the squares that a rook can move between. These graphs can be constructed for chessboards of any rectangular shape. Although rook's graphs have only minor significance in chess lore, they are more important in the abstract mathematics of graphs through their alternative constructions: rook's graphs are the Cartesian product of two complete graphs, and are the line graphs of complete bipartite graphs. The square rook's graphs constitute the two-dimensional Hamming graphs.
Rook's graphs are highly symmetric, having symmetries taking every vertex to every other vertex. In rook's graphs defined from square chessboards, more strongly, every two edges are symmetric, and every pair of vertices is symmetric to every other pair at the same distance in moves (making the graph distance-transitive). For rectangular chessboards whose width and height are relatively prime, the rook's graphs are circulant graphs. With one exception, the rook's graphs can be distinguished from all other graphs using only two properties: the numbers of triangles each edge belongs to, and the existence of a unique -cycle connecting each nonadjacent pair of vertices.
Rook's graphs are perfect graphs. In other words, every subset of chessboard squares can be colored so that no two squares in a row or column have the same color, using a number of colors equal to the maximum number of squares from the subset in any single row or column (the clique number of the induced subgraph). This class of induced subgraphs are a key component of a decomposition of perfect graphs used to prove the strong perfect graph theorem, which characterizes all perfect graphs. The independence number and domination number of a rook's graph both equal the smaller of the chessboard's width and height. In terms of chess, the independence number is the maximum number of rooks that can be placed without attacking each other; the domination number is the minimum number needed to attack all unoccupied board squares. Rook's graphs are well-covered graphs, meaning that placing non-attacking rooks one at a time can never get stuck until a set of maximum size is reached.
An rook's graph represents the moves of a rook on an chessboard.Its vertices represent the squares of the chessboard, and may be given coordinates, where and . Two vertices with coordinates and are adjacent if and only if either or . (If, the vertices share a file and are connected by a vertical rook move; if, they share a rank and are connected by a horizontal rook move.)
The squares of a single rank or file are all directly connected to each other, so each rank and file forms a clique—a subset of vertices forming a complete graph. The whole rook's graph for an chessboard can be formed from these two kinds of cliques, as the Cartesian product of graphs . Because the rook's graph for a square chessboard is the Cartesian product of equal-size cliques, it is an example of a Hamming graph. Its dimension as a Hamming graph is two, and every two-dimensional Hamming graph is a rook's graph for a square chessboard. Square rook's graphs are also called "Latin square graphs"; applied to a Latin square, its edges describe pairs of squares that cannot contain the same value. The Sudoku graphs are rook's graphs with some additional edges, connecting squares of a Sudoku puzzle that should have unequal values.
Geometrically, the rook's graphs can be formed by sets of the vertices and edges (the skeletons) of a family of convex polytopes, the Cartesian products of pairs of neighborly polytopes. For instance, the 3-3 duoprism is a four-dimensional shape formed as the Cartesian product of two triangles, and has a rook's graph as its skeleton.
and observe that the
m x n
Km,n
mn
m x n
m+n-2
m-1
n-1
m\nen
n\tbinom{m}{2}
m-2
m\tbinom{n}{2}
n-2
m=n
m-2=n-2
4
m=n=4
When
m=n
n x n
\operatorname{srg}(n2,2n-2,n-2,2)
n x n
n=4
When
n=4
4 x 4
4 x 4
4 x 4
4 x 4
n=4
Rook's graphs are vertex-transitive, meaning that they have symmetries taking every vertex to every other vertex. This implies that every vertex has an equal number of edges: they are
(m+n-2)
m\nen
m!n!
m=n
2n!2
Any two vertices in a rook's graph are either at distance one or two from each other, according to whether they are adjacent or nonadjacent respectively. Any two nonadjacent vertices may be transformed into any other two nonadjacent vertices by a symmetry of the graph. When the rook's graph is not square, the pairs of adjacent vertices fall into two orbits of the symmetry group according to whether they are adjacent horizontally or vertically, but when the graph is square any two adjacent vertices may also be mapped into each other by a symmetry and the graph is therefore distance-transitive.
When
m
n
Sm x Sn
Cmn=Cm x Cn
mn
Square rook's graphs are connected-homogeneous, meaning that every isomorphism between two connected induced subgraphs can be extended to an automorphism of the whole graph.
A rook's graph can also be viewed as the line graph of a complete bipartite graph — that is, it has one vertex for each edge of, and two vertices of the rook's graph are adjacent if and only if the corresponding edges of the complete bipartite graph share a common endpoint. In this view, an edge in the complete bipartite graph from the th vertex on one side of the bipartition to the th vertex on the other side corresponds to a chessboard square with coordinates .
Any bipartite graph is a subgraph of a complete bipartite graph, and correspondingly any line graph of a bipartite graph is an induced subgraph of a rook's graph. The line graphs of bipartite graphs are perfect: in them, and in any of their induced subgraphs, the number of colors needed in any vertex coloring is the same as the number of vertices in the largest complete subgraph. Line graphs of bipartite graphs form an important family of perfect graphs: they are one of a small number of families used by to characterize the perfect graphs and to show that every graph with no odd hole and no odd antihole is perfect. In particular, rook's graphs are themselves perfect.
Because a rook's graph is perfect, the number of colors needed in any coloring of the graph is just the size of its largest clique. The cliques of a rook's graph are the subsets of a single row or a single column, and the largest of these have size, so this is also the chromatic number of the graph. An -coloring of an rook's graph may be interpreted as a Latin square: it describes a way of filling the rows and columns of an grid with different values in such a way that the same value does not appear twice in any row or column. In the same way, a coloring of a rectangular rook's graph corresponds to a Latin rectangle. Although finding an optimal coloring of a rook's graph is straightforward, it is NP-complete to determine whether a partial coloring can be extended to a coloring of the whole graph (this problem is called precoloring extension). Equivalently, it is NP-complete to determine whether a partial Latin square can be completed to a full Latin square.
An independent set in a rook's graph is a set of vertices, no two of which belong to the same row or column of the graph; in chess terms, it corresponds to a placement of rooks no two of which attack each other. Perfect graphs may also be described as the graphs in which, in every induced subgraph, the size of the largest independent set is equal to the number of cliques in a partition of the graph's vertices into a minimum number of cliques. In a rook's graph, the sets of rows or the sets of columns (whichever has fewer sets) form such an optimal partition. The size of the largest independent set in the graph is therefore .
Rook's graphs are well-covered graphs: every independent set in a rook's graph can be extended to a maximum independent set, and every maximal independent set in a rook's graph has the same size, .
The domination number of a graph is the minimum cardinality among all dominating sets. On the rook's graph a set of vertices is a dominating set if and only if their corresponding squares either occupy, or are a rook's move away from, all squares on the board. For the board the domination number is .
On the rook's graph a -dominating set is a set of vertices whose corresponding squares attack all other squares (via a rook's move) at least times. A -tuple dominating set on the rook's graph is a set of vertices whose corresponding squares attack all other squares at least times and are themselves attacked at least times. The minimum cardinality among all -dominating and -tuple dominating sets are the -domination number and the -tuple domination number, respectively. On the square board, and for even, the -domination number is when and . In a similar fashion, the -tuple domination number is when is odd and less than .
Every rook's graph contains a Hamiltonian cycle. However, these cycles may involve moves between squares that are far apart within a single row or column of the chessboard. Instead, the study of "rook's tours", in the mathematics of chess, has generally concentrated on a special case of these Hamiltonian cycles where the rook is restricted to move only to adjacent squares. These single-step rook's tours only exist on boards with an even number of squares. They play a central role in the proof of Gomory's theorem that, if two squares of opposite colors are removed from a standard chessboard, the remaining squares can always be covered by dominoes. They are featured alongside knight's tours in the first work to discuss chess-piece tours, the 9th century Sanskrit Kavyalankara of Rudrata.
The spectrum of a rook's graph (the eigenvalues of its adjacency matrix) consists of the four eigenvalues
m+n-2
m-2
n-2
-2
-2
m
n
m x n
n=2
n=m-1
m
n
2t2\pmt
The graphs for which the neighbors of each vertex induce a rook's graph have been called locally grid. Examples include the Johnson graphs
J(n,k)
k x (n-k)
3 x 3
J(6,3)
4 x 4