# Rook's graph

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.

## Definitions

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 $n^2$ and the total number of edges is $n^3 - n^2$; 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 $\square$ Km. The complement graph of a 2 × n rook's graph is a crown graph.

## Symmetry

Rook's graphs are vertex-transitive and (n + m − 2)-regular; they are the only regular graphs formed from the moves of standard chess pieces in this way (Elkies). When m ≠ n, the symmetries of the rook's graph are formed by independently permuting the rows and columns of the graph. When n = m the graph has additional symmetries that swap the rows and columns; the rook's graph for a square chessboard is symmetric.

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 and n are relatively prime, the symmetry group Sm×Sn of the rook's graph contains as a subgroup the cyclic group Cmn = Cm×Cn that acts by cyclically permuting the mn vertices; therefore, in this case, the rook's graph is a circulant graph.

## Perfection

The 3×3 rook's graph, colored with three colors and showing a clique of three vertices. In this graph and each of its induced subgraphs the chromatic number equals the clique number, so it is a perfect graph.

A rook's graph can also be viewed as the line graph of a complete bipartite graph Kn,m — that is, it has one vertex for each edge of Kn,m, 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 ith vertex on one side of the bipartition to the jth vertex on the other side corresponds to a chessboard square with coordinates (i,j).

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 Chudnovsky et al. (2006) 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 its rows and columns, and the largest of these have size max(m,n), so this is also the chromatic number of the graph. An n-coloring of an n×n rook's graph may be interpreted as a Latin square: it describes a way of filling the rows and columns of an n×n grid with n different values in such a way that the same value does not appear twice in any row or column.

 a b c d e f g h 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 a b c d e f g h
A non-attacking placement of eight rooks on a chessboard, forming a maximum independent set in the corresponding rook's graph

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 min(m,n). Every color class in every optimal coloring of a rook's graph is a maximum independent set.

## Characterization

Moon (1963) characterizes the m × n rook's graph as the unique graph having the following properties:

• It has mn vertices, each of which is adjacent to n + m − 2 edges.
• mn(m −1)/2 of the edges belong to m − 2 triangles and the remaining mn(n −1)/2 edges belong to n − 2 triangles.
• Any two vertices that are not adjacent to each other belong to a unique 4-cycle.

When n = m, these conditions may be abbreviated by stating that an n×n rook's graph is a strongly regular graph with parameters srg(n2, 2n − 2, n − 2, 2), and that every strongly regular graph with these parameters must be an n×n rook's graph when n≠4. When n=4, there is another strongly regular graph, the Shrikhande graph, with the same parameters as the 4×4 rook's graph. The Shrikhande graph can be distinguished from the 4×4 rook's graph in that the neighborhood of any vertex in the Shrikhande graph is connected in a 6-cycle, while in the rook's graph it is connected into two triangles.

## Domination

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 m×n board. For the m×n board the domination number is min(m,n) (Yaglom & Yaglom 1987).

On the rook's graph a k-dominating set is a set of vertices whose corresponding squares attack all other squares (via a rook's move) at least k times. A k-tuple dominating set on the rook's graph is a set of vertices whose corresponding squares attack all other squares at least k times and are themselves attacked at least k − 1 times. The minimum cardinality among all k-dominating and k-tuple dominating sets are the k-domination number and the k-tuple domination number, respectively. On the square board, and for even k, the k-domination number is nk/2 when n ≥ (k2 − 2k)/4 and k < 2n. In a similar fashion, the k-tuple domination number is n(k + 1)/2 when k is odd and less than 2n (Burchett, Lane & Lachniet 2009).