The Smith and Critical Groups of the Square Rook's Graph and its Complement

Let $R_{n}$ denote the graph with vertex set consisting of the squares of an $n \times n$ grid, with two squares of the grid adjacent when they lie in the same row or column. This is the square rook's graph, and can also be thought of as the Cartesian product of two complete graphs of order $n$, or the line graph of the complete bipartite graph $K_{n,n}$. In this paper we compute the Smith group and critical group of the graph $R_{n}$ and its complement. This is equivalent to determining the Smith normal form of both the adjacency and Laplacian matrix of each of these graphs. In doing so we verify a 1986 conjecture of Rushanan.


Introduction
This paper concerns integer invariants of the square rook's graph, denoted R n . Such a graph is formed by taking as its vertex set the squares of an n × n grid, and defining two squares to be adjacent when they lie in the same row or the same column. That is, if one decided to play chess on such a grid, two squares are adjacent when a rook can move from one to the other. It is easy to see that R n is isomorphic to the Cartesian product of two complete graphs of order n, and also to the line graph of the complete bipartite graph K n,n .
To avoid trivialities, we let n ≥ 3 throughout. The graph R n is a strongly regular graph (srg) with parameters v = n 2 k = 2(n − 1) λ = n − 2 µ = 2 and is in fact determined up to isomorphism by these parameters, except in the case n = 4. See [4,7,9] for more information and many interesting properties.
When considering a graph Γ, a standard method of study is to encode its information into a matrix and then work to understand algebraic properties of the matrix. This can sometimes yield useful information about the graph, and is one of the basic ideas of spectral graph theory. Another graph invariant, somewhat more subtle than the spectrum, is an abelian group that can be read off from the Smith normal form of such a matrix. We defer formal definitions until the next section.
From the adjacency matrix we get the Smith group S(Γ) and from the Laplacian matrix we get the critical group K(Γ). Our main theorem will be the determination of these groups for the rook's graph R n and its complement R c n . We will write Z r for the group Z/rZ. Theorem 1.1. Let R n denote the square rook's graph. The critical group and Smith group of R n and its complement R c n are given by the following isomorphisms: 2n−3 ⊕ Z 2(n−1)(n−2) (1.

Remarks.
(1) In [3, Example SNF2], the authors state isomorphism 1.2, and more generally give a diagonal form for the matrix A + (c + 2)I, where A is the adjacency matrix of R n . They then refer the reader to van Eijl's thesis [12] for the "somewhat boring proof". In [1] the author computes the critical group of the line graph of the complete bipartite graph K n,m (i.e., the n × m rook's graph) via integral row and column operations on the Laplacian. Thus the isomorphisms 1.1 and 1.2 can be deduced from these works. We believe the isomorphisms 1.3 and 1.4 are new. (2) The two isomorphisms above for S(R n ) and S(R c n ) appeared as conjectures in [8,.
Computation of the Smith normal form of the adjacency or Laplacian matrix is a standard technique to determine the Smith or critical group of a graph. It is well known that this can be achieved through integral row and column operations, and this approach is popular among many authors. As mentioned in the first remark above, this is how the rook's graphs' invariants have thus far been approached.
Our proof is quite different, and handles all of these isomorphisms uniformly. We will work directly within the particular abelian group to identify a cyclic decomposition for it. Visualizing the group elements in terms of configurations on the graphs will play an important role, and will nicely illuminate the relationship between the graphs and the groups. We note that the most natural decomposition is not always the invariant factor decomposition that arises from Smith normal form. See section 3.1.3 below, and see [13] for a rather spectacular example. For surveys on Smith groups see [8,10]. For a good starting point for critical groups, see [5,6].

Preliminaries
Let M be an m × n matrix with integer entries. We may view the matrix as defining a homomorphism of free abelian groups: It is the cokernel of this map, Z m / Im(M), that we are interested in. This finitely generated abelian group becomes a graph invariant when we take the matrix M to be the adjacency or Laplacian matrix of the graph.
Formally, let Γ be a simple graph and order the vertices in some arbitrary but fixed manner. Let A = (a i,j ) be a matrix with rows and columns indexed by the vertex set of Γ. Set a i,j = 1, if vertex i and vertex j are adjacent 0, otherwise.
Then A is the adjacency matrix of Γ. Define a matrix D = (d i,j ) of the same size as A by The matrix L is the Laplacian matrix of Γ. The adjacency matrix and Laplacian matrix will be our primary focus. The cokernel of A is known as the Smith group of the graph and is denoted S(Γ). The cokernel of L always has free rank equal to the number of connected components of the graph. The torsion subgroup of the cokernel of L is known as the critical group (or sandpile group, Jacobian group, Picard group) of Γ and is denoted K(Γ). The critical group is especially interesting; for connected graphs, its order is equal to the number of spanning trees of the graph. One way to compute the cokernel of M is by using the Smith normal form. It was H.J.S. Smith [11] who first proved that there exist square, unimodular (i.e. determinant ±1) integer matrices P and Q so that P MQ = S, where the matrix S = (s i,j ) satisfies: (1) s i,i divides s i+1,i+1 for 1 ≤ i < min{m, n} (2) s i,j = 0 for i = j. We then have coker M ∼ = Z s 1,1 ⊕ Z s 2,2 ⊕ · · · and this is the so-called invariant factor decomposition of the abelian group. For this reason the integers s i,i are known as the invariant factors of M; their prime power factors are the elementary divisors of M. Any diagonal form of M achieved by unimodular matrices will give a cyclic decomposition of coker M, and serves to identify the group. We will use the following lemma repeatedly.
Lemma 2.1. Let G be a finite abelian group, generated by the elements x 1 , x 2 , . . . , x k . Suppose that there exist integers r 1 , r 2 , . . . , r k so that |G| = r 1 · r 2 · · · r k and |x i | divides Proof. Since the order of each x i divides r i , there is a homomorphism Z r i → G that sends 1 → x i . These homomorphisms extend to a unique map Since the set {x i } generates G, this map is onto, and since both groups have the same order, it must be an isomorphism.

The Rook's Graph and Its Complement
To prove Theorem 1.1 we will apply Lemma 2.1 to each of the four abelian groups. There are three ingredients needed to apply the lemma: we need to know the orders of our groups, exhibit a set of elements and show that their orders divide the orders of the cyclic factors as stated in the theorem, and show these elements do indeed generate the group. We will compute orders of the groups immediately below. The two subsections following will provide the arguments for the orders of the said generators, as well as the proof that they do indeed form a generating set.
As the rook's graph R n is an srg(n 2 , 2(n−1), n−2, 2), we immediately get its adjacency spectrum [4,Chapter 9]: The exponents here indicate multiplicity of the eigenvalue. Since the adjacency matrix of R n is nonsingular, the product of the eigenvalues equals the product of the invariant factors. We deduce: Since R n is regular of degree 2(n − 1), the Laplacian spectrum can be immediately deduced from the adjacency spectrum. We get: Kirchhoff's Matrix-Tree Theorem [4,Prop. 1.3.4] implies that the order of the critical group of R n is the product of the nonzero eigenvalues of the Laplacian, divided by the number of vertices. We get: The complement graph R c n is also strongly regular, with parameters srg(n 2 , (n−1) 2 , (n− 2) 2 , (n − 1)(n − 2)). The exact same calculation as above can be repeated to compute the group orders |S(R c n )| and | K(R c n )|, and one sees that in the statement of Theorem 1.1 the orders of all of the groups involved are correct.

Order arguments.
Let M denote either the adjacency or Laplacian matrix of a graph. Both the domain and codomain of the map defined by M are equal to the free abelian group on the vertex set of the graph. We visualize the elements of this group as configurations on our graph. Formally, for us a configuration on a graph Γ will be a function c : V (Γ) → Z. We suggest that the reader imagine a picture of the graph with integers labeling the vertices. Addition of configurations becomes vertex-wise addition of the labels. For the rook's graph, such a visualization is quite easy; simply take an n × n grid and fill the squares with integers. Now the cokernel of M is still represented by the set of all configurations, but up to a certain equivalence. For the Laplacian matrix, this equivalence is given by "chip-firing", which we will explain in a moment. First, observe that the set of configurations whose labels sum to zero form the smallest direct summand of the codomain of L that contains the image of L. Therefore, the elements of the critical group can always be represented by configurations whose labels sum to zero. (In the Smith group, all configurations are permitted, not just those with labels summing to zero.) Two configurations represent the same element of K(Γ) if one can be transformed into the other by a finite sequence of operations. The following are the operations we allow: (1) fire at a vertex : results in the label of that vertex decreasing by its degree, and the labels of its neighbors each increase by 1, (2) pull at a vertex : results in the label of that vertex increasing by its degree, and the labels of its neighbors each decrease by 1. We will sometimes refer to the labels in the grid as the number of chips on each vertex. With a little thought the reader should be able to recognize that two configurations are equivalent precisely when their difference is in the image of the Laplacian. Thus, we are indeed describing the cokernel of L. We give an example in Figure 1 of two equivalent configurations in the critical group of R 4 . Here and throughout, we use empty space to denote zeros. For the adjacency matrix, we can still play a similar game. The elements of the Smith group can be viewed as configurations on the graph, up to a similar equivalence by a finite sequence of fires and pulls. The only difference is that in the Smith group, it is only the neighbors' labels that change, and no change is made at the vertex that was fired or pulled. In Figure 2, we give an example of two equivalent configurations in the Smith group of R 4 .
Interestingly, the Smith and critical groups for both the rook's graph and its complement share many of the same generators. Overall, we have five main generators. The cyclic summands in our isomorphisms will turn out to be generated by these configurations and their images under certain automorphisms of our graph. If c is a configuration on a graph Γ and σ is an automorphism of Γ, then we can define a new configuration σ(c) In other words, the label at vertex v in the configuration c becomes the label at vertex σ(v) in the configuration σ(c). For the rook's graph, this is again easy to visualize. The automorphisms of R n we use are row swaps, column swaps, and the automorphism ρ : V (R n ) → V (R n ) that reflects across the main diagonal, swapping the ith row with the ith column. All the above comments apply to R c n as well, since R n and R c n share the same vertex set and have the same automorphisms. To show that a particular configuration c has order dividing k, we will exhibit a sequence of fires and pulls that transform the configuration k · c into the all-zero configuration. If such a firing sequence exists for the configuration k · c, then clearly such a firing sequence exists for the configuration k · σ(c); just apply the automorphism σ to all vertices in the first firing sequence. The important point is that when we consider a conjugate pair of configurations c and σ(c), their orders will be equal, though this order will depend on which group we are viewing the elements in.
We now define our main generators c 1 , c 2 , c 3 , c 4 , c 5 . We remind the reader that our vertex set is the squares of an n × n grid; we indicate the value of a configuration c on the square in the ith row and jth column by c(i, j).
We illustrate these five configurations in Figure 3. 3.1.1. K(R n ). We begin with the critical group of R n , whose claimed decomposition is We will use c 1 , c 2 , and c 3 to form the set of generators of K(R n ). We will begin by showing the order of c 1 must divide 2n 2 , and that the order of c 2 and c 3 must divide 2n. Finally, we explain how to get the entire set of generators from the images of these three configurations under certain automorphisms of R n .
To prove the orders of each configuration must divide the desired order, we simply give the firing sequence that gets the desired multiple to the all-zero configuration. We will denote the firing sequence of a configuration c by F (c). Since it does not matter in which order the vertices are fired/pulled, we can exhibit the firing sequence as a function F (c) : V (Γ) → Z where the value on vertex v tells you how many times to fire it if positive, and how many times to pull it if negative. Again, we will usually visualize the firing sequence as labels on an n × n grid, though it is important to not confuse a configuration and a firing sequence. In [2], F (c) is called the representative vector of the firing sequence. For us, this will always be a vector such that c − LF (c) = 0, where 0 is the all-zero configuration.
We will start by formally defining the firing sequence for one configuration, 2n 2 · c 1 , and then explain how to check a vertex's end value after a firing sequence. After doing so, we will simply display each firing sequence as a diagram on the n × n grid, as described above. We have the following.
To show this firing sequence does take 2n 2 ·c 1 to the all-zero configuration, we can check each vertex. First we check (1,1). The initial value of this vertex is −2n 2 , and then it gains (n + 1)(2n − 2) by being pulled n + 1 times. It gains n + 1 chips from (1, 2), and loses n − 1 chips from every vertex below it being pulled once. Thus, the final value on (1, 1) is Through the same reasoning (but reversing the signs), we find that the value at (1, 2) goes to 0 as well. It is clear that the value at any other vertex in the top row ends at 0, since it starts at 0, gains n + 1 from the firings at (1, 2), then loses n + 1 from the pulls at (1, 1). As you can see, we don't actually need to check every vertex individually; the computation is greatly reduced by noticing that certain groups of vertices are affected in the same way by the firing sequence. For example, every vertex in the leftmost column (except (1, 1)) will have the same initial value, and take the same steps to determine its final value. Consider the vertex (i, 1), i > 1, with initial value 0. It will gain 2n − 2 when it is pulled once, and lose n + 1 chips from (1, 1). It will lose n − 2 from its other neighbors in that same column being pulled. Finally, it will gain one chip from (i, 2) being fired. Therefore, the final value on (i, 1) is We can again do the same thing for any vertex (i, 2), i > 1, by simply reversing the signs in our previous argument. Finally, any vertex (i, j) with i > 1 and j > 2 will gain one chip from (i, 2) and lose one from (i, 1), resulting in no change from 0. Therefore, this firing sequence takes 2n 2 · c 1 to the all-zero configuration, i.e., 2n 2 · c 1 is equivalent to the identity.
From now on, we will simply display the firing sequences as diagrams on the n × n grid and allow the reader to check that they work.
The reader may notice that F (2n· c 3 ) = c 3 . This is because c 3 is actually an eigenvector of the Laplacian of R n , with eigenvalue 2n. In fact, c 3 will be an eigenvector for the adjacency matrix of R n as well, and even for the Laplacian and adjacency matrix for R c n . Thus, c 3 will appear as a generator for every group, and its order will be the shifted eigenvalue. We will now demonstrate how we construct all generators of our group using these main generators and certain automorphisms.
The configuration c 2 will be a single generator of order 2n. The other (n−2) 2 generators of order 2n will come from c 3 , through row and column swaps. We allow any permutation of the rows that fixes the first and last row, followed by any permutation of the columns that fixes the first and last column. We can imagine sliding the innermost −1 of c 3 around the inside (n − 2) × (n − 2) square, with the ones on the outer row and column following it.
Finally, the 2(n − 2) generators of order 2n 2 will be the images of c 1 under the automorphisms we now list. We allow any permutation of the columns that fixes the first and last column. We also allow the reflection ρ, followed by any permutation of the rows that fixes the first and last row.
For illustration, we list all generators of K(R 4 ) in Figure 4.

S(R n ).
We will now look at the Smith group, whose claimed decomposition is For our generators of order 2, we will use the images of c 3 under the same automorphisms as before, giving us (n − 2) 2 total. For our generators of order 2(n − 2), we start with c 1 . The automorphisms we apply to c 1 here are the same as before, except we no longer require that the column permutations fix the last column (that is, we allow the 1 to take the last spot in the top row) giving us a total of 2n−3 such generators. Our sole generator of order 2(n − 2)(n − 1) will be c 4 . See Figure 5 for the list of generators of S(R 4 ).
1 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 We give the firing sequences proving that the order of these configurations must divide the desired orders below. We remind the reader that since we are working in the Smith group, the vertex that is fired or pulled is unchanged. Let P = n 2 − 5n + 5.
. Now we will look at the critical and Smith group of the complement of the rook's graph. We'll begin with the critical group, whose claimed decomposition is However, we find a much nicer proof by splitting up one component of size n(n − 1)(n − 2) into one component of size n(n − 2) and one component of size n − 1. We can do this because n − 1 is relatively prime to both n and n − 2. Thus we will show Our main generator of order n(n − 2) will be c 3 ; the single generator of order n − 1 will be c 5 ; the single generator of n(n − 1)(n − 2) will be c 2 ; and the main generator of order n 2 (n − 1)(n − 2) will be c 1 .
The automorphisms we apply to c 3 are the same as in the last two cases to create all (n − 2) 2 generators. Similarly, the automorphisms applied to c 1 are the same as for K(R n ); this allows the 1 to be in any square in the top row that is not the last one, and any square in the leftmost column that is not the last. The firing sequences establishing the divisibility of the orders of the configurations by our desired orders are given below. Let Q = n 2 − n − 1 and U = n(n − 2).
Again, the firing sequence for c 3 is itself. The configuration c 5 is a somewhat special case. If ρ is the reflection about the main diagonal, then c 5 = n(n − 2) · ρ(c 2 ). Since c 2 has order dividing n(n − 2)(n − 1), then ρ(c 2 ) must as well. Therefore, c 5 must have order dividing n − 1.
Again, we list the generators of K(R c 4 ) in Figure 6 as an example.  We will use c 1 as our main generator of order n − 1 and c 4 as our single generator of order (n − 1) 2 . We get 2(n − 1) total generators from c 1 by moving the 1 to be in any square in the top row or leftmost column. We'd like to note that our eigenvector c 3 still makes an appearance in this group, but its eigenvalue is 1, so it's just the identity. This will be useful during our spanning arguments in the next section.
The firing sequences proving that the orders of our configurations must divide our desired order are listed below. We now let T = (n − 2) 2 .
Finally, we finish this section by giving all the generators of S(R c 4 ) in Figure 7.

Spanning arguments.
Now we will show that our set of claimed generators for each group really do span all possible configurations. We define the configuration elsewhere.
As explained earlier, every element of the critical group of both R n and R c n is represented by a configuration with vertex labels summing to zero. Thus the set is a generating set for both critical groups. We will show that each of these q i,j can be expressed as a linear combination of the elements exhibited in the previous section, therefore showing that these elements do indeed form a generating set.
For the Smith groups, an obvious generating set consists of all configurations with a single vertex labeled 1. We will express all such configurations as linear combinations of the elements exhibited for the Smith groups in the last section.
3.2.1. K(R n ). We begin with the critical group of R n . The configuration c 1 with the automorphisms previously mentioned are in fact q 1,j and q i,1 for 1 < i, j < n. To get q 1,n , we just take c 2 and get rid of the unwanted ones using −q 1,j for 1 < j < n. For example, in K(R 4 ), we can use the following combination of generators. 1 -1 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 1 000 -1 000 000 000 000 000 000 000 000 000 000 000 000 000 + -3 1 1 1 000 000 000 000 000 000 000 000 000 000 000 000 = -1 000 000 1 000 000 000 000 000 000 000 000 000 000 000 000 To get q n,1 , we need to start with the all-zero configuration and fire the top left once. Then, we get rid of the unwanted ones using −c 2 and −q i,1 for 1 < i < n. Going back to R 4 , we do the following. To get q i,j for 1 < i, j < n we can just use the automorphism of −c 3 that puts a 1 in spot (i, j), and then get rid of the unwanted ones using q 1,j and q i,1 . For example, we can do the following to get q 2,3 in R 4 .
1 000 -1 000 -1 000 1 000 000 000 000 000 000 000 000 000 + -1 000 1 000 000 000 000 000 000 000 000 000 000 000 000 000 + -1 000 000 000 1 000 000 000 000 000 000 000 000 000 000 000 = -1 000 000 000 000 000 1 000 000 000 000 000 000 000 000 000 To get a 1 in some spot in the bottom row, we can start with the all-zero configuration and fire the first spot of the column it's in and then get rid of all unwanted ones using the other q i,j we've built up. Analogously, if we want to get a 1 in the rightmost column, we fire the spot in the same row in the leftmost column, and then get rid of unwanted ones. After obtaining q i,n or q n,j for 1 ≤ i, j < n, we can get q n,n using the same method.

S(R n ).
For the Smith group S(R n ), we must show a single 1 can be put in any spot. The generators of S(R n ) are almost exactly the same as K(R n ), so the spanning argument is almost identical. Since we are in the Smith group, however, we must worry about getting a 1 in the top-left corner. But this comes easily from c 4 . Instead of c 2 , we have the automorphism of c 1 that puts a 1 in spot (1, n) and then we get rid of the −1 in the top left using c 4 . Other than this, the argument is identical.
3.2.3. K(R c n ). For the critical group K(R c n ), we again must show that we can get any q i,j for (i, j) = (1, 1). We can get q 1,j for 1 < j ≤ n and q i,1 for 1 < i < n the same way we did for the critical group of the rook's graph; the fact that we are in the complement doesn't change anything since we never fire any vertices. Getting q n,1 takes a little bit of work. We start with the all-zero configuration and then fire all of the vertices in the top row (except the first). Then we pull the top left n − 2 times. 000 000 000 000 000 000 000 000 000 000 000 000 000 If we now add (n − 1) 2 · c 2 to what we have, we obtain a configuration with n − 1 in all of the spots of the leftmost column other than the top, which has −(n − 1) 2 .
-9 000 000 000 3 000 000 000 3 000 000 000 3 000 000 000 Notice that this configuration is similar to c 5 which has n(n − 2) in all of the spots of the leftmost column, except the top which has −n(n − 1)(n − 2). Since n − 1 and n(n − 2) are relatively prime, by the division algorithm, there must exist integers a and b such that a(n − 1) + bn(n − 2) = 1. Letting ρ be our reflection across the main diagonal again, this means that ρ(c 2 ) is a linear combination of c 5 and the element above. With ρ(c 2 ) in hand, we can get q n,1 the same way we obtained q 1,n . Getting q i,j for 1 < i, j < n can be done in much the same way as we did in the non-complement graph. We use the automorphism of −c 3 that puts a 1 in spot (i, j), and then get rid of the unwanted ones using q 1,j and q i,1 . Lastly, to get a 1 in some spot in the bottom row not equal to (n, 1) or (n, n), we can start with the all-zero configuration and fire the top left. Then we pull the first spot of the column it's in and get rid of all unwanted numbers using the other q i,j we've built up. This gives us q n,j , 1 ≤ j < n, and we obtain q i,n , 1 ≤ i < n, in an analogous way. After obtaining q i,n or q n,j for 1 ≤ i, j < n, we again get q n,n using the same method.
3.2.4. S(R c n ). Looking at S(R c n ), our spanning argument becomes very easy. The configuration c 4 and all automorphisms of c 1 allow us to get a single 1 in any spot in the top row or left column. We remind the reader that c 3 , our eigenvector, now has eigenvalue 1, and thus c 3 is equal to the identity. It follows that any automorphism of c 3 will be the identity as well. So we can put a 1 in any spot in the bottom right (n − 1) × (n − 1) square by applying some automorphism to −c 3 that fixes the top left spot, and then getting rid of the unwanted ones and negative ones in the top row and leftmost column.

Acknowledgements
This work was supported by the James Madison University's Tickle Fund.