On the spectral characterization of mixed extensions of $P_3$

A mixed extension of a graph $G$ is a graph $H$ obtained from $G$ by replacing each vertex of $G$ by a clique or a coclique, whilst two vertices in $H$ corresponding to distinct vertices $x$ and $y$ of $G$ are adjacent whenever $x$ and $y$ are adjacent in $G$. If $G$ is the path $P_3$, then $H$ has at most three adjacency eigenvalues unequal to $0$ and $-1$. Recently, the first author classified the graphs with the mentioned eigenvalue property. Using this classification we investigate mixed extension of $P_3$ on being determined by the adjacency spectrum. We present several cospectral families, and with the help of a computer we find all graphs on at most $25$ vertices that are cospectral with a mixed extension of $P_3$.


Introduction
Characterizations of graphs by means of the spectrum of the adjacency matrix is a wellstudied subject. Although it is conjectured that almost all graphs are determined by the spectrum of the adjacency matrix, there are still relatively few graphs known to be determined by its spectrum. The reason is that in general this property is hard to prove. Some of these proofs are based on the classification of graphs with certain spectral properties, such as classifications in terms of the smallest eigenvalue. Recently the first author classified the graphs with all but at most three eigenvalues equal to 0 or −1; see [4]. Here this classification is applied to mixed extensions of the path P 3 (see next section), which have the mentioned spectral property. We give the characteristic polynomial of all graphs in the classification, and completely determine the mixed extensions of P 3 which are determined by the spectrum on at most 25 vertices. Also we present several infinite families of cospectral graphs with all but three eigenvalues equal to 0 or −1.

Mixed extensions of P 3
Let G be a graph with vertex set V (G) = {1, . . . , m} and let V 1 , . . . , V m be mutually disjoint nonempty finite sets. A graph H with vertex set V (H) = V 1 ∪ . . . ∪V m is defined as follows. For each i ∈ {1, . . . , m}, all vertices of V i are either mutually adjacent (form a clique), or mutually nonadjacent (form a coclique). For any u ∈ V i and v ∈ V j (i = j) {u, v} in an edge in H if and only if {i, j} is an edge in G. The graph H is called a mixed extension of G. A mixed extension is represented by an m-tuple (t 1 , . . . , t m ) of nonzero integers, where t i > 0 indicates that V i is a clique of order t i and t i < 0 means that V i is a coclique of order −t i . We refer to [4] for basic results on mixed extensions, and to [1] or [3] for graph spectra.
Suppose H is a mixed extension of the path P 3 of type (t 1 , t 2 , t 3 ). Then the adjacency matrix of H admits the following structure. (As usual, J is an all-ones matrix, J n is the n × n all-ones matrix, and I n is the identity matrix of order n.) The given partition of A is equitable, therefore A has two kinds of eigenvalues: the ones that have eigenvectors in the span V of the characteristic vectors of the partition, and those whose eigenvectors ore orthogonal to V . The first kind coincide with the eigenvalues of the quotient matrix The second kind of eigenvalues of H remain eigenvalues if we subtract an all-one block from each nonzero block of A. So these eigenvalues are also eigenvalues of which are clearly all equal to 0 or −1. So, if n = |t 1 | + |t 2 | + |t 3 | is the order of H, and Indeed, the exponent of (x + 1) equals b, because the coefficient of x n−1 in p(x) equals trace(A) = 0. Note that d = − det(Q) ≥ 0, and det(Q) = 0 if and only if ε 1 = ε 3 = 0 that is, both end vertices of P 3 are replaced by a coclique. If this is the case then we call it an improper mixed extension of P 3 , because it is in fact a mixed extension of P 2 . If det(Q) = 0, then the mixed extension is proper.
Proposition 2.1. A proper mixed extension of the path P 3 has exactly two positive eigenvalues and one eigenvalue smaller than −1.
Proof. The quotient matrix Q has at least one positive eigenvalue, and det(Q) < 0 gives that Q (and A) has exactly two positive eigenvalues. It is well-known that a graph with smallest adjacency eigenvalue at least −1 is the disjoint union of complete graphs. Therefore the smallest eigenvalue of A (and Q) is less than −1.

Spectral characterizations
Some known results on spectral characterizations of graphs deal with special cases of mixed extensions of P 3 . This includes the pineapple graphs (type (p, 1, −q), p, q > 0), and the complete graphs from which the edges of a complete bipartite subgraph are deleted (type (p, q, r), p, q, r > 0). The latter graphs are determined by their spectrum for all p, q, r > 0; see [2]. For the pineapple graphs it is known for which p and q the graphs are determined by its spectrum. For the precise conditions on p and q we refer to [6]. It follows that among the connected graphs the pineapple graph is determined by its spectrum. An improper mixed extension of P 3 is either a complete bipartite graph K p,q (p ≥ 2, q ≥ 1), or a complete split graph CS p,q (p, q ≥ 2), which is a complete graph K p+q from which the edges of a complete subgraph K q are deleted. For these classes of graphs the spectral characterization is straightforward and known. The complete split graph CS p,q is determined by its spectrum for all p, q ≥ 2. The complete bipartite graph K p,q is not determined by its adjacency spectrum if and only if pq has a divisor r strictly between p 6r − 4 30r + 12 (7, 3, −r, 2) 9 5r + 1 37r + 9 (3, 4, −r, 4) 8 8r − 9 40r + 18 (3, 6, −r, 3) 9 9r − 6 45r + 16 (4, 6, −r, 2) * 9 8r + 1 40r + 9 (5, 4, −r, 2) * 9 6r + 1 34r + 8 (2, 2, 2, 7) 9 1 65 (2, 2, 6, 3) 9 9 73 (2, 2, 3, 4) 7 5 51 (2, 3, 2, 5) and q. Then K r,pq/r extended with p + q − r − pq/r isolated vertices is cospectral with K p,q . From now on we restrict to proper mixed extensions of P 3 . We define G to be the set of graphs with all but at most three adjacency eigenvalues equal to −1 or 0. Note that a graph G in G remains in G if isolated vertices are added or deleted. Therefore, for the classification, we may restrict to the set of graphs in G with no isolated vertices. By G ′′ we denote the class of graphs in G with no isolated vertices, with two positive eigenvalues and with one eigenvalue less than −1. By Proposition 2.1 we know that a proper mixed extension of P 3 is in G ′′ . The characterization of graphs in G, mentioned in the introduction, when restricted to G ′′ , is given by the following two theorems.
Theorem 3.1. A disconnected graph H belongs to G ′′ , if and only if H is one of the following. (i) K p + K q,r with p, q, r ≥ 2, (ii) K p + CS q,r with p, q ≥ 2, q ≥ 1.
The characteristic polynomial p(x) of a graph in G ′′ with n vertices can be written as: (note that the multiplicity of the eigenvalue −1 equals b, because trace(A) = 0). So the nonzero part of the spectrum of a graph in G ′′ is determined by the coefficients b, c and d. Table 1 gives these coefficients for each type of the above classification. If two graphs in the classification have the same b,c and d, then the nonzero part of the spectrum is the same. We will call such a pair pseudo-cospectral. If two pseudo-cospectral graphs have different order, we can extend the smaller graph (or both graphs) with some isolated vertices, so that the two graphs become cospectral. Therefore Table 1 gives all information needed to decide which proper mixed extensions of P 3 are determined by their spectrum. Nevertheless, it is far too complicated to give a general result. Therefore we present some special cases.

Theorem 3.3. [2]
Suppose H is a mixed extension of P 3 of order n and type (p, q, r) with p, q, r ≥ 1. Then H is determined by the spectrum of its adjacency matrix.
Proof. From Table 1 we see that for this case the coefficient b equals p + q + r − 3 = n − 3. For every graph H ′ of order n ′ pseudo-cospectral with H, which belongs to one of the other types, we have b < n ′ − 3. So H ′ has more vertices than H, and we cannot obtain a graph cospectral with H by adding isolated vertices to H ′ . If H ′ is a mixed extension of P 3 of type (p ′ , q ′ , r ′ ) with p ′ , q ′ , r ′ ≥ 1, and H ′ is cospectral with H, then H and H ′ have the coefficients b, c an d, which implies p = p ′ , q = q ′ , and r = r ′ .
The following results follow straightforwardly from Table 1.
Proposition 3.4. The following types of mixed extensions of P 3 are pseudo-cospectral with a non-isomorphic graph in G ′′ .
Notice that this proposition does not give any graph which is cospectral and nonisomorphic with a mixed extension of P 3 , because in all three cases the second graph has more vertices than the first one. For the pineapple graph K q p , which is a mixed extension of P 3 of type (p − 1, 1, −q), we find (see [5]).
Proposition 3.5. The pineapple graph K p 2 2p is cospectral with the mixed extension of P 3 of type (p, −p, p) extended with p(p − 1) isolated vertices.
See [6] for more examples of graphs non-isomorphic but cospectral with K q p . As remarked before, there exists no connected example. However, there do exist connected non-isomorphic cospectral mixed extensions of P 3 .
Note that there are infinitely many values of p and q for which the above fraction is integral. For example if p = 1 or p = q − 1.

Enumeration
Using Table 1, we generated by computer (using Maple) a list of all non-isomorphic graphs in G ′′ on at most 25 vertices. The list contains almost 10000 graphs. We ordered the graphs alphabetically with respect to the coefficients b, c, d. Then the pseudo-cospectral graphs in G ′′ become consecutive items in the table with the same b, c, d. Since the list is very long we only consider the mixed extensions of P 3 that have at least one non-isomorphic pseudocospectral mate in the list. By use of the shortened list we found the pseudo-cospectral examples of Propositions 3.4 and 3.6. Next we deleted the cases given in Proposition 3.4, 3.5 and 3.4 from the list. The final list is given in Table 2. Thus this table together with Propositions 3.4 to 3.6 give all mixed extensions of P 3 of order n ≤ 25 for which there exist at least one pseudo-cospectral graph in G ′′ of order at most 25. Since Proposition 3.4 gives no graphs cospectral with a mixed extension of P 3 , we can conclude the following: Theorem 4.1. Suppose H is a proper mixed extension of P 3 of order n ≤ 25. Then H is determined by the spectrum of the adjacency matrix if and only if H is not one of the graphs given in Propositions 3.5 or 3.6, and every graph in Table 2 pseudo-cospectral with H has more vertices than H.