Let W(n;q,m1,m2) be the unicyclic graph with n vertices obtained by attaching two paths of lengths m1 and m2 at two adjacent vertices of cycle Cq. Let U(n;q,m1,m2,…,ms) be the unicyclic graph with n vertices obtained by attaching s paths of lengths m1,m2,…,ms at the same vertex of cycle Cq. In this paper, we prove that W(n;q,m1,m2) and U(n;q,m1,m2,…,ms) are determined by their Laplacian spectra when q is even.

1. Introduction

Let G be a simple, undirected graph with n vertices. Let A be the adjacency matrix of G and let D be the diagonal matrix of vertex degrees of G. The matrices L=D-A and Q=D+A are called the Laplacian matrix and signless Laplacian matrix of G, respectively. The multiset of eigenvalues of A and L are called the A-spectrum and L-spectrum of G, respectively. The eigenvalues of A and L are called the A-eigenvalues and L-eigenvalues of G, respectively. We use λ1(G)⩾λ2(G)⩾⋯⩾λn(G) and μ1(G)⩾μ2(G)⩾⋯⩾μn(G)=0 to denote the A-eigenvalues and the L-eigenvalues of G, respectively. Two graphs are said to be L-cospectral (A-cospectral) if they have the same L-spectrum (A-spectrum). A graph G is said to be determined by its L-spectrum (A-spectrum) if there is no other nonisomorphic graph L-cospectral (A-cospectral) with G. Let ϕA(G,x), ϕL(G,x), and ϕQ(G,x) denote the characteristic polynomials of the adjacency matrix, the Laplacian matrix, and the signless Laplacian matrix of G, respectively. As usual, Pn, Cn, and Kn stand for the path, the cycle, and the complete graph with n vertices, respectively. Let l(G) denote the line graph of G. A tree is called starlike if it has exactly one vertex of degree larger than 2. Let Ta,b,c denote the starlike tree with a vertex v of degree 3 such that Ta,b,c-v=Pa∪Pb∪Pc.

For a connected graph G with n vertices, G is called a unicyclic graph if G has n edges. Which graphs are determined by their spectrum is a difficult problem in the theory of graph spectra. Here, we introduce some results on spectral characterizations of unicyclic graphs. Let U(n;q,m1,m2,…,ms) be the unicyclic graph with n vertices obtained by attaching s paths of lengths m1,m2,…,ms(mi⩾1) at the same vertex of cycle Cq (see Figure 1). Haemers et al. [1] proved that U(n;q,m1) is determined by its A-spectrum when q is odd, and all U(n;q,m1) are determined by their L-spectra. It is also known that U(n;q,m1) is determined by its A-spectrum when q is even [2]. Liu et al. [3] proved that U(n;q,m1,m2) is determined by its L-spectrum. It is known that U(n;q,1,1,…,1) is determined by its L-spectrum, and U(n;q,1,1,…,1) is determined by its A-spectrum if q is odd (see [4]). Boulet [5] proved that the sun graph is determined by its L-spectrum. Shen and Hou [6] gave a class of unicyclic graphs with even girth that are determined by their L-spectra.

Two classes of unicyclic graphs.

Let W(n;q,m1,m2) be the unicyclic graph with n vertices obtained by attaching two paths of lengths m1 and m2(m1,m2⩾1) at two adjacent vertices of cycle Cq (see Figure 1). In this paper, we prove that W(n;q,m1,m2) and U(n;q,m1,m2,…,ms) are determined by their L-spectra when q is even.

2. Preliminaries

In this section, we give some lemmas which play important roles throughout this paper.

Lemma 1 (see [<xref ref-type="bibr" rid="B6">7</xref>]).

Let G be a graph. For the adjacency matrix and the Laplacian matrix, the following can be obtained from the spectrum:

the number of vertices,

the number of edges.

For the adjacency matrix, the following follows from the spectrum:

the number of closed walks of any length.

For the Laplacian matrix, the following follows from the spectrum:

the number of components,

the number of spanning trees.

Lemma 2 (see [<xref ref-type="bibr" rid="B5">8</xref>]).

For a bipartite graph G, one has ϕL(G,x)=ϕQ(G,x).

Lemma 3 (see [<xref ref-type="bibr" rid="B5">8</xref>]).

Let G be a graph with n vertices and m edges. Then
(1)ϕA(l(G),x)=(x+2)m-nϕQ(G,x+2).

For a graph G with n vertices, let ϕL(G,x)=l0xn+l1xn-1+⋯+ln. Oliveira et al. determined the first four coefficients of ϕL(G,x) as follows.

Lemma 4 (see [<xref ref-type="bibr" rid="B4">9</xref>]).

Let G be a graph with n vertices and m edges, and let d1,d2,…,dn be the degree sequence of G. Then
(2)l0=1,l1=-2m=-∑i=1ndi,l2=2m2-m-12∑i=1ndi2,l3=13[-4m3+6m2+3m2∑i=1ndi2-∑i=1ndi3-3∑i=1ndi2+6NG(C3)],
where NG(C3) is the number of triangles in G.

For a graph G, the subdivision graph of G, denoted by S(G), is the graph obtained from G by inserting a new vertex in each edge of G.

Lemma 5 (see [<xref ref-type="bibr" rid="B5">8</xref>]).

Let G be a graph with n vertices and m edges. Then
(3)ϕA(S(G),x)=xm-nϕQ(G,x2).

Lemma 6 (see [<xref ref-type="bibr" rid="B5">8</xref>]).

Let u be a vertex of G, let N(u) be the set of all vertices adjacent to u, and let C(u) be the set of all cycles containing u. Then
(4)ϕA(G,x)=xϕA(G-u,x)-∑v∈N(u)ϕA(G-u-v,x)-2∑Z∈C(u)ϕA(G-V(Z),x),
where V(Z) is the vertex set of Z.

Lemma 7 (see [<xref ref-type="bibr" rid="B17">10</xref>]).

Consider ϕA(Pn,2)=n+1.

Lemma 8 (see [<xref ref-type="bibr" rid="B8">1</xref>]).

Let G be a graph with n vertices and let v be a vertex of G. Then λ1(G)⩾λ1(G-v)⩾λ2(G)⩾λ2(G-v)⩾⋯⩾λn-1(G-v)⩾λn(G).

Lemma 9 (see [<xref ref-type="bibr" rid="B2">5</xref>]).

Let G be a graph with edge set E(G). Then
(5)μ1(G)⩽max{d(u)+d(v):uv∈E(G)},
where d(u) stands for the degree of vertex u.

Lemma 10 (see [<xref ref-type="bibr" rid="B7">11</xref>]).

For a connected graph G with at least two vertices, one has μ1(G)⩾Δ(G)+1, where Δ(G) denotes the maximum vertex degree of G; equality holds if and only if Δ(G)=n-1.

Lemma 11 (see [<xref ref-type="bibr" rid="B9">12</xref>]).

Let G be a connected graph with n⩾3 vertices and let d2 be the second maximum degree of G. Then d2⩽μ2(G).

Lemma 12 (see [<xref ref-type="bibr" rid="B5">8</xref>]).

Let G be a graph with n vertices and let e be an edge of G. Then μ1(G)⩾μ1(G-e)⩾μ2(G)⩾μ2(G-e)⩾⋯⩾μn-1(G-e)⩾μn(G)=μn(G-e)=0.

For a graph G, let NG(M) denote the number of subgraphs of G which are isomorphic to graph M.

Lemma 13 (see [<xref ref-type="bibr" rid="B15">13</xref>]).

Let G be a graph and let NG(k) be the number of closed walks of length k in G. Then
(6)NG(3)=6NG(C3),NG(5)=30NG(C3)+10NG(C5)+10NG(U(4;3,1)).

3. Main ResultsLemma 14.

Let G be a unicyclic graph with n vertices, and G contains an even cycle Cq. Let H be a graph L-cospectral with G. Then the following statements hold.

H is a unicyclic graph with n vertices, and the girth of H is q.

The line graphs l(G) and l(H) are A-cospectral.

The subdivision graphs S(G) and S(H) are A-cospectral, and μi(G)=λi(S(G)) (i=1,2,…,n).

Proof.

By Lemma 1, H is a unicyclic graph with n vertices, and the girth of H is q. Since q is even, G and H are bipartite. By Lemma 2, one has ϕQ(G,x)=ϕL(G,x)=ϕL(H,x)=ϕQ(H,x). Lemma 3 implies that line graphs l(G) and l(H) are A-cospectral. By Lemma 5, subdivision graphs S(G) and S(H) are A-cospectral, and μi(G)=λi(S(G)) (i=1,2,…,n).

Theorem 15.

The unicyclic graph G=W(n;q,m1,m2) is determined by its L-spectrum when q is even.

Proof.

Let H be any graph L-cospectral with G. By Lemma 14, we know that H is a unicyclic graph with n vertices, the girth of H is q, and l(G) and l(H) are A-cospectral. By Lemmas 1 and 13, we have Nl(H)(C3)=Nl(G)(C3)=2. So the maximum degree of H does not exceed 3. Suppose that there are ai vertices of degree i(i=1,2,3) in H. From Lemma 4, we have
(7)∑i=13ai=n,∑i=13iai=2n,∑i=13i2ai=2×32+4(n-4)+2=4n+4.
Solving the above equations, we get a1=2,a2=n-4,a3=2. So H and G have the same degree sequence. Then, one of the following holds.

H is the unicyclic graph obtained by attaching two paths of lengths l1 and l2 at two nonadjacent vertices of cycle Cq.

H=W(n;q,l1,l2); that is, H is the unicyclic graph obtained by attaching two paths of lengths l1 and l2 at two adjacent vertices of cycle Cq.

H is the graph shown in Figure 2.

Next, we discuss each of these three cases listed above.

Case 1 (H is the unicyclic graph obtained by attaching two paths of lengths l1 and l2 at two nonadjacent vertices of cycle Cq). Since l(G) and l(H) are A-cospectral, by Lemma 1, l(G) and l(H) have the same number of closed walks of any length. It is not difficult to see that Nl(G)(C5)=Nl(H)(C5). By Lemma 13, we have Nl(H)(U(4;3,1))=Nl(G)(U(4;3,1)). Note that m1+m2+q=l1+l2+q=n. If m1⩾2 or m2⩾2, then Nl(G)(U(4;3,1))⩾7 and Nl(H)(U(4;3,1))⩽6. If m1=m2=1, then Nl(G)(U(4;3,1))=6 and Nl(H)(U(4;3,1))=4. Hence Nl(H)(U(4;3,1))≠Nl(G)(U(4;3,1)), a contradiction.

Case 2 (H is the unicyclic graph W(n;q,l1,l2)). From Lemma 14, we know that the subdivision graphs S(G) and S(H) (shown in Figure 3) are A-cospectral. Let pf=ϕA(Pf,x); from Lemmas 6 and 7, we have
(8)ϕA(S(G),x)=xp2m1+2m2+2q-1-(p2m1p2q-2+2m2+p2m2p2q-2+2m1)-2p2m1p2m2,ϕA(S(G),2)=2(2m1+2m2+2q)-(2m1+1)(2q+2m2-1)-(2m2+1)(2q+2m1-1)-2(2m1+1)(2m2+1)=-4(m1q+m2q+4m1m2),ϕA(S(H),x)=xp2l1+2l2+2q-1-(p2l1p2q-2+2l2+p2l2p2q-2+2l1)-2p2l1p2l2,ϕA(S(H),2)=2(2l1+2l2+2q)-(2l1+1)(2q+2l2-1)-(2l2+1)(2q+2l1-1)-2(2l1+1)(2l2+1)=-4(l1q+l2q+4l1l2).

By ϕA(S(G),2)=ϕA(S(H),2), we get -4(m1q+m2q+4m1m2)=-4(l1q+l2q+4l1l2). By m1+m2+q=l1+l2+q=n, we get m1m2=l1l2. Hence, m1=l1,m2=l2 or m1=l2,m2=l1, G and H are isomorphic.

Case 3 (H is the graph shown in Figure 2). It is well known that the largest L-eigenvalue of a path is less than 4, and the largest L-eigenvalue of an even cycle is 4. Lemma 12 implies that μ2(G)<4. Let u and v be the two vertices of degree 3 in H (see Figure 2). If u and v are nonadjacent, there exists an edge e of H such that H-e=Cq∪Tl1,l2,n-l1-l2-q-1. By Lemmas 10 and 2.12, we get μ2(H)⩾4, a contradiction to μ2(G)<4. So u and v are adjacent.

From Lemma 14, we know that the subdivision graphs S(G) and S(H) (shown in Figure 4) are A-cospectral. Let pf=ϕA(Pf,x); from Lemmas 6 and 7, we have
(9)ϕA(S(G),x)=xp2m1+2m2+2q-1-(p2m1p2q-2+2m2+p2m2p2q-2+2m1)-2p2m1p2m2,ϕA(S(G),2)=2(2m1+2m2+2q)-(2m1+1)(2q+2m2-1)-(2m2+1)(2q+2m1-1)-2(2m1+1)(2m2+1)=-4(m1q+m2q+4m1m2),ϕA(S(H),x)=xp2q-1ϕA(T1,2l1,2l2,x)-(p2q-1p2l1+2l2+1+2p2q-2ϕA(T1,2l1,2l2,x))-2ϕA(T1,2l1,2l2,x),ϕA(S(H),2)=2×2qϕA(T1,2l1,2l2,2)-[2q(2l1+2l2+2)+2(2q-1)ϕA(T1,2l1,2l2,2)]-2ϕA(T1,2l1,2l2,2)=-4q(l1+l2+1).

Since ϕA(S(G),2)=ϕA(S(H),2), we have -4q(l1+l2+1)=-4(m1q+m2q+4m1m2). By l1+l2+1=m1+m2, we get m1m2=0, a contradiction to m1,m2>0.

Graph H.

Two subdivision graphs.

Two subdivision graphs.

Here, we describe a classic method to count the number of closed walks of a given length in a graph (see [2, 13, 14]). For a graph G, NG(k) stands for the number of closed walks of length k in G and NG(M) stands for the number of subgraphs of G which are isomorphic to graph M. Let ωk(M) be the number of closed walks of length k of graph M which contains all edges of M, and Mk(G) denotes the set of all connected subgraphs M of G such that ωk(M)≠0. Then
(10)NG(k)=∑M∈Mk(G)NG(M)ωk(M).

Lemma 16.

Let G=U(n;q,m1,m2,…,ms) and G′=U(n;q,l1,l2,…,ls) be L-cospectral graphs. If q is even, then G and G′ are isomorphic.

Proof.

If q is even, by Lemma 14, l(G) and l(G′) are A-cospectral. From Lemma 1, we get Nl(G)(k)=Nl(G′)(k) for any positive integer k. Suppose m1⩽m2⩽⋯⩽ms, l1⩽l2⩽⋯⩽ls. Let ri=min{mi,li}(i=1,2,…,s). If m1≠l1, by m1+m2+⋯+ms=l1+l2+⋯+ls, we know that M2r1+3(l(G))=M2r1+3(l(G′)). For any M∈M2r1+3(l(G)) and M≠U(3+r1;3,r1), we have Nl(G)(M)=Nl(G′)(M). Since Nl(G)(U(3+r1;3,r1))≠Nl(G′)(U(3+r1;3,r1)), by (10), we get Nl(G)(2r1+3)≠Nl(G′)(2r1+3), a contradiction. So we have m1=l1. Similar to the above arguments, by counting the number of closed walks of length 2ri+3(i=2,3,…,s), we can get mi=li(i=2,3,…,s). Hence G and G′ are isomorphic.

Theorem 17.

The unicyclic graph G=U(n;q,m1,m2,…,ms) is determined by its L-spectrum when q is even.

Proof.

Let G′ be any graph L-cospectral with G. By Lemma 14, G′ is a unicyclic graph with n vertices, and the girth of G′ is q. Let v be the vertex of degree s+2 in the subdivision graph S(G)=U(2n;2q,2m1,2m2,…,2ms); then S(G)-v=P2q-1∪P2m1∪P2m2∪⋯∪P2ms. Since the largest A-eigenvalue of a path is less than 2, by Lemmas 8 and 14, we get μ2(G)=λ2(S(G))<2,μ2(G)<4. Suppose d1⩾d2⩾⋯⩾dn is the degree sequence of G′. By Lemma 11, we have d2⩽3. From Lemmas 9 and 10, we get s+3<μ1(G)⩽s+4, d1+d2⩾μ1(G)>s+3, and d1+1<μ1(G)⩽s+4. By d2⩽3, we have s<d1<s+3.

If d1=s+2, applying Lemma 4, we have
(11)∑i=2ndi=2+2+⋯+2︸n-s-1+1+1+⋯+1︸s,∑i=2ndi2=22+22+⋯+22︸n-s-1+12+12+⋯+12︸s.
Since ∑i=2ndi2 is minimal if and only if |di-dj|≤1 for any i,j∈{2,3,…,n}, the degree sequences of G and G′ are both s+2,2,2,…,2︸n-s-1,1,1,…,1︸s. Lemma 16 implies that G and G′ are isomorphic.

If d1=s+1, by d1+d2>s+3 and d2<4, we get d2=3. Suppose that there are a3 three, a2 two, and a1 one in d2,d3,…,dn. By Lemma 4, we have
(12)∑i=13ai+1=n,∑i=13iai+(s+1)=s+2(n-s-1)+(s+2),∑i=13i2ai+(s+1)2=s+4(n-s-1)+(s+2)2.
Solving the above equations, we get a1=2s-1,a2=n-3s,a3=s. From Lemma 4, we have
(13)∑i=13i3ai+(s+1)3=s+8(n-s-1)+(s+2)3.s=0 or s=1 is the solution of the above equation. Then d1=1 or d1=2, a contradiction to d2=3.

The join of two graphs G and H, denoted by G×H, is the graph obtained from G∪H by joining each vertex of G to each vertex of H. Some results on spectral characterizations of graphs obtained by join operation can be found in [15–20]. For a unicyclic graph G, if G is determined by its L-spectrum and G≠C6, then G×Kr is determined by its L-spectrum (cf. [18, Theorem 4.4]). Hence, we can obtain the following two results from Theorems 15 and 17.

Corollary 18.

Let G=W(n;q,m1,m2). Then G×Kr is determined by its L-spectrum when q is even.

Corollary 19.

Let G=U(n;q,m1,m2,…,ms). Then G×Kr is determined by its L-spectrum when q is even.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is supported by the National Natural Science Foundation of China under Grant 11371109 and the Fundamental Research Funds for the Central Universities.

HaemersW. H.LiuX.ZhangY.Spectral characterizations of lollipop graphsBouletR.JouveB.The lollipop graph is determined by its spectrumLiuX.WangS.ZhangY.YongX.On the spectral characterization of some unicyclic graphsZhangX.ZhangH.Some graphs determined by their spectraBouletR.Spectral characterizations of sun graphs and broken sun graphsShenX.HouY.A class of unicyclic graphs determined by their Laplacian spectrumvan DamE. R.HaemersW. H.Which graphs are determined by their spectrum?CvetkovićD.RowlinsonP.SimićS.BuC.ZhouJ.LiH.WangW.Spectral characterizations of the corona of a cycle and two isolated verticesWangJ.BelardoF.HuangQ.Li MarziE. M.Spectral characterizations of dumbbell graphsGroneR.MerrisR.The Laplacian spectrum of a graph.IILiJ.PanY.A note on the second largest eigenvalue of the Laplacian matrix of a graphOmidiG. R.VatandoostE.Starlike trees with maximum degree 4 are determined by their signless Laplacian spectraBouletR.The centipede is determined by its Laplacian spectrumLiuM. H.LiuB. L.Some results on the Laplacian spectrumLiuM.LiuB.WeiF.Graphs determined by their (signless) Laplacian spectraLiuM.ShanH.DasK. C.Some graphs determined by their (signless) Laplacian spectraLiuX.WangS.Laplacian spectral characterization of some graph productsWangJ. F.ZhaoH. X.HuangQ.Spectral characterization of multicone graphsZhouJ.BuC.Laplacian spectral characterization of some graphs obtained by product operation