1 Introduction

Throughout the text we just consider simple undirected graphs. The vertex set of a graph G is denoted by V(G) and its edge set by E(G). An edge with end vertices i and j is denoted by ij. If \(E' \subseteq E(G)\), then \(G[E']\) denotes the subgraph of G induced by the end vertices of the edges in \(E'\). The maximum degree of the vertices in G is denoted by \(\Delta (G)\). A vertex subset where each pair of vertices are (aren’t) the end vertices of an edge is called a clique (stable set) of G, and the maximum number of vertices forming a clique (stable set) in G is the clique (stability) number of G. A stable set of maximum cardinality is called a maximum stable set. The adjacency matrix of a graph G is denoted A(G), and its eigenvalues are also called the eigenvalues of G. The spectrum of G, i.e., its multiset of eigenvalues, is \(\sigma (G)=\{\mu ^{[s_1]}_1, \mu ^{[s_2]}_2, \dots , \mu ^{[s_p]}_p\}\), where \(\mu _1, \mu _2, \dots , \mu _p\) are the distinct eigenvalues of G and \(s_1, s_2, \dots , s_p\) are the corresponding multiplicities. Usually, when \(s_j=1\) for some j, we write \(\mu _j\) instead of \(\mu _j^{[1]}\). If \(\mu \) is an eigenvalue of a graph G, the eigenspace associated with \(\mu \) is denoted by \({\mathcal {E}}_G(\mu )\).

The largest eigenvalue of a graph as well as its least eigenvalue has been investigated by many researchers. The book published in 2015 by Dragan Stevanović [18] provides an overview of the developments on the largest eigenvalue of a graph obtained in the 10 years prior to its publication. Chapter 3 of the book published in 2015 by Stanić [17] is entirely devoted to inequalities for the least eigenvalue of a graph. More particularly, distance-regular graphs with smallest eigenvalue at least \(-m\), where \(m \ge 2\) is a fixed integer, were studied in [10]. A related result was obtained applying edge clique partitions [12] in the particular context of geometric distance-regular graphs [19, Proposition 9.8].

Recently, a lower bound on the least eigenvalue and a necessary and sufficient condition for this lower bound to be attained was deduced in [5, Corollary 3.1] for scalar multiples of graphs. This approach was motivated by results on line graphs and generalized line graphs. Using a slightly different proof, the same result was independently obtained by the authors in arXiv-preprint [3, Theorem 3.3] and is now presented in Sect. 3 (see Theorem 2). Edge clique partitions are used in both approaches. However, in the current paper, our focus is on using this combinatorial structure as a tool to obtain also upper bounds on the least eigenvalues of arbitrary graphs. Furthermore, these bounds are applied to obtain precise results for the least eigenvalues of certain graphs and also to prove that some nontrivial infinite families of connected graphs have constant least eigenvalue, to the construction of this type of families, nontrivial infinite families of connected graphs, \({\mathcal {G}}(H)=\{G_k \mid k \ge m(H)\}\), with least eigenvalue \(-k\) (where H is a connected graph with least eigenvalue \(-m(H)\)), and nontrivial infinite families of connected integral graphs. A trivial infinite family of connected graphs with constant least eigenvalue is the family of complete graphs \(K_n\), for \(n \ge 2\), and a trivial infinite family of connected integral graphs is the family of hypercubes \(Q_k\) (the k-cubes with \(2^k\) vertices) whose spectrum for each k is \(\sigma (Q_k)=\{k, (k-2)^{[{k \atopwithdelims ()1}]}, (k-4)^{[{k \atopwithdelims ()2}]}, \dots , (-k+2)^{[{k \atopwithdelims ()k-1}]}, -k\}\)

Among the applications, special attention is given to the n-Queens graphs \({\mathcal {Q}}(n)\), which is obtained from the \(n\times n\) chessboard where its squares are the vertices of the graph and two of them are adjacent if and only if they are in the same row, column or diagonal of the chessboard. This is a interesting family of connected graphs for which we prove that the least eigenvalue of \({\mathcal {Q}}(n)\) is equal to \(-4\) for every \(n \ge 4\) and its multiplicity is \((n-3)^2\).

This paper is organized as follows. In the next section, we recall some useful edge clique partition graph parameters. Furthermore, some results on these parameters are obtained and families of graphs with a particular edge clique partition property are presented. Section 3 includes the main results of this paper. Lower (respectively, upper) bounds on the least eigenvalue of a graph are deduced and necessary and sufficient (just sufficient) conditions for which the lower (respectively, upper) bound is attained are proven. Section 4 is devoted to the application of the main results to the family of Queens graphs \({\mathcal {Q}}(n)\). From this application, we conclude that the lower bound on the least eigenvalue of \({\mathcal {Q}}(n)\) is constant and attained for \(n \ge 4\). We finish with some conclusions and remarks in Sect. 5, where the use of edge clique partitions on the construction of nontrivial infinite families of connected graphs with known least eigenvalues and also nontrivial infinite families of connected integral graphs is analyzed.

2 Edge clique partitions

Edge clique partitions (ECPs for short) were introduced in [12], where the content of a graph G, denoted by C(G), was defined as the minimum number of edge disjoint cliques whose union includes all the edges of G. Such minimum ECP is called in [12] content decomposition of G. As proved in [12], in general, the determination of C(G) is \({\textbf{N}}{\textbf{P}}\)-Complete. Recently, in [20, Corollary 3.2], a sharp lower bound on the content of a graph in terms of its largest eigenvalue, minimum degree and clique number is deduced.

Definition 1

(Clique degree and maximum clique degree) Consider a graph G and an ECP \(P=\{ E_i \mid i \in I \}\). Then, \(V_i=V(G[E_i])\) is a clique of G for every \(i \in I\). For any \(v \in V(G)\), the clique degree of v relative to P, denoted \(m_v(P)\), is the number of cliques \(V_i\) containing the vertex v, and the maximum clique degree of G relative to P, denoted \(m_G(P)\), is the maximum of clique degrees of the vertices of G relative to P.

From Definition 1, considering an ECP \(P=\{ E_i \mid i \in I \}\), the parameters \(m_v(P)\) and \(m_G(P)\) can be expressed as follows.

$$\begin{aligned} m_v(P)= & {} \{i\in I \mid v\in V(G[E_i])\},\qquad \forall v \in V(G); \end{aligned}$$
(1)
$$\begin{aligned} m_G(P)= & {} \max \{ m_v \mid v \in V(G) \}. \end{aligned}$$
(2)

Remark 1

It is clear that if P is an ECP of G, then \(m_G(P)\) is not greater than \(|P|\). In particular, if P is a content decomposition of G, then \(m_G(P) \le C(G)\).

Example 1

Figure 1 depicts a graph G such that \(V(G)=\{1, 2, 3, 4, 5\}\) and the ECP \(P=\{\{12, 23, 31\}, \{34, 45, 53\}, \{24\}\}\) which is a content decomposition of G. From Definition 1, it follows that \(m_v(P)=2\), if \(v \in \{2, 3, 4\}\) and \(m_v(P)=1\), if \(v \in \{1, 5\}\). Therefore, \(m_G(P)=2\).

Fig. 1
figure 1

A graph G with a content decomposition where, on the right, the edges with the same color, among the colors , and , belong to the same part (Color figure online)

Remark 2

The complete graphs \(K_n\) are the unique connected graphs that admit the trivial ECP \(P=\{E(K_n)\}\) and thus \(m_{K_n}(P)=1\). It is also immediate that if P is an ECP of a graph G, then \(m_{G}(P) \le \Delta (G)\). In the particular case of a tree T since each part of its unique ECP, \(P=\{\{e\} \mid e \in E(T)\}\), is singleton, then \(m_{T}(P)= \Delta (T)\).

The next theorem allows the construction of families of connected graphs \({\mathcal {G}}(H)=\{G_k \mid k \ge m_{H}(P)\}\), obtained from an arbitrary connected graph H with an ECP P where each graph \(G_k \in {\mathcal {G}}(H)\) has H as a subgraph and admits an ECP \(P_k\) such that \(m_{G_k}(P_k)=k\).

Theorem 1

Let H be a connected graph with an ECP P. Then, for every \(k \ge m_{H}(P)\) there exists a connected graph \(G_k\) which has H as a subgraph and admits an ECP \(P_k\) such that \(m_{G_k}(P_k)=k\).

Proof

Consider a connected graph H with an ECP P and a family of graphs \({\mathcal {G}}(H)=\{G_k \mid k \ge m_{H}(P)\}\), where \(G_{m_{H}(P)}=H\) and for \(k \ge m_H(P)\), each graph \(G_{k+1}\) is obtained from \(G_{k}\) as follows. Produce a copy \(G'_k\) of \(G_k\), and consider a permutation \(\pi _k\) on the vertices of \(G_k\). Connect by an edge each vertex v in \(G_k\) to \(\pi _k(v)=v' \in V(G'_k)\). Then, by construction, the graphs in \({\mathcal {G}}(H)\) are connected having H as a subgraph. Furthermore, they are such that \(V(G_{k+1}) = V(G_k) \cup V(G'_k)\) and \(E(G_{k+1})=E(G_k) \cup E(G'_k) \cup M_k\), where \(M_k=\{vv' \mid v \in V(G_k) \; \wedge \; v' \in V(G'_k)\}\); that is, \(M_k\) is the matching corresponding to the assignment of the vertices in \(G_k\) to their images by \(\pi _k\) on its copies in \(G'_k\). Assuming that \(P_k\) is an ECP of \(G_k\), for which \(m_{G_k}(P_k)=k\) and \(P'_k\) is the corresponding ECP of \(G'_k\), then \(P_{k+1} = P_k \cup P'_k \cup \{ \{e\} \mid e \in M_k\}\) is an ECP of \(G_{k+1}\) for which \(m_{G_{k+1}}(P_{k+1})=k+1\). Therefore, by induction on k, it follows that for every \(k \ge m_{H}(P)\), \(m_{G_k}(P_k)=k\). \(\square \)

The above defined family of graphs

$$\begin{aligned} {\mathcal {G}}(H) = \{G_k \mid k \ge m_{H}(P)\} \end{aligned}$$
(3)

depends on the initial graph \(G_{m_{H}(P)}=H\) and from the permutations \(\pi _k\). If the chosen graph H admits an ECP P which is a content decomposition, as it is the case of the graph G in Example 1, it is immediate that for every \(k \ge m_{H}(P)\), independently of the chosen permutations \(\pi _k\), \(P_k\) is a content decomposition of \(G_k\). So this property is invariant to the permutations \(\pi _k\).

3 Main results

Using the above defined graph parameters, the next theorem states a lower bound on the least eigenvalue of a graph and a necessary and sufficient condition for to be attained in a particular ECP.

Theorem 2

Let \(P=\{ E_i \mid i \in I \}\) be an ECP of a graph G, \(m=m_G(P)\) and \(m_v=m_v(P)\) for every \(v \in V(G)\). Then,

  1. 1.

    If \(\mu \) is an eigenvalue of G, then \(\mu \ge -m\).

  2. 2.

    \(-m\) is an eigenvalue of G if and only if there exists a vector \(X \ne \textbf{0}\) such that

    1. a.

      \(\sum \limits _{j \in V(G[E_i])} x_j = 0\), for every \(i \in I\) and

    2. b.

      \(\forall v \in V(G) \;\; x_v=0\) whenever \(m_v \ne m\).

    In the positive case, X is an eigenvector associated with \(-m\).

Proof

Let A(G) be the adjacency matrix of G.

  1. 1.

    Let X be an eigenvector of A(G) associated with an eigenvalue \(\mu \). Then,

    $$\begin{aligned} (\mu +m) \Vert X \Vert ^2&= X^T A(G) X + m\Vert X \Vert ^2\\&= \sum _{i \in I} \sum _{uv \in E_i} \left( 2 x_u x_v \right) + m \Vert X \Vert ^2\\&= \sum _{i \in I} \left( \sum _{v \in V(G[E_i])} x_v \right) ^2 - \sum \limits _{v \in V(G)}{m_vx_v^2} + m \Vert X \Vert ^2\\&= \sum _{i \in I} \left( \sum _{v \in V(G[E_i])} x_v \right) ^2 + \sum \limits _{v \in V(G)} (m-m_v)x_v^2 \ge 0. \end{aligned}$$
  2. 2

    f \(-m\) is an eigenvalue of G, then, from the proof of item , equalities 2(a) and 2(b) follow. Conversely, if there exists a vector \(X \ne \textbf{0}\) for which 2(a) and 2(b) hold, then \(X^T A(G) X + m\Vert X \Vert ^2 = 0\). Assuming that \(\mu \) is the least eigenvalue of G, \(-m = \frac{X^T A(G) X}{\Vert X \Vert ^2} \ge \mu \). By item 1, we have \(\mu \ge -m\) and hence \(\mu = - m\). In the positive case, it is immediate that X is an eigenvector associated with the eigenvalue \(-m\).\(\square \)

Fig. 2
figure 2

A graph with a content decomposition \(P'\), where the edges with the same color, among the colors , , and , belong to the same part. The labels of the vertices on the right are the entries of the vector X considered in Theorem 2 (Color figure online)

Example 2

Consider the graph G and the ECP P of Example 1. Applying Theorem 2, since \(m_G(P)=2\), it follows that \(-m_G(P)=-2\) is a lower bound of the spectrum of G.

Now, consider the graph H and the ECP \(P'\) depicted in Fig. 2. It is immediate that \(m_H(P')=2\). Note that the vector \(X=[-1,1,0,1,-1]^T\), whose entries are displayed over the vertices of H on the right, fulfills the necessary and sufficient conditions of Theorem 2: The condition 2(a) is checked since for each clique, the sum of the entries in X is zero; the condition 2(b) is vacuously true since there is no vertex whose clique degree is different from \(m_H(P')\). Thus, \(-m_H(P') = -2\) is not just a lower bound for \(\sigma (H)\) but also its least eigenvalue and X is an eigenvector associated with \(-2\).

From Theorem 2, it follows that the best lower bound for the least eigenvalue of a graph G is obtained from an ECP P such that \(m_G(P) \le m_G(P')\) for every ECP \(P'\) of G. Theorem 2 also provides the spectral lower bound for the content of a graph which appears in [9] and is now stated in the next corollary.

Corollary 3

Let \(\mu \) be the least eigenvalue of a graph G. Then, \(-\mu \le C(G)\).

Proof

If P is a content decomposition of G, then, according to Remark 1, \(m_G(P) \le C(G)\). By Theorem 2, \(-m_G(P) \le \mu \) and so \(-\mu \le C(G)\). \(\square \)

The following corollaries are also direct consequences of Theorem 2.

Corollary 4

Let G be a graph of order n, and let X be a vector of \({\mathbb {R}}^n \setminus \{\textbf{0}\}\). Then, \(X \in {\mathcal {E}}_{G}(-m)\) if and only if the conditions 2(a) and 2(b) of Theorem 2 hold.

Corollary 5

Let P be an ECP of a graph G. If \(-m_G(P)\) is an eigenvalue of G, then it is the least eigenvalue of G and for every ECP \(P'\) of G, \(m_G(P') \ge m_G(P)\).

Applying Theorem 2-2 to the graph G with the ECP P of Example 1, it follows that its least eigenvalue \(\mu \) is not less than \(-m_{G}(P) = -2\). Furthermore, since the necessary and sufficient conditions 2(a) and 2(b) of Theorem 2 are not fulfilled in the ECP P (actually, G does not have an ECP fulfilling the necessary and sufficient conditions of Theorem 2-), \(-m_{G}(P) < \mu \). Additionally, there is no induced subgraph H of G with an ECP \(P'\) such that its least eigenvalue is \(\mu ' = - m_H(P') \ne -1\). Otherwise, taking into account that the eigenvalues of H interlace the eigenvalues of G [7, Corollary 1.3.12], we obtain

$$\begin{aligned} -2 = -m_{G}(P)< \mu \le \mu ' = - m_H(P') < -1, \end{aligned}$$

which is a contradiction. It should be noted that \(m_H(P')=1\) implies that H is a complete graph.

As it is well known, the least eigenvalue of the generalized line graphs (see, e.g., [7, Def. 1.2.3]), which includes the line graphs, is not less than \(-2\). However, not every graph with least eigenvalue not less than \(-2\) is a generalized line graph. For instance, the least eigenvalue of the Petersen graph is \(-2\) and it is not a generalized line graph. A connected graph with least eigenvalue not less than \(-2\) which is not a generalized line graph is called exceptional graph [7, p.154]. From Theorem 2, it follows that a graph G such that \(m_{G}(P) = 2\) for some ECP P is either a generalized line graph or an exceptional graph.

Now, as a corollary of Theorem 2, we state a sharp upper bound on the least eigenvalue of a graph.

Corollary 6

Let G be a graph with least eigenvalue \(\mu \). Assume that H is an induced subgraph of G for which there exists an ECP \(P'\) fulfilling the conditions 2(a) and 2(b) of Theorem 2. Then,

  1. 1

    \(\mu \le - m_H(P')\).

  2. 2

    If G admits an ECP P such that \(m_G(P)=m_H(P')\), then \(\mu = - m_H(P')\).

Proof

If \(\mu '\) is the least eigenvalue of H, then, by Theorem 2, \(\mu ' = - m_H(P')\).

  1. 1.

    Since H is an induced subgraph of G, the eigenvalues of H interlace the eigenvalues of G. In particular, \(\mu \le \mu ' = - m_H(P')\).

  2. 2.

    Assume that G admits an ECP P such that \(m_G(P) = m_H(P')\). Since, by Theorem 2-, \(-m_G(P) \le \mu \), it follows that \(-m_G(P) \le \mu \le \mu ' = - m_H(P')\) and thus \(\mu = - m_H(P')\).\(\square \)

Remark 3

Item 2 of Corollary 6 states a sufficient condition for \(\mu = - m_H(P')\), where \(\mu \) is the least eigenvalue of a graph G, H is an induced subgraph of G, and \(P'\) is an ECP of H fulfilling the conditions 2(a) and 2(b) of Theorem 2. However, this condition is not a necessary condition for \(\mu = - m_H(P')\).

For instance, consider that G is the graph depicted in Fig. 3 (which has a subgraph H induced by the vertex subset \(\{1, 2, 3, 4\} \subseteq V(G)\) which has an ECP \(P'\) fulfilling the conditions 2(a) and 2(b) of Theorem 2). Despite \(\mu = -m_H(P')\), there is no ECP P of G such that \(m_G(P) = m_H(P')\).

Fig. 3
figure 3

A graph G with least eigenvalue \(-2\) which has a subgraph H induced by the vertex subset \(\{1, 2, 3, 4\} \subseteq V(G)\) which admits an ECP \(P'\) fulfilling the conditions 2(a) and 2(b) of Theorem 2 and such that \(m_H(P')=2\). However, there is no ECP P of G such that \(m_G(P) = m_H(P')\)

From Corollary 6, we may conclude that the best upper bound for the least eigenvalue of a graph G is obtained from an induced subgraph H having an ECP P fulfilling the conditions 2(a) and 2(b) of Theorem 2, such that \(m_{H}(P) \ge m_{H'}(P')\) for every induced subgraph \(H'\) and every ECP \(P'\) of \(H'\), fulfilling the conditions 2(a) and 2(b) of Theorem 2.

Using Theorem 2 and Corollary 6, we are able to produce infinite families of connected graphs with constant integer least eigenvalue. One such family \({\mathcal {G}}\) can be obtained from a graph G such that its least eigenvalue is \(-m_G(P_1)\) for some ECP \(P_1\) of G, and \({\mathcal {G}}=\{G_1=G, G_2, G_3, \dots \}\), where \(G_{k+1}\), with \(k \ge 1\), is obtained from \(G_k\) by adding a new vertex v and connecting v to one or more vertices of \(G_k\) such that the ECP \(P_{k+1}\) has no clique degree greater than \(m_{G_k}(P_k)\). For instance, we may connect v to the vertices of some clique \(C=\{v_1, \dots , v_C\}\) defined by the ECP \(P_k\) and thus it follows that \(P_{k+1} = (P_k {\setminus } E(C)) \cup \{E(C) \cup \{vv_1, \dots , vv_C\}\}\) is an ECP of \(G_{k+1}\) for which \(m_{G_k}(P_k)=m_{G_{k+1}}(P_{k+1})\). Therefore, the least eigenvalue of \(G_k\) is \(-m_{G_1}\) for every \(G_k \in {\mathcal {G}}\). Considering the particular case of the graph H depicted in Fig. 2 whose least eigenvalue is \(-2 = m_H(P')\), where \(P' = \{\{12, 23, 13\}, \{15\}, \{34, 45, 35\}, \{24\}\}\), we may produce the infinite family of connected graphs \({\mathcal {H}}=\{H_1, H_2, H_3, \dots \}\), with constant integer least eigenvalue, proceeding as follows.

  1. 1.

    \(H_1=H\) and \(P_1=P'\) is an ECP such that the least eigenvalue is \(-m_{H_1}(P_1)=-2\);

  2. 2.

    \(H_2\) is obtained from \(H_1\) setting \(V(H_2)=V(H_1) \cup \{6\}\) and \(E(H_2) = E(H_1) \cup \{61, 62, 63\}\). Considering the ECP \(P_2\) obtained from \(P_1\) setting \(P_2 = (P_1 {\setminus } \{12, 23, 13\}) \cup \{\{12, 23, 13, 16, 26, 36\}\}\), it follows that \(m_{H_2}(P_2)=m_{H_1}(P_1)\) and thus the least eigenvalue of \(H_2\) is \(-m_{H_1}(P_1)\);

  3. 3.

    \(H_3\) is obtained from \(H_2\) setting \(V(H_3)=V(H_2) \cup \{7\}\) and \(E(H_3) = E(H_2) \cup \{71, 75\}\). Considering the ECP \(P_3\) obtained from \(P_2\) setting \(P_3 = (P_2 {\setminus } \{15\}) \cup \{\{15, 17, 57\}\}\) it follows that \(m_{H_3}(P_3)=m_{H_2}(P_2)\) and thus the least eigenvalue of \(H_3\) is \(-m_{H_1}(P_1)\);

  4. 4.

    etc.

4 An application

We start this section with some historical notes about the n-Queens graph which includes its definition. These graphs form an interesting infinite family of connected graphs with constant least eigenvalue which, as it will be proved, is equal to \(-4\). Furthermore, it is also proved that its multiplicity is \((n-3)^2\), for every \(n \ge 4\).

4.1 Some historical notes related with the n-Queens graph

The problem of placing 8 queens on a chessboard such that no two queens attack each other—i.e. such that there are no queens in the same row, column or diagonal of the chessboard—was first posed, in 1848, by M. Bezzel, a German chess player [2]. The German mathematician and physicist Gauss had the knowledge of this problem and found 72 solutions. However, according to [1], the first to solve the problem by finding all 92 solutions was F. Nauck in 1850 [11]. As later claimed by Gauss, this number is indeed the total number of solutions. The proof that there is no more solutions was published by E. Pauls in 1874 [14]. The n-Queens problem is a generalization of the above problem, consisting of placing n non-attacking queens on \(n\times n\) chessboard. In [14], it was also proved that the n-Queens problem has solution for every \(n \ge 4\). It is immediate that a solution of the n-Queens problem corresponds to a maximum stable set of the n-Queens graph \({\mathcal {Q}}(n)\), whose stability number is n. The problem of determining the number of solutions for an arbitrary n, which is equivalent to determining the number of maximum stable sets in \({\mathcal {Q}}(n)\), remains as an open problem. Recently, Michael Simkin, a postdoctoral fellow at Harvard University’s Center of Mathematical Sciences and Applications, proved that for \(n \times n\) chessboards, with huge values of n, there are about \((0.143n)^n\) ways the queens can be placed so none are attacking each other [16]. Although this number is an approximation, the obtained (lower and upper) bounds produce a very narrow range.

The n-Queens problem has deserved the attention of researchers over the years, belonging to the historical roots of the mathematical approach to domination in graphs which goes back to 1862 [8]. In the 1970s, the research on the chessboard domination problems was redirected to more general problems of domination in graphs. Since then, this topic has attracted many researchers, turning it into an area of intense research.

The n-Queens graph, \({\mathcal {Q}}(n)\), associated with the \(n \times n\) chessboard \({\mathcal {T}}_n\), has \(n^2\) vertices, each one corresponding to a square of the \(n \times n\) chessboard. Two vertices of \({\mathcal {Q}}(n)\) are adjacent if and only if the corresponding squares in \({\mathcal {T}}_n\) are in the same row or in the same column or in the same diagonal.

The rows and columns of the chessboard are numbered from the top to the bottom and from the left to the right, respectively. We use the \((i,j) \in [n]^2\) coordinates as labels of the chessboard squares belonging to the \(i^{th}\) row and jth column as well as labels of the corresponding vertices in \({\mathcal {Q}}(n)\). Alternatively, the \(n^2\) squares of \({\mathcal {T}}_n\) and the corresponding \(n^2\) vertices in \({\mathcal {Q}}(n)\) can be labeled by the numbers between 1 and \(n^2\) as it is exemplified in Fig. 4, for the particular case of \({\mathcal {T}}_4\).

Fig. 4
figure 4

Labeling of \({\mathcal {T}}_4\)

The study of combinatorial properties of n-Queens graphs has covered several invariants such as the clique number, vertex independence number, chromatic number and domination number [4, 6, 13, 15] (see also [3], where a short overview on the main combinatorial properties of \({\mathcal {Q}}(n)\) is given). However, as far as we know, there are no published results in scientific journals concerning their spectral properties.

4.2 The least eigenvalue of \({\mathcal {Q}}(n)\), for every \(n \ge 4\)

It is useful to start this subsection with the following theorem.

Theorem 7

Let \(n\in {\mathbb {N}}\) such that \(n \ge 4\).

  1. 1.

    \(-4 \in \sigma ({\mathcal {Q}}(n))\) if and only if there exists a vector \(X \in {\mathbb {R}}^{n^2}\setminus \{\textbf{0}\}\) such that

    1. (a)

      \(\sum \limits _{j=1}^n {x_{(k,j)}} = 0\) and \(\sum \limits _{i=1}^n {x_{(i,k)}} = 0\), for every \(k \in [n]\),

    2. (b)

      \(\sum \limits _{i+j=k+2}{x_{(i,j)}} = 0\), for every \(k \in [2n-3]\),

    3. (c)

      \(\sum \limits _{i-j=k+1-n} x_{(i,j)} = 0\), for every \(k \in [2n-3]\),

    4. (d)

      \(x_{(1,1)} = x_{(1,n)} = x_{(n,1)} = x_{(n,n)} = 0\).

    In the positive case, X is an eigenvector associated with \(-4\).

  2. 2.

    If \(\mu \) is the least eigenvalue of \({\mathcal {Q}}(n)\), then \(\mu = -4\).

Proof

Let us prove each of the items.

  1. 1.

    The proof follows taking into account that the summations 1(a)–1(c) correspond to the summations 2(a) in Theorem 2. Here, the cliques obtained from the ECP P of \({\mathcal {Q}}(n)\) are the cliques with vertices associated with each of the n columns, n rows, \(2n-3\) left to right diagonals and \(2n-3\) right to left diagonals. Denoting the vertices of \({\mathcal {Q}}(n)\) by their coordinates (ij) in the corresponding chessboard \({\mathcal {T}}_n\), \(m_{(i,j)}(P) = \left\{ \begin{array}{ll} 3, &{} \hbox {if } (i,j) \in \{ 1, n\}^2;\\ 4, &{} \hbox {otherwise} \end{array}\right. \) and thus \(m_{{\mathcal {Q}}(n)}(P)=4\). Therefore, the equalities 1(d) correspond to the conditions 2(b) in Theorem 2.

  2. 2.

    Consider an induced subgraph \({\mathcal {Q}}(4)\) of \({\mathcal {Q}}(n)\). For instance, consider the subgraph induced by the vertices corresponding to the coordinates \((i,j) \in [4]^2\). Let \(P'\) be the ECP as defined above in the proof of item 1 (for \(n=4\)). It is immediate that \(m_{{\mathcal {Q}}(4)}(P')=4\) and the vector \(X \in [4]^2\) such that \(X_{(i,j)} = \left\{ \begin{array}{rl} 1, &{} \hbox {if } (i,j) \in \{(1,2), (2,4), (3,1), (4,3)\};\\ -1, &{} \hbox {if } (i,j) \in \{(1,3), (2,1), (3,4), (4,2)\};\\ 0, &{} \hbox {otherwise} \end{array}\right. \) fulfills the conditions of item 1. Therefore, \(-m_{{\mathcal {Q}}(4)}(P')\) is the least eigenvalue of \({\mathcal {Q}}(4)\). Since \({\mathcal {Q}}(n)\) admits the ECP P described above in the proof of item 1 and thus \(m_{{\mathcal {Q}}(n)}(P)=4\), applying Corollary 6, it follows that \(-m_{{\mathcal {Q}}(4)}(P')\) is the least eigenvalue of \({\mathcal {Q}}(n)\).\(\square \)

As a consequence of Theorem 7, we have the following result.

Corollary 8

Let \(n \ge 4\) and \(X \in {\mathbb {R}}^{n^2} {\setminus } \{\textbf{0}\}\). Then, \(X \in {\mathcal {E}}_{{\mathcal {Q}}(n)}(-4)\) if and only if the conditions 1(a)–1(d) of Theorem 7 hold.

In what follows, we will see that, for \(n \ge 4\), \(-4\) is an eigenvalue of \({\mathcal {Q}}(n)\) with multiplicity \((n-3)^2\). From Corollary 8, we may conclude that the multiplicity of \(-4\) as an eigenvalue of \({\mathcal {Q}}(n)\) coincides with the corank of the coefficient matrix of the system of \(6n-2\) linear equations 1(a)–1(d). Therefore, to say that the multiplicity of \(-4\) is \((n-3)^2\) is equivalent to say that the rank of the coefficient matrix of the system of 6n linear equations 1(a)–1(d) is \(6n - 9\) (since \(n^2 - 6n + 9 = (n-3)^2\)).

For an easier representation of the vectors, they are displayed over the chessboard. So the \(\ell ^{th}\) coordinate of a vector X is displayed at the entry of the chessboard corresponding to the vertex \(\ell \), i.e., at the entry \((i,j)=(\lceil \frac{\ell }{n}\rceil , \ell +n-n\lceil \frac{\ell }{n}\rceil )\). Then, the \(\ell ^{th}\) coordinate of X can be denoted by \(X_\ell \) or \(X_{(i,j)}\).

Before we continue, we need to introduce the family of vectors

$$\begin{aligned} {\mathcal {F}}_n = \{X_n^{(a,b)} \in {\mathbb {R}}^{n^2} \mid (a,b) \in [n-3]^2 \} \end{aligned}$$

where \(X_n^{(a,b)}\) is the vector defined by

$$\begin{aligned} \big [X_n^{(a,b)}\big ]_{(i,j)} = {\left\{ \begin{array}{ll} \big [X_4\big ]_{(i-a+1,j-b+1)}, &{} \quad \text { if } (i,j)\in A \times B;\\ 0, &{} \quad \text {otherwise,} \end{array}\right. } \end{aligned}$$
(4)

with \(A = \{a,a+1,a+2,a+3\}\), \(B = \{b,b+1,b+2,b+3\}\) and \(X_4\) is the vector presented in Table 1.

Table 1 The vector \(X_4\)

For instance, for \(n=5\), \({\mathcal {F}}_5\) is the family of four vectors depicted in Table 2.

Table 2 The vectors \(X_5^{(1,1)}\), \(X_5^{(1,2)}\), \(X_5^{(2,1)}\) and \(X_5^{(2,2)}\)

Theorem 9

\(-4\) is an eigenvalue of \({\mathcal {Q}}(n)\) with multiplicity \((n-3)^2\), and \({\mathcal {F}}_n\) is a basis for \({\mathcal {E}}_{{\mathcal {Q}}(n)} (-4)\).

Proof

First, note that every element of \({\mathcal {F}}_n\) belongs to \({\mathcal {E}}_{{\mathcal {Q}}(n)} (-4)\). Indeed, if \(X = \left( x_{(i,j)} \right) \in {\mathcal {F}}_n\), then the conditions 1(a)–1(d) of Theorem 7 hold and hence by Corollary 8\(X \in {\mathcal {E}}_{{\mathcal {Q}}(n)} (-4)\).

Second, \({\mathcal {F}}_n\) is linearly independent and so \(\dim {\mathcal {E}}_{{\mathcal {Q}}(n)} (-4) \ge (n-3)^2\). For otherwise, there would be scalars \(\alpha _{1,1}, \ldots , \alpha _{n-3,n-3} \in {\mathbb {R}}\), not all equal to zero, such that

$$\begin{aligned} \alpha _{1,1} X_n^{(1,1)} + \cdots + \alpha _{n-3,n-3} X_n^{(n-3,n-3)} = \textbf{0}. \end{aligned}$$
(5)

Let \((n-3)(a-1)+b\) be the smallest integer such that \(\alpha _{a,b} \ne 0\). Since by (4) \(\big [X_n^{(a,b)}\big ]_{(a,b+1)} = \big [X_4\big ]_{(1,2)}=1\), the entry \((a,b+1)\) of \(\alpha _{a,b}\big [X_n^{(a,b)}\big ]\) is \(\alpha _{a,b}\). Consider any other vector \(\big [X_n^{(a',b')}\big ]\) such that \((n-3)(a'-1)+b'>(n-3)(a-1)+b\) which implies (i) \(a'>a\) or (ii) \(a'=a\) and \(b'>b\). Denoting \(A'=\{a', \dots , a'+3\}\) and \(B'=\{b', \dots , b'+3\},\) taking in to account (4), we may conclude the following.

  1. (i)

    \(a'>a\) implies \((a,b+1) \not \in A' \times B'\) and thus \(\big [X_n^{(a',b')}\big ]_{(a,b+1)} =0\).

  2. (ii)

    For \(a'=a\) and \(b'>b+1\), the conclusion is the same as above. Assuming \(a'=a\) and \(b'=b+1\), it follows that \(\big [X_n^{(a',b')}\big ]_{(a,b+1)}=\big [X_4\big ]_{(1,1)}=0\).

Therefore, the entry \((a,b+1)\) of the left-hand side of (5) is \(\alpha _{a,b} \ne 0\), while the same entry on the right-hand side of (5) is 0, which is a contradiction.

Finally, we show that \(\dim ({\mathcal {E}}_{{\mathcal {Q}}(n)} (-4)) \le (n-3)^2\) by showing that every element of the subspace generated by \({\mathcal {F}}_n\) is completely determined by entries \(x_{(i,j+1)}\) such that \((i,j) \in [n-3]^2\).

Let \(S \subseteq [n]^2\) be the set of indexes \((p,q) \in [n]^2\) such that the entry \(x_{(p,q)}\) of \(X \in {\mathcal {E}}_{{\mathcal {Q}}(n)} (-4)\) is completely determined by the entries \(x_{(i,j+1)}\), with \((i,j) \in [n-3]^2\). Clearly, \([n-3] \times ([n-2] {\setminus } \{ 1 \}) \subseteq S\). Since \(x_{(1,1)} = x_{(n,1)} = 0\), it follows that

$$\begin{aligned} x_{(i,1)}= & {} - \sum _{k=2}^i x_{(i+1-k,k)}, \ \text {for every} 2 \le i \le n-2,\\ x_{(n-1,1)}= & {} - \sum _{k=2}^{n-2} x_{(k,1)} \\= & {} x_{(1,2)} \\{} & {} + x_{(2,2)} + x_{(1,3)} \\{} & {} \vdots \\{} & {} + x_{(n-3,2)} + \cdots + x_{(2,n-3)} + x_{(1,n-2)} \\= & {} \sum _{\begin{array}{c} i,j \ge 1 \\ i+j \le n-2 \end{array}} x_{(i,j+1)} \end{aligned}$$

and then \([n] \times \{ 1 \} \subseteq S\). Additionally, since \(x_{(1,n)} = x_{(n,n)} = 0\), it follows that

$$\begin{aligned}&x_{(i,n-1)} = - \sum _{j=1}^{n-2} x_{(i,j)} - x_{(i,n)}, \ \text {for every} 1 \le i \le n-3, \\&x_{(i+1,n)} = - \sum _{k=1}^{i} x_{(k,n-1-i+k)}, \ \text {for every} 1 \le i \le n-3, \\&x_{(n-1,n)} = - \sum _{i=2}^{n-2} x_{(i,n)}, \quad x_{(n-2,n-1)} = - \sum _{k=1}^{n-3} x_{(k,k+1)} - x_{(n-1,n)}, \\&x_{(n,n-1)} = - x_{(n-1,n)}, \quad x_{(n-1,n-1)} = - \sum _{i=2}^{n-2} x_{(i,n-1)} - x_{n,n-1} \end{aligned}$$

and thus \([n] \times \{ n-1, n \} \subseteq S\). Finally, since for every \(2 \le j \le n-2\)

$$\begin{aligned}&x_{(n,j)} = - \sum _{k=j}^{n-1} x_{(k,n+j-k)}, \\&x_{(n-2,j)} = - \sum _{k=1}^{j-1} x_{(n-2-j+k,k)} - x_{(n-1,j+1)} - x_{(n,j+2)},\\&x_{(n-1,j)} = - \sum _{i=1}^{n-2} x_{(i,j)} - x_{(n,j)}, \end{aligned}$$

consequently \(\{ n-2, n-1, n \} \times ([n-2] {\setminus } \{ 1 \} ) \subseteq S\). \(\square \)

5 Some conclusions and remarks

Consider the graph H and the ECP \(P'\) depicted in Fig. 2. It is already known that \(m_H(P')=2\) and that the vector \(X=[-1,1,0,1,-1]^T\) fulfills the necessary and sufficient conditions 2(a)–2(b) of Theorem 2 and thus its least eigenvalue is \(-m_H(P') = -2\).

The graph H in Fig. 2 is an induced subgraph of the graph \(G_2\) in Fig. 5. By Corollary 6, if \(\mu \) is the least eigenvalue of \(G_2\), then \(\mu \le -m_H(P') = -2\).

Now, consider a graph H with an ECP P. Assume that for some \(k \ge m_{H}(P)\), \(G_k \in {\mathcal {G}}(H)\) admits an ECP \(P_k\) and exists a vector \(X \in \{-1,0,1\}^{|V(G_k)|}\) indexed by the vertices of \(G_k\) fulfilling the necessary and sufficient conditions of Theorem 2 and thus the least eigenvalue of \(G_k\) is \(-k\). Then, choosing the identity as the permutation \(\pi _k\) and defining a vector \(Y \in \{-1, 0, 1\}^{|V(G_{k+1})|}\) indexed by the vertices of \(G_{k+1}\) such that \(Y_{v}= X_{v}\) for every \(v \in V(G_k)\) and \(Y_{v'} = - X_{v}\) for every \(v' \in V(G'_k)\), it is immediate that Y fulfills the necessary and sufficient conditions of Theorem 2 and thus the least eigenvalue of \(G_{k+1}\) is \(-(k+1)\). Fixing X and Y as described above, if \(G_{k+1}\) is obtained from \(G_k\) replacing the identity permutation \(\pi _k\) by a more general permutation \(\pi '_k\) such that

$$\begin{aligned} \forall v \in V(G_k) \qquad \pi '_k(v) = u' \in V(G'_k), \;\; \hbox { if } Y_{u'} = - X_v, \end{aligned}$$
(6)

it follows that the least eigenvalue of \(G_{k+1}\) remains equal to \(-(k+1)\).

Let us consider each of the two cases.

  1. (i)

    When \(\pi _k\) is the identity permutation, we may conclude that \(\sigma (G_{k+1}) = \sigma (G_k) \pm 1\), where \(\sigma (G_k) \pm 1 = \{\lambda \pm 1 \mid \lambda \in \sigma (G_k) \}\) with possible repetitions. Indeed, assuming that \(\lambda \) is an eigenvalue of \(G_k\) and X is an eigenvector associated with \(\lambda \), then

    $$\begin{aligned} A(G_{k+1})\left( \begin{array}{r} X \\ \pm X \\ \end{array}\right)= & {} \left( \begin{array}{cc} A(G_k) &{} I \\ I &{} A(G_k) \\ \end{array}\right) \left( \begin{array}{r} X \\ \pm X \\ \end{array}\right) =(\lambda \pm 1)\left( \begin{array}{r} X\\ \pm X \end{array}\right) , \end{aligned}$$

    where I is the identity matrix of order \(|V(G_k)|\). Therefore, \(\sigma (G_{k+1})=\sigma (G_k) \pm 1\). In particular, considering the graph \(G_2\) as the graph H depicted in Fig. 2, since \(\sigma (G_2) = \{-2, 1-\sqrt{5}, 0, 0, 1+\sqrt{5}\}\), it follows that

    $$\begin{aligned} \sigma (G_3) = \{-3, -\sqrt{5}, -1, -1, \sqrt{5}, -1, 2-\sqrt{5}, 1, 1, 2+\sqrt{5}\}. \end{aligned}$$
  2. (ii)

    When \(\pi _k\) is replaced by a more general permutation \(\pi '_k\), as defined in (6), the equality\(\sigma (G_{k+1}) = \sigma (G_k) \pm 1\) may not be true. For instance, let \(G_3 \in ~{\mathcal {G}}(H)\) be the graph depicted in Fig. 5 which is obtained from \(G_2\) as above described, using the ECP \(P=\{\{12, 13, 35\}, \{24\}, \{34, 35, 45\}, \{36\},\) \(\{15,16,56\}\}\}\) of \(G_2\), the vector \(X^T=(1,-1,0,1,-1,0)\) and the permutation \(\pi '_2=[156423]\). Then, it follows that \(\sigma (G_3) \ne \sigma (G_2) \pm 1\). However, \(-k\) and \(-k-1\) are the least eigenvalues of \(G_k\) and \(G_{k+1}\), respectively, and this property is invariant to the permutations \(\pi _k \in \{\pi '_k \mid \pi '_k \text { is defined by (6)}\}\).

Fig. 5
figure 5

Graph \(G_3\) obtained from \(G_2\) using the vector \(X^T=(1,-1,0,1,-1,0)\) and the permutation \(\pi '_2=[156423]\). The labels of the vertices on the right are the entries of the vector Y obtained from X as above described

In any case, if the least eigenvalue of \(G_k\) for \(k=m_H(P)\) is \(\mu =-m_H(P)\), then, by induction on k, the least eigenvalue of \(G_k\) is \(-k\), for every \(k \ge m_H(P)\).

Finally, it is immediate that if H is an integral graph, i.e., a graph whose eigenvalues are all integers and the family \({\mathcal {G}}(H)\) is produced using the identity permutation, then all the graphs of \({\mathcal {G}}(H)\) are integral graphs.