On a version of the spectral excess theorem

Given a regular (connected) graph $\Gamma=(X,E)$ with adjacency matrix $A$, $d+1$ distinct eigenvalues, and diameter $D$, we give a characterization of when its distance matrix $A_D$ is a polynomial in $A$, in terms of the adjacency spectrum of $\Gamma$ and the arithmetic (or harmonic) mean of the numbers of vertices at distance $\le D-1$ of every vertex. The same results is proved for any graph by using its Laplacian matrix $L$ and corresponding spectrum. When $D=d$ we reobtain the spectral excess theorem characterizing distance-regular graphs.

Given two symmetric square matrices M, N ∈ Mat n×n (R), let sum(M ) denote the sum of all entries of M , so that tr(M N ) = sum(M • N ), where '•' stands for the Hadamard (or entrywise) product. The predistance polynomials p 0 , p 1 , . . . , p d of Γ, with deg(p i ) = i for i = 0, . . . , d, introduced by the first author and Garriga [11], are a sequence of orthogonal polynomials with respect to the scalar product normalized in such a way that p i 2 A = p i (λ 0 ). For instance, since the two first predistance polynomials are p 0 (x) = 1 and p 1 (x) = λ 0 k x, with k = 1 n x∈X k(x) being the average degree of Γ, see also Lemma 1.1. (It is known that k ≤ λ 0 with equality if and only if Γ is regular, see for instance Brouwer and Haemers [2].) Moreover, the value of the highest degree polynomial p d at λ 0 can be computed from sp Γ as where φ i = j =i (λ i − λ j ), i = 0, . . . , d (see [11]). The predistance matrices P 0 , P 1 , . . . , P d are then defined by P i = p i (A) for i = 0, 1, . . . , d. By [3,Prop. 2.2], there exist numbers α i , β i , and γ i such that where P = P 1 , P −1 = P d+1 = 0, γ 1 = 1, and α 0 = 0. Also, it can be shown that the polynomial is a scalar multiple of the minimal polynomial of A. Hence, p d+1 (A) = 0, and the distinct eigenvalues of Γ are precisely the zeros of p d+1 .
The above names come from the fact that, if Γ is a distance-regular graph, then the p i 's and P i 's correspond to the well-known distance polynomials and distance matrices A i , respectively. In fact, a known characterization states that Γ is distance-regular if and only if such polynomials satisfy p i (A) = A i for every i = 1, . . . , D; see, for instance, [7]. Moreover, in this case, D = d. If we do not impose that the degree of each polynomial coincide with its subindex, then it can be D < d and the graph is called distance-polynomial, a concept introduced by Weichsel [13].
In fact, if D = d, the first author, Garriga, and Yebra [10] proved the following. From the predistance polynomials, we also consider their sums q i = p 0 + · · · + p i for i = 0, . . . , d, which satisfy 1 = q 0 (λ 0 ) < q 1 (λ 0 ) < · · · < q d (λ 0 ) = |X|, with q d = H being the Hoffman polynomial that characterizes the regularity of Γ by the equality H(A) = J, the all-1 matrix (see Hoffman [12]). Notice that q i (λ 0 ) = q i (λ 0 ) 2 A for i = 0, . . . , d. We also recall that the Laplacian matrix of Γ is the matrix In particular, since Γ is connected, m 0 = 1, and the eigenvalue 0 has eigenvector j j j, the all-1 vector. As in the case of the adjacency spectrum, we can define the Laplacian predistance polynomials r 0 , r 1 , . . . , r d as the sequence of orthogonal polynomials with respect to the scalar product normalized in such a way that r i 2 L = r i (0). The following result gives the first two Laplacian predistance polynomials.
Proof. We only need to prove (ii). By using the method of Gram-Schmidt, we first find a polynomial t(x) orthogonal to r 0 = 1. That is, where α is a constant to be determined by the normalization condition . Moreover, Also, as in the case of the predistance polynomials p i 's, we have www.ejgta.org On the spectral excess theorem | M. A. Fiol and S. Penjić [3]). The analogue of Proposition 1.1, for not necessarily regular graphs, was proved by Van Dam and the first author in [5]. Proposition 1.2. A graph Γ with Laplacian matrix L, d + 1 distinct Laplacian eigenvalues, and diameter D is distance-regular if and only if D = d and its highest degree Laplacian predistance polynomial satisfies r d (L) = A d .
In fact, the regularity of Γ is already implied by the equation r 1 (L) = A, as shown in the following lemma. Proof. From the Cauchy-Schwartz inequality, with equality if and only if Γ is k-regular. In this case, Lemma 1.
and, by equating coefficients, we get In this context, we also consider the sum polynomials s i = r 0 + · · · + r i for i = 0, . . . , d, with H L = s d being a Hoffman-like polynomial satisfying H(L) = J (independently of whether Γ is regular or not). For more details, see [5].
In our results we use the following simple result. (ii) For any Γ, we have y∈X p(L) xy = p(0).

Proof. (i)
Since Γ is k-regular, (k, j j j) is an eigenpair of A and, hence, p(A)j j j = p(k)j j j. Then, the result follows by considering the x th component of both vectors. Case (ii) is proved in the same way by considering that (0, j j j) is an eigenpair of L.

A version of the spectral excess theorem
The spectral excess theorem, due to Fiol and Garriga [11], states that a regular (connected) graph Γ = (X, E) is distance-regular if and only if its spectral excess (a number which can be computed from the spectrum of Γ) equals its average excess k d (the mean of the numbers of vertices at maximum distance from every vertex). More precisely, the spectral excess is the value of p d (λ 0 ) given in (2), and k d = 1 |X| x∈X k d (x). Then, the theorem reads as follows: Theorem 2.1 (The spectral excess theorem). A connected regular graph on n vertices, with adjacency matrix A and d + 1 distinct eigenvalues, is distance-regular if and only if For short proofs, see Van Dam [4], and Fiol, Gago, Garriga [9]. In this section we find a possible solution to the problem of deciding whether, from the adjacency spectrum of a (regular) graph Γ = (X, E) and the harmonic (or arithmetic) mean of the numbers (|X| − |Γ D (x)|) x∈X , we can decide that A D is a polynomial in A. To be more precise, we provide a characterization of when A D ∈ span{p 0 (A), . . . , p d (A)}, where the p i s are the predistance polynomials.
Before proving the main result, note that, for any x ∈ X and any matrix indexed by the vertices of Γ, C ∈ Mat X (R), the Cauchy-Schwartz inequality yields That is, and equality holds if and only if all the values of C xy are the same for all y ∈ Γ D (x).
Theorem 2.2. Let Γ = (X, E) be a connected k-regular graph, with adjacency matrix A having d + 1 distinct eigenvalues, diameter D, and predistance polynomials {p i } d i=0 . Then, with equality if and only if A D = d i=D p i (A).

Proof. We just adjust the proof of [4, Lemma 1], together with Lemma 1.3 and (4). Recalling that
(notice that, for the last equality, we used Lemma 1.3(i)), and this yields , the inequality follows. If equality holds, then for each x ∈ X the values of q D−1 (A) xy are the same, say α, for all y ∈ Γ D (x). Moreover, since A is symmetric, q D−1 (A) xy = q D−1 (A) yx for any x ∈ X and y ∈ Γ D (x), so that q D−1 (A) xy = α for any x, y ∈ X at distance less than D. Also, by Lemma where we have used (1). Then, α = 1 and q D−1 (A) xy = 1 for each pair of vertices x and y at distance less than D − 1.
Conversely, assume that d i=D p i (A) = A D . Then, A D j j j = d i=D p i (k)j j j, and with |Γ D (x)| = d i=D p i (k), the equality follows. As a simple consequence, notice that, if Γ is a k-regular graph of diameter 2, then |X| − |Γ 2 (x)| = 1 + k for any x ∈ X. Besides, q 1 (k) = p 0 (k) + p 1 (k) = 1 + k. Thus, equality in Theorem 2.2 holds, and Γ is distance polynomial, as already proved by Weichel in [13]. Another consequence of Theorem 2.2 is the following corollary.
(iv) The graph Γ is distance-regular if and only if D = d and or, alternatively, where Proof. (i) Let a 1 , a 2 , . . . , a n be real numbers. Recall that the numbers AM = a 1 + a 2 + · · · + a n n and HM = n 1 a 1 + 1 a 2 + · · · + 1 an are the arithmetic and harmonic mean for the numbers a 1 , a 2 , . . . , a n , respectively, and we have AM ≥ HM . Equality occurs if and only if a 1 = a 2 = · · · = a n . Now, the result of (i) follows from Theorem 2.2. The proofs of (ii) and (iii) are immediate from (i), or from Theorem 2.2. For instance, under the hypothesis of (ii), there exist constants c 0 , . . . , c d such that A D = d i=0 c i A i . Thus, as Γ has the k-eigenvector j j j, we have that |Γ D (x)| = (A D j j j) x = d i=0 c i k i for every x ∈ X (a constant), and (i) gives the result. The results in (iv) correspond to different versions of the spectral excess theorem given in [4,7] and [11], respectively. Thus, (6) is a consequence of Theorem 2.2 and Proposition 1.1, whereas (7) follows from Theorem 2.2 and (i). In these two cases, we also used |X| = n and (2).

The Laplacian approach
with equality if and only if A D = d i=D r i (L). Moreover, in this case, if D = 2, Γ is regular.
Proof. The proof follows the same line of reasoning as in Theorem 2.2 with the polynomial s D−1 instead of q D−1 . Thus, we have: and this yields |X| If equality holds, then for each x the values of s D−1 (L) xy are the same, say α, for all y ∈ Γ D (x). Moreover, since L is symmetric, s D−1 (L) xy = s D−1 (L) yx for any x and y ∈ Γ D (x). Also, by Conversely, assume that d i=D r i (L) = A D . Then, A D j j j = d i=D r i (0)j j j, and with |Γ D (x)| = d i=D r i (k), and the equality follows. From this theorem, we obtain the analogous results of Corollary 2.1(i)-(iv). In particular, the analogue of (iv) yields the following characterization of distance-regularity for a (not necessarily regular) graph.