 Two vertices and are adjacent if and only if either or ; that is, if they belong to the same rank or the same file of the chessboard.For an rook's graph the total number of vertices is simply .For an rook's graph the total number of vertices is simply and the total number of edges is ; in this case the graph is also known as a two-dimensional Hamming graph or a Latin square graph.