Abstract
Let be positive integers with , and let denote the generalized pineapple graph which is obtained by joining an independent set of q vertices with k vertices of a complete graph . H. Topcu et al. previously constructed graphs that are cospectral with . In this paper, we determine all graphs that are cospectral with by analyzing the eigenvalues of its adjacency matrix.
MSC:
05C50; 05C75
1. Introduction
Throughout this paper, all graphs are simple and undirected. All concepts used in this paper can be found in [1] and in the articles cited below, unless otherwise specified.
Let G be a graph with vertex set and edge set . The adjacency matrix of G, denoted by , is an matrix with if and 0 otherwise, where n is the order of G (i.e., the number of vertices). The characteristic polynomial of G is , where I denotes the identity matrix. We also denote the all-one matrix by J and the all-zero matrix by O. Since is real symmetric, all roots of are real. Hence we can denote the eigenvalues of by . These eigenvalues form the adjacency spectrum of G. Two graphs G and H are said to be cospectral if they have the same adjacency spectrum, denoted by . A graph is determined by its adjacency spectrum (abbreviated DAS) if no non-isomorphic graph has the same spectrum; otherwise it is said to be non-DAS.
Spectral graph theory plays an important role in the study of complex networks and the design of complex molecular structures. In the classic monograph [2], E. Estrada presented a detailed discussion on the applications of graph Laplacian spectra and eigenvalue distributions to problems including network robustness and community detection. In [3], N. Sukumar systematically investigated spectral graph theory approaches for molecular networks, covering similarity kernels, network measures, random matrix theory, and the application of generative AI in materials discovery. We refer to [4,5,6] for more background on graph spectra.
The complete graph with n vertices, denoted by , is the graph in which every two vertices are adjacent. A graph is multipartite if its vertex set can be partitioned into t(≥2) subsets such that every edge connects a vertex in to a vertex in with . A complete multipartite graph is a multipartite graph in which every vertex in is adjacent to every vertex in for all . A clique is a vertex set in which any two vertices are adjacent, while its complement is an independent set: a set of vertices with no edges between any two of them.
The generalized pineapple graph is obtained by joining an independent set of q vertices to k vertices of a complete graph (see Figure 1). In an earlier paper [7], H. Topcu et al. constructed graphs that are cospectral with for every and several values of such that these graphs are non-isomorphic to . They also proved that is DAS when , , or in the same work. Recently, H. Topcu et al. [8] characterized the pairs for which the pineapple graph is determined by its adjacency spectrum among connected graphs. Generalizing their results to the full generalized case will advance the development of spectral graph theory.
Figure 1.
The generalized pineapple graphs and .
In this paper, we shall determine all cospectral graphs with the generalized pineapple graph , where is a positive integer. Recall that the complete split graph is constructed from the complete graph by attaching an independent set of p vertices, equivalently, coincides with the complete multipartite graph on vertices. Observe that and are complete split graphs. Hence it suffices to consider the cases and . We will prove that has 0 and as eigenvalues with multiplicities and , respectively, and exactly three eigenvalues different from and 0 (see Lemma 5). Moreover, two of them are positive and the other one is less than . Let be the set of graphs having at most three eigenvalues different from and 0. Haemers determined in [9]. Using this result, we shall obtain the spectral characterization of the generalized pineapple graph . In [8], the authors classified all graphs as cospectral with . Following a similar strategy, we characterize all non-isomorphic graphs as cospectral with , which generalizes the conclusions of Topcu et al. to the fully generalized setting.
2. Quotient Graph and Mixed Extensions
In this section, we shall briefly recall the quotient graph associated with an equitable partition and mixed extensions of graphs—two standard constructions for modifying the size of a graph. For further details, we refer the reader to [4,10,11].
Let G be a graph with vertex set , and let be a partition of . A partition is equitable if every vertex in has the same number of neighbors in for all . For such a partition , denotes the quotient graph of G modulo , and its quotient matrix is the matrix where the -th entry equals the number of neighbors of any fixed vertex in within .
Lemma 1
([4]). Let π be an equitable partition of a graph G. Then the characteristic polynomial of divides that of .
The characteristic polynomial of the complete split graph is given as follows.
Lemma 2
([7]). The characteristic polynomial of is
Let G be a graph with vertex set and let be pairwise disjoint nonempty finite sets. Define a graph H with vertex set as follows: for any and with , u is adjacent to v in H if and only if i is adjacent to j in G, and for each , all vertices of are either mutually adjacent or mutually nonadjacent. Such a graph H is called a mixed extension of G. A mixed extension of an n-vertex graph is encoded by an n-tuple of nonzero integers, where indicates that is a clique of order , and indicates that is an independent set of order [9]. Accordingly, the generalized pineapple graph admits the representation as a mixed extension of of type . We refer the reader to [9] for further details on mixed extensions.
In [9], Haemers characterized the class of graphs without isolated vertices having exactly three eigenvalues distinct from and 0. These results are summarized in the following two lemmas.
Lemma 3
([9]). Suppose has no isolated vertices. If H is disconnected and has exactly three eigenvalues distinct from −1 and 0, then H is isomorphic to one of the graphs listed below:
- (1)
- with .
- (2)
- with .
- (3)
- with , .
Lemma 4
([9]). Suppose has no isolated vertices. If H is connected and has exactly three eigenvalues distinct from −1 and 0, then H is isomorphic to one of the following:
- (1)
- with ;
- (2)
- H is a mixed extension of of type with , ;
- (3)
- H has exactly two positive eigenvalues and exactly one eigenvalue less than .
Simple determinant calculations yield the characteristic polynomial of as stated below.
Lemma 5.
Let be positive integers with . Then the characteristic polynomial of is given by
Consequently, has exactly three eigenvalues different from 0 and ; among these, two are positive and the remaining one is less than .
Proof.
It is easy to see that the adjacency matrix of is
The given partition of is equitable with quotient matrix
Then the characteristic polynomial of Q is
Lemma 1 implies that is a divisor of . It is clear that and . Hence .
Observe that
Hence has roots 0 and with multiplicities and , respectively. Therefore the characteristic polynomial of is given by
□
Haemers fully characterized the graph class in [9] (excluding isolated vertices) via mixed extensions. Let denote the family of connected graphs possessing exactly two positive eigenvalues, one eigenvalue less than , and all remaining eigenvalues equal to either or 0. Clearly, . Note that the generalized pineapple graph belongs to , so characterizing facilitates the classification of all graphs cospectral with . The following lemma, due to Haemers [9], determines the class .
Lemma 6
([9]). A graph H belongs to if and only if H is isomorphic to one of the following graphs:
- (1)
- A mixed extension of of type , , or with and .
- (2)
- A mixed extension of of type , or with .
- (3)
- A mixed extension of of type with and equals , , , , , , , , , or .
- (4)
- A mixed extension of of type with equal to , , , , , , , or .
- (5)
- A mixed extension of of type with .
Since possesses exactly two positive eigenvalues, any graph G with the same adjacency spectrum as can have at most two components that contain at least one edge (briefly, main components). This allows us to characterize the structure of G via Lemmas 3, 4 and 6. In the subsequent section, we establish our main theorems using the corresponding characteristic polynomials. For the graphs in Lemma 6, their characteristic polynomials can be derived from those of the quotient matrices associated with the equitable partitions , as all remaining eigenvalues are either 0 or .
3. Graphs Cospectral with
Let with , denote the generalized pineapple graph introduced in Section 2, and let G be cospectral with . Then G has at most two components containing at least one edge (called main components for short). We first treat the case where G has two main components together with some isolated vertices.
Theorem 1.
Let be a generalized pineapple graph with , and suppose is a graph containing isolated vertices together with two nontrivial components and . Then G is cospectral with if and only if , where a is a non-negative integer solution to the cubic equation
, satisfying , and divides Moreover,
Proof.
By Lemma 5, , and so G, hence has exactly three eigenvalues different from and 0. By Lemma 3, is either of the form or for some and .
Case (1). is of the form for some .
It is easy to see that the characteristic polynomial of is
Put . Then and since . Hence . By comparing the coefficients and degrees of the polynomials (1) and (2), we have
From the first two equations of (3), we obtain . Substitute into the last two equations of (3) and we have
Substitute the first equation into the second equation of (4) to eliminate , we obtain . It is impossible since , and .
Case (2). is of the form for some and .
The characteristic polynomial is given by a product of coprime polynomials as follows:
If , then
has only two roots different from 0 and , thus G cannot be cospectral with . Hence, if is cospectral with , then and by comparing the coefficients and degrees of the polynomials (1) and (5), we obtain
i.e.,
By calculating the system of Equation (7), we obtain that
and a is a non-negative integer solution to the cubic equation
. □
Example 1.
Every case in Theorem 1 is realizable; we present the corresponding table for below.
| k | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 |
This example illustrates that for k = 1, Theorem 4.1 from [8] is a special case of Theorem 1.
Corollary 1.
Let be an odd integer. Set , , and . Then is non-DAS.
Proof.
Set , , and as positive integers and . By Theorem 1, it is easy to see that G is cospectral with , i.e., . Hence is non-DAS. □
We next consider graphs cospectral with consisting of one main component and several isolated vertices.
Theorem 2.
Let be a generalized pineapple graph with and , and let be a graph consisting of a main component and isolated vertices. Then G is cospectral with if and only if G is one of the following graphs for some .
- (1)
- is a mixed extension of of type , whereand .
- (2)
- is a mixed extension of of type , whereand .
- (3)
- is a mixed extension of of type , whereand .
- (4)
- is a mixed extension of of type , where , and . And, satisfy
- (5)
- is a mixed extension of of type , whereand . And, satisfy
- (6)
- is a mixed extension of of type , whereand . Moreover, the parameters satisfy
- (7)
- is a mixed extension of of type , where
- (i)
- , and
- (ii)
- , and
- (iii)
- , and .
- (8)
- is a mixed extension of of type , whereand .
Proof.
Clearly, . We thus discuss all cases given in Lemma 6. Let . Using Lemma 1, we can obtain the characteristic polynomials of the mixed extensions of and , and we analyze them separately in the cases below.
Case 1: We first consider the mixed extensions of .
(a) Let be a mixed extension of of type with , , . Then the characteristic polynomial of factorizes into a product of coprime polynomials, given below:
Hence, by (1) and (8), we obtain that G is cospectral with if and only if
i.e.,
By solving the system of equations given in (10), we find that
(b) Let be a mixed extension of of type with , , . Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, by (1) and (11), we conclude that G is cospectral with if and only if
i.e.,
Note that l and n are symmetric. Solving the system (13), we deduce that
(c) Let be a mixed extension of of type with , , . Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, by (1) and (14), we obtain that G is cospectral with if and only if
i.e.,
Solving the system (16), we obtain . Consequently, .
(d) Let be a mixed extension of of type with , , . Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, by (1) and (17), we conclude that G is cospectral with if and only if
i.e.,
Since l and n are symmetric, solving the system (19), we deduce that
Case 2: Assume is a mixed extension of .
(a) Let be a mixed extension of of type with . Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, by (1) and (20), we obtain that G is cospectral with if and only if
i.e.,
Solving the system (22), we deduce that
(b) Let be a mixed extension of of type with . Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, by (1) and (23), we conclude that G is cospectral with if and only if
i.e.,
Note that m and n are symmetric. Solving the system (25), we obtain
where for some integer Moreover, since .
(c) Let be a mixed extension of of type with . Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, by (1) and (26), we conclude that G is cospectral with if and only if
i.e.,
Solving the system (28), we obtain
Moreover, the parameters satisfy
(d) Let be a mixed extension of of type with and
For each , let denote a mixed extension of of type with as listed below:
Then the characteristic polynomial of factorizes into a product of coprime polynomials as follows:
Hence, for each , is cospectral with if and only if
(1) Then is cospectral with if and only if
This implies that ; hence, we have either , or , . In both cases, no integer solution exists for n. Consequently, is not cospectral with . By an analogous argument, neither nor is cospectral with for any positive integers n, p, k, q with .
(2) Then is cospectral with if and only if
Note that . The above equation admits exactly two solutions:
Hence is cospectral with if and only if either , where is a mixed extension of of type , or , where is a mixed extension of of type . By a similar argument, we analyze the remaining graphs and obtain the results stated in Theorem 2(7), which are summarized in the table below.
| is a mixed extension of of type | ||
| No | ||
| No | ||
| No | ||
| No |
(e) Let be a mixed extension of of type with , where
Let . It is straightforward to verify that for any and with . Consequently, G is not cospectral with .
Case 3: Finally, we consider the mixed extensions of . Let be a mixed extension of of type with . Then the characteristic polynomial of factors into a product of coprime polynomials as follows:
Hence, by (1) and (29), we conclude that G is cospectral with if and only if
i.e.,
Note that n and l are symmetric. Solving the system (31), we deduce that
Let . Then we obtain that
□
Remark 1.
Consider a generalized pineapple graph with and . Theorems 1 and 2 characterize all graphs that are cospectral with . Consequently, whether is DAS or non-DAS is fully determined.
Example 2.
For , , we consider the range . There are 589 generalized pineapple graphs that are DAS, and the remaining 11 such graphs are non-DAS:
- (1)
- , where is a mixed extension of of type
- (2)
- , where is a mixed extension of of type
- (3)
- , where is a mixed extension of of type
- (4)
- , where is a mixed extension of of type .
- (5)
- , where is a mixed extension of of type
- (6)
- , where is a mixed extension of of type
- (7)
- , where is a mixed extension of of type
- (8)
- , where is a mixed extension of of type
- (9)
- , where is a mixed extension of of type
- (10)
- , where is a mixed extension of of type
- (11)
- , where is a mixed extension of of type .
Example 3.
For , we consider the range . There are 884 generalized pineapple graphs that are DAS, and the remaining 16 such graphs are non-DAS:
- (1)
- (2)
- , where is a mixed extension of of type
- (3)
- , where is a mixed extension of of type
- (4)
- , where is a mixed extension of of type
- (5)
- , where is a mixed extension of of type
- (6)
- , where is a mixed extension of of type
- (7)
- , where is a mixed extension of of type
- (8)
- , where is a mixed extension of of type
- (9)
- , where is a mixed extension of of type
- (10)
- , where is a mixed extension of of type
- (11)
- , where is a mixed extension of of type
- (12)
- , where is a mixed extension of of type
- (13)
- , where is a mixed extension of of type
- (14)
- , where is a mixed extension of of type
- (15)
- , where is a mixed extension of of type
- (16)
- , where is a mixed extension of of type .
Remark 2.
Every case in Theorems 1 and 2 is realizable. For illustration, we present the following tables for k ≦ 5.
| k | of type | |
| 1 | of type | |
| 2 | of type | |
| 3 | of type | |
| 4 | of type | |
| 5 | of type |
| k | of type | of type |
| 1 | of type | of type |
| 2 | of type | of type |
| 3 | of type | of type |
| 4 | of type | of type |
| 5 | of type | of type |
| k | of type | of type |
| 1 | of type | of type |
| 2 | − | of type |
| 3 | − | of type |
| 4 | − | of type |
| 5 | − | of type |
| k | of type | of type |
| 1 | − | of type |
| 2 | of type | of type |
| 3 | of type | of type |
| 4 | − | of type |
| 5 | − | of type |
4. Conclusions
At the beginning of the paper, we introduce the concepts of equitable partitions and mixed extensions of graphs, and present some related results. First, using equitable partitions, we compute the characteristic polynomial of each graph mentioned in Lemma 6. In particular, we obtain the characteristic polynomial of the generalized pineapple graph . From these characteristic polynomials, it can be seen that has exactly three eigenvalues that are neither 0 nor , and exactly two of these three eigenvalues are positive. From this, it follows that any graph cospectral with contains at most two main components. Combining Lemmas 3, 4 and 6, we derive all feasible structural forms of graphs cospectral with . We then conduct a case-by-case analysis on these cospectral configurations, and fully classify all graph families cospectral with the generalized pineapple graph . This yields a complete characterization of its cospectral mates and verifies that is non-DAS.
Author Contributions
Writing—original draft, B.L. and Q.J.; Writing—review & editing, Q.J.; Supervision, Q.J. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by National Natural Science Foundation of China (Nos. 12231009, 12071209).
Data Availability Statement
No new data were created or analyzed in this study.
Acknowledgments
We would like to thank the referee for reading the manuscript carefully and providing valuable comments and suggestions.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Bondy, J.A.; Murty, U.S.R. Graph Theory; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Estrada, E. The Structure of Complex Networks: Theory and Applications; Oxford University Press: Oxford, UK, 2011. [Google Scholar]
- Sukumar, N. Navigating Molecular Networks; SpringerBriefs in Materials; Springer Nature: Cham, Switzerland, 2024. [Google Scholar]
- Brouwer, A.E.; Haemers, W.H. Spectra of Graphs; Springer Universitext: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
- Cvetkovic, D.; Rowlinson, P.; Simic, S. An Introduction to the Theory of Graph Spectra; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
- Godsil, C.D.; McKay, B.D. Constructing cospectral graphs. Aequationes Math. 1982, 25, 257–268. [Google Scholar] [CrossRef] [Scilit]
- Topcu, H.; Sorgun, S.; Haemers, W.H. On the spectral characterization of pineapple graphs. Linear Algebra Its Appl. 2016, 507, 267–273. [Google Scholar] [CrossRef] [Scilit]
- Topcu, H.; Sorgun, S.; Haemers, W.H. The graphs cospectral with the pineapple graph. Discret. Appl. Math. 2019, 269, 52–59. [Google Scholar] [CrossRef] [Scilit]
- Haemers, W.H. Spectral characterization of mixed extensions of small graphs. Discret. Math. 2019, 342, 2760–2764. [Google Scholar] [CrossRef] [Scilit]
- Godsil, C.D. Algebraic Combinatorics; Springer: New York, NY, USA, 1993. [Google Scholar]
- Godsil, C.D.; Royle, G. Algebraic Graph Theory; Chapman Hall: London, UK, 2001. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
