1 Introduction

Let G be a simple connected graph with vertex set V and edge set E. For two vertices \(u,v\in V\), we also write \(u\sim v\) if \(uv\in E\). For a vertex \(v\in V\), the neighborhood \(N_G(v)\) of v is defined to be \(N_G(v)=\{u\in V\mid u\sim v\}\), and the cardinality \(d_G(v)\) of \(N_G(v)\) is called the degree of v, i.e., \(d_G(v)=|N_G(v)|\). As usual, the minimum degree, the maximum degree, and the average degree of G are denoted by \(\delta (G)\), \(\Delta (G)\), and \({\overline{d}}(G)\), respectively. The distance \(d_G(u,v)\) of two vertices u and v is the length of a shortest path between u and v. If G is a rooted graph with root \(v_0\), then the height \(h_G(v)\) of vertex v is defined to be \(h_G(v)=d_G(v_0,v)\). A well-ordering \(\prec \) of the vertices is called a breadth-first-search ordering (or BFS-ordering for short) if the following conditions hold for all the vertices \(u,v\in V\):

  1. (i)

    \(u\prec v\) implies \(h_G(u)\le h_G(v)\);

  2. (ii)

    \(u\prec v\) implies \(d_G(u)\ge d_G(v)\);

  3. (iii)

    Let \(uv\in E(G),xy\in E(G), uy\notin E(G) , xv\notin E(G)\) with \(h(u) =h(x)=h(v)-1=h(y)-1\). If \(u\prec x\) , then \(v\prec y\).

If G has a BFS-ordering of its vertices, then it is called a BFS-graph [11]. All other notations not given here are standard in [4], and if it is clear which graph we mean, we delete the subscript G in the notations like \(d_G(v)\).

The Laplacian matrix L of G is defined to be \(L=D-A\), where D is the degree matrix and A is the adjacency matrix. It is well known that L can be regarded as a linear operator

$$\begin{aligned} L: {\mathbb {R}}^V\rightarrow {\mathbb {R}}^V, ~(Lf)(v)=\sum _{u\sim v}(f(u)-f(v)). \end{aligned}$$

A natural generalization of Laplacian operator is p-Laplacian. For \(p>1\), the p-Laplacian of G is the nonlinear operator

$$\begin{aligned} L_p: {\mathbb {R}}^V\rightarrow {\mathbb {R}}^V,~(L_pf)(v)=\sum _{u\sim v}\text {sign}(f(u)-f(v))|f(u)-f(v)|^{p-1}, \end{aligned}$$

where \(\text {sign}(x)\) is the sign-function of a number x, which is 1 if \(x>0\), \(-1\) if \(x<0\) and 0 otherwise. If \(f\in {\mathbb {R}}^V\) and \(\mu \in {\mathbb {R}}\) satisfy \((L_pf)(v)=\mu \text {sign}(f(v))|f(v)|^{p-1}\) for every \(v\in V\), then \(\mu \) is called an eigenfunction (or eigenvector) of \(L_p\) with eigenvalue \(\mu \). The discrete p-Laplacian, which is the analogue of the p-Laplacian on Riemannian manifolds, has been investigated by many researchers. In [9], Takeuchi investigated the spectrum of the p-Laplacian and the p-harmonic morphism of graphs and proved a Cheeger-type inequality and a Brooks-type inequality for infinite graphs. In [1], Amghibech presented several sharp upper bounds for the largest p-Laplacian eigenvalues of graphs. In [5], Bühler and Hein provided rigorous proof of the approximation of the second eigenvector of p-Laplacian to the Cheeger cut. In [6], Luo et al. proposed full eigenvector analysis of the p-Laplacian and obtained a natural global embedding for multi-class clustering problems.

Note that the signless Laplacian \(Q=D+A\) is also a linear operator in \({\mathbb {R}}^V\) such that \((Qf)(v)=\sum _{u\sim v}(f(u)+f(v))\). Recently, Borba and Schwerdtfeger [3] investigated the so-called signless p-Laplacian. For \(p>1\), the signless p-Laplacian is the nonlinear operator

$$\begin{aligned} Q_p: {\mathbb {R}}^V\rightarrow {\mathbb {R}}^V, ~(Q_pf)(v)=\sum _{u\sim v}\text {sign}(f(u)+f(v))|f(u)+f(v)|^{p-1}. \end{aligned}$$

Similarly, a function f is called an eigenfunction (or eigenvector) of \(Q_p\) with eigenvalue \(\lambda \) if \((Q_pf)(v)=\lambda \text {sign}(f(v))|f(v)|^{p-1}\) for every \(v\in V\). The energy functional for signless p-Laplacian \(Q_p\) is defined to be

$$\begin{aligned} E_pf=\sum _{uv\in E}|f(u)+f(v)|^p \end{aligned}$$

and the \(l^p\) norm of a function f is \(||f||_p=(\sum _{v}|f(v)|^p)^{1/p}\). The largest eigenvalue of \(Q_p\) is

$$\begin{aligned} \lambda _p=\sup _{f\ne 0}\frac{E_pf}{||f||_p^p}=\sup _{f\ne 0}\frac{\sum _{uv\in E}|f(u)+f(v)|^p}{\sum _{v\in V}|f(v)|^p}. \end{aligned}$$

In [3], Borba and Schwerdtfeger gave a Perron–Frobenius-type property for \(\lambda _p\) and obtained some basic inequalities for \(\lambda _p\).

It is an attractive topic to estimate the eigenvalues, especially the largest eigenvalue, of graphs in spectral graph theory. There are plentiful works on the largest adjacency eigenvalues of graphs, and we refer the reader to the monograph [8]. In [11, 12], Zhang, respectively, investigated the largest Laplacian and signless Laplacian eigenvalues of graphs with given degree sequence. In [10], Wang and Huang investigated the largest signless Laplacian eigenvalues of graphs with given diameter or cut vertices. In [13] Zhang and Zhang studied the largest p-Laplacian eigenvalues of weighted trees with given degree sequence. For other interesting results in this regard, one may refer to [2].

Motivated by the aforementioned works, we consider the largest signless p-Laplacian eigenvalues of graphs with given degree sequence. Let \(\pi =(d_0,d_1,\ldots ,d_{n-1})\) be a degree sequence of a unicyclic graph and \({\mathcal {G}}_{\pi }\) the set of all unicyclic graphs with degree sequence \(\pi \). In the current work, we obtain the graph maximizing the largest signless p-Laplacian eigenvalue \(\lambda _p\) among \({\mathcal {G}}_{\pi }\). Furthermore, the graph maximizing \(\lambda _p\) among all unicyclic graphs is also obtained.

2 Graph Transformations

In this part, we provide some graph transformations which do not decrease \(\lambda _p\). As a start, we need the Perron–Frobenius property for \(\lambda _p\).

Lemma 1

([3]) For \(p>1\), let G be a connected graph and f an eigenfunction for \(\lambda _p\). Then \(\lambda _p>0\) and f is either strictly positive, i.e., \(f(v)>0\) for all \(v\in V(G)\), or strictly negative.

As usual, when G is connected, the strictly positive eigenvector of \(Q_p(G)\) with eigenvalue \(\lambda _p\) is called the Perron vector of \(Q_p\) or simply the Perron vector of G.

Fig. 1
figure 1

The transformation given in Lemma 2

Now we are ready to present our first transformation.

Lemma 2

Let \(G=(V, E)\) be a graph with Perron vector f. For two vertices u and v and a non-empty subset \(S\subseteq N(u)\setminus N(v)\), let \(G'=G-\{us\mid s\in S\}+\{vs\mid s\in S\}\) (see Fig. 1). If \(f(u)\le f(v)\) then \(\lambda _p(G)<\lambda _p(G')\).

Proof

Without loss of generality, assume that \(||f||_p=1\). Therefore, we have

$$\begin{aligned}{} & {} \lambda _p(G')-\lambda _p(G)\ge E_p(G')f-E_p(G)f\\ {}{} & {} \quad =\sum _{s\in S} [(f(v)+f(s))^p-(f(u)+f(s))^p]\ge 0, \end{aligned}$$

where the last inequality is due to the strict monotonicity of \(x^p\) for every \(x\ge 0\).

If \(\lambda _p(G')=\lambda _p(G)\), then f is the eigenvector of both \(Q_p(G)\) and \(Q_p(G')\), and thus

$$\begin{aligned} \left\{ \begin{array}{l} \lambda _p(G)f(u)^{p-1}\\ =\sum _{xu\in E}(f(x)+f(u))^{p-1}=\sum _{xu\in E',x\not \in S}(f(x)+f(u))^{p-1}+\sum _{x\in S}(f(x)+f(u))^{p-1},\\ \lambda _p(G')f(u)^{p-1}=\sum _{yu\in E'}(f(y)+f(u))^{p-1}=\sum _{yu\in E,y\not \in S}(f(y)+f(u))^{p-1}. \end{array}\right. \end{aligned}$$

It leads to \(\sum _{x\in S}(f(x)+f(u))^{p-1}=0\), which is impossible. Hence \(\lambda _p(G')>\lambda _p(G)\). \(\square \)

Before presenting the next transformation, let us recall the notion of majorization. Let \(x=(x_1,\cdots ,x_{n})\) and \(y=(y_1,\cdots ,y_n)\) be two non-increasing sequences. If \(\sum _{i=1}^kx_i\le \sum _{i=1}^ky_i\) for \(1\le k\le n\) and \(\sum _{i=1}^{n}x_i=\sum _{i=1}^{n}y_i\), then we say x is majorized by y, and denote by \(x\lhd y\). We need the following well-known result.

Lemma 3

[7] Let \(x=(x_1,\ldots ,x_n)\) and \(y=(y_1,\ldots ,y_n)\) be two non-increasing sequence such that \(x\lhd y\). If f is a convex function, then \(\sum _{i=1}^nf(x)\le \sum _{i=1}^nf(y)\).

Fig. 2
figure 2

The transformation given in Lemma 4

Now we are ready to present our second transformation.

Lemma 4

Let \(G=(V, E)\) be a graph with Perron vector f. For four vertices \(u_1,u_2,v_1,v_2\) with \(u_1\not \sim u_2\), \(v_1\not \sim v_2\) and \(u_i\sim v_i\) for \(1\le i\le 2\), let \(G'=G-\{u_1v_1,u_2v_2\}+\{u_1u_2,v_1v_2\}\) (see Fig. 2). If \(f(u_1)\ge f(v_2)\) and \(f(u_2)\ge f(v_1)\), then \(\lambda _p(G')\ge \lambda _p(G)\). Furthermore, if one of the two inequalities is strict, then \(\lambda _p(G')> \lambda _p(G)\).

Proof

Assume \(||f||_p=1\), and we have

$$\begin{aligned} \begin{array}{lll}\lambda _p(G')-\lambda _p(G)\ge E_p(G')f-E_p(G)f\\ =[(f(u_1)+f(u_2))^p+(f(v_1)+f(v_2))^p]-[(f(u_1)+f(v_1))^p\\ \quad +(f(u_2)+f(v_2))^p]\ge 0,\end{array} \end{aligned}$$

where the last inequality is due to Lemma 3 since the sequence \((f(u_1)+f(v_1),f(u_2)+f(v_2))\) is majorized by \((f(u_1)+f(u_2),f(v_1)+f(v_2))\) and \(x^p\) is a convex function for \(x>0\) and \(p>1\).

If \(\lambda _p(G')=\lambda _p(G)\) then f is the eigenvector of both \(Q_p(G)\) and \(Q_p(G')\), and thus

$$\begin{aligned} \left\{ \begin{array}{l} \lambda _p(G)f(u_1)^{p-1}=\sum _{xu_1\in E, x\not \in \{u_2,v_1\}}(f(u_1)+f(x))^p+(f(u_1)+f(v_1))^p,\\ \lambda _p(G')f(u_1)^{p-1}=\sum _{yu_1\in E', y\not \in \{u_2,v_1\}}(f(u_1)+f(y))^p+(f(u_1)+f(u_2))^p . \end{array}\right. \end{aligned}$$

Therefore , \((f(u_1)+f(v_1))^p=(f(u_1)+f(u_2))^p\) and thus \(f(u_2)=f(v_1)\). Similarly, we can get \(f(u_1)=f(v_2)\). Thus the second part of the result holds. \(\square \)

Fig. 3
figure 3

The transformation given in Lemma 6

Let G be a connected graph that is not a tree. For two integers \(t\ge s\ge 0\) and a vertex u of G, denote by \(G_{s,t}\) the graph obtained from G by attaching two pendant paths of length s and t to u (see Fig. 3). In what follows, we discuss \(\lambda _p(G_{s,t})\) and the Perron vector of \(Q_p(G_{s,t})\). Since the case for \(G_{s,t}\) being a cycle is trivial, we always assume that \(G_{s,t}\) is not a cycle. Borba and Schwerdtfeger gave the following result.

Lemma 5

([3]) Let \(p>1\) and G be a connected graph. Then \(2^{p-1}{\overline{d}}(G)\le \lambda _p(G)\le 2^{p-1}\Delta (G)\) where either equality holds if and only if G is regular.

The following claim is immediate from Lemma 5.

Claim 1

For \(p>1\), it holds that \(\lambda _p(G_{s,t})>2^p\).

Let

$$\begin{aligned} g(x)=(1+x)^{p-1}+(1+1/x)^{p-1}. \end{aligned}$$
(1)

Note that for \(x\ge 1\), g(x) is a monotone increasing continuous function in \([2^p,+\infty )\). From Claim 1, we get the following result.

Claim 2

There exists \(\gamma >1\) such that \(g(\gamma )=\lambda _p(G_{s,t})\).

Let \(G_{s,t}\) be labeled as in Fig. 3 and let f be the Perron vector of \(Q_p\). Assume that q is the conjugate exponent of p, that is \((p-1)(q-1)=1\). Since f is strictly positive, from \(\lambda _pf(v)^{p-1}=\sum _{u\sim v}(f(u)+f(v))^{p-1}\) for any v, we have

$$\begin{aligned}\left\{ \begin{array}{l} \frac{f(x_2)}{f(x_1)}=\lambda _p^{q-1}-1,\\ \frac{f(x_3)}{f(x_2)}=\left( \lambda _p-(1+\frac{1}{{f(x_2)}/{f(x_1)}})^{p-1}\right) ^{q-1}-1,\\ \qquad \cdots \cdots \\ \frac{f(x_s)}{f(x_{s-1})}=\left( \lambda _p-(1+\frac{1}{{f(x_{s-1})}/{f(x_{s-2})}})^{p-1}\right) ^{q-1}-1,\\ \frac{f(u)}{f(x_s)}=\left( \lambda _p-(1+\frac{1}{{f(x_s)}/{f(x_{s-1})}})^{p-1}\right) ^{q-1}-1, \end{array} \right. \end{aligned}$$

and

$$\begin{aligned} \left\{ \begin{array}{l} \frac{f(y_2)}{f(y_1)}=\lambda _p^{q-1}-1,\\ \frac{f(y_3)}{f(y_2)}=\left( \lambda _p-(1+\frac{1}{{f(y_2)}/{f(y_1)}})^{p-1}\right) ^{q-1}-1,\\ \qquad \cdots \cdots \\ \frac{f(y_t)}{f(y_{t-1})}=\left( \lambda _p-(1+\frac{1}{{f(y_{t-1})}/{f(y_{t-2})}})^{p-1}\right) ^{q-1}-1,\\ \frac{f(u)}{f(y_t)}=\left( \lambda _p-(1+\frac{1}{{f(y_t)}/{f(y_{t-1})}})^{p-1}\right) ^{q-1}-1. \end{array} \right. \end{aligned}$$

For convenience, we denote by \(a_i=f(x_{i+1})/f(x_i)\) for \(1\le i\le s\) and \(b_{j}=f(y_{j+1})/f(y_j)\) for \(1\le j\le t\), where \(x_{s+1}=y_{t+1}=u\). Note that \(a_1=b_1\) and \(g(a_1)=g(b_1)=\lambda _p+(1+1/a_1)^{p-1}>\lambda _p\). We have \(a_1=b_1>\gamma \), where \(g(\gamma )=\lambda _p\). Now we let

$$\begin{aligned} {\bar{g}}(x)=(\lambda _p-(1+1/x)^{p-1})^{q-1}-1. \end{aligned}$$
(2)

One can verify that \({\bar{g}}(x)\) is a monotone increasing function for \(x>1\) and \({\bar{g}}(\gamma )=\gamma \). Therefore, \(a_{2}={\bar{g}}(a_1)>{\bar{g}}(\gamma )=\gamma \) and thus we get \(a_{i}>\gamma \) for \(1\le i\le s\) similarly. It leads to \(g(a_i)=(1+a_i)^{p-1}+(1+1/a_i)^{p-1}>g(\gamma )=\lambda _p\), and thereby \(\lambda _p-(1+1/a_i)^{p-1}<(1+a_i)^{p-1}\). Therefore, we have

$$\begin{aligned}{} & {} a_{i+1}-a_i=(\lambda _p-(1+1/a_i)^{p-1})^{q-1}-(1+a_i)\\ {}{} & {} <(1+a_i)^{(p-1)(q-1)}-(1+a_i)=0. \end{aligned}$$

It means that \(a_{i+1}<a_i\). Similarly, there are similar properties for \(b_j\). We conclude them in the following claim.

Claim 3

For the symbols given above, we have

  1. (i)

    \(a_i=b_i\) for \(1\le i\le s\);

  2. (ii)

    \(a_i,b_j>\gamma \) for \(1\le i\le s\) and \(1\le j\le t\);

  3. (iii)

    \(a_{i+1}<a_{i}\) and \(b_{j+1}<b_j\) for \(1\le i\le s-1\) and \(1\le j\le t-1\).

Since \(a_i=f(x_{i+1})/f(x_i)\) for \(1\le i\le s\), we have \(f(u)>f(x_s)>\cdots >f(x_1)\) by Claim 3(ii). Note that \(f(x_i)/f(y_i)=(f(u)/f(y_i))/(f(u)/f(x_i))=(b_tb_{t-1}\cdots b_i)/(a_sa_{s-1}\cdots a_i)=b_t\cdots b_{s+1}>1\) for \(1\le i\le s\). We have \(f(x_i)>f(y_i)\) for \(1\le i\le s\). We conclude them in the following claim.

Claim 4

For the symbols above, we have

  1. (i)

    \(f(u)>f(x_s)>\cdots >f(x_1)\) and \(f(u)>f(y_t)>\cdots >f(y_1)\);

  2. (ii)

    \(f(x_i)>f(y_i)\) for \(1\le i\le s\).

Now we are ready to present our third transformation.

Lemma 6

Let G be a connected graph that is not a tree. If \(s+2\le t\) then \(\lambda _p(G_{s,t})<\lambda _p(G_{s+1,t-1})\).

Proof

If \(s=0\), we have \(G_{1,t-1}=G_{0,t}-y_2y_1+uy_1\). Since \(f(u)>f(y_2)\) by Claim 4(i), Lemma 2 implies that \(\lambda _p(G_{0,t})<\lambda _p(G_{1,t-1})\). In what follows, we consider the case for \(s\ge 1\). If \(f(x_s)\le f(y_{s+1})\), noticing \(G_{s+1,t-1}=G_{s,t}-ux_s-y_{s+2}y_{s+1}+uy_{s+1}+y_{s+2}x_s\) and \(f(u)>f(y_{s+2})\), we have \(\lambda _p(G_{s,t})<\lambda _p(G_{s+1,t-1})\) by Lemma 4. Otherwise, taking i to be the minimum index such that \(f(x_i)>f(y_{i+1})\). If \(i=1\), by noticing that \(G_{s+1,t-1}=G_{s,t}-y_2y_1+x_1y_1\), we have \(\lambda _p(G_{s,t})<\lambda _p(G_{s+1,t-1})\) due to Lemma 2. If \(i\ge 2\), then \(f(x_{i-1})\le f(y_i)\). Therefore, by noticing \(G_{s+1,t-1}=G_{s,t}-x_{i}x_{i-1}-y_{i+1}y_i+x_iy_i+x_{i-1}y_{i+1}\), we have \(\lambda _p(G_{s,t})<\lambda _p(G_{s+1,t-1})\) in view of Lemma 4. \(\square \)

Fig. 4
figure 4

The two cases of the transformation given in Lemma 7, where the blue edges are deleted and the fat edges are added

Let T be a tree and u a vertex of T. For integers \(l\ge 3\) and \(s\ge 1\), denote by \(T_u(l,s)\) the unicyclic graph obtained by identifying a vertex of the cycle \(C_l\) and one endpoint of \(P_{s+1}\) with u (see Fig. 4). Similar to Lemma 6, we would get our last transformation. At first, we discuss \(\lambda _p(T_u(l,s))\) and the Perron vector f of \(Q_p(T_u(l,s))\). We may assume that \(l=2k\) is even as the case for l being odd could be dealt with very similarly. Let \(T_u(l,s)\) be labeled as in Fig. 4. By the symmetry, we have \(f(u_{i})=f(u_{2k-i})\) for \(1\le i\le k\) and thus

$$\begin{aligned} \left\{ \begin{array}{l} \frac{f(u_{k-1})}{f(u_{k})}=\left( \frac{\lambda _p}{2}\right) ^{q-1}-1,\\ \frac{f(u_{k-2})}{f(u_{k-1})}=\left( \lambda _p-(1+\frac{1}{f({u_{k-1}})/f({u_{k})}})^{p-1}\right) ^{q-1}-1,\\ \qquad \cdots \cdots \\ \frac{f(u_1)}{f(u_2)}=\left( \lambda _p-(1+\frac{1}{f({u_2})/f({u_3})})^{p-1}\right) ^{q-1}-1,\\ \frac{f(u)}{f(u_1)}=\left( \lambda _p-(1+\frac{1}{f({u_1})/f({u_2})})^{p-1}\right) ^{q-1}-1. \end{array} \right. \end{aligned}$$

For convenience, denote by \(c_i=\frac{f(u_{i-1})}{f(u_{i})}\) for \(1\le i\le k\) (notice that \(u=u_0\)). Similar to Claim 1, we also have \(\lambda _p>2^p\). By noticing that \(c_{k}=(\lambda _p/2)^{q-1}-1>(2^{p-1})^{q-1}-1=1\), we have \(c_{k-1}={\bar{g}}(c_{k})>{\bar{g}}(1)=(\lambda _p-2^{p-1})^{q-1}-1>(2^p-2^{p-1})^{q-1}-1=1\) where \({\bar{g}}(x)\) is the function given in (2). Therefore, we get \(c_i>1\) for \(1\le i\le k\) by using \(c_i={\bar{g}}(c_{i+1})\). Moreover, since \(c_{k}>1\) and \((c_{k}+1)^{p-1}=\lambda _p/2\), we have

$$\begin{aligned} g(c_{k})= & {} (1+c_{k})^{p-1}+\left( 1+\frac{1}{c_{k}}\right) ^{p-1}=(1+c_{k})^{p-1}\left( 1+\frac{1}{c_{k}^{p-1}}\right) \\ {}= & {} \frac{\lambda _p}{2}\left( 1+\frac{1}{c_{k}^{p-1}}\right) \\ {}{} & {} \quad <\lambda _p =g(\gamma ), \end{aligned}$$

where g(x) is the function given in (1). It leads to that \(c_{k}<\gamma \), and thus \(c_{k-1}={\bar{g}}(c_{k})<{\bar{g}}(\gamma )=\gamma \). Similarly, we have \(c_i<\gamma \) for \(1\le i\le k\). It leads to the following claim.

Claim 5

For the symbols above, we have \(1<c_i<\gamma \) for \(1\le i\le k\).

From Claim 5, we have \(f(u_{i-1})>f(u_i)\) for \(1\le i\le k\). Moreover, denote by \(\epsilon =\min \{k,s\}\), for \(1\le i\le \epsilon \), we have \(f(u)/f(u_i)=c_1c_2\cdots c_{i}<\gamma ^i<a_{s}a_{s-1}\cdots a_{s-i+1}=f(u)/f(x_{s-i+1})\) and thus \(f(u_i)>f(x_{s-i+1})\). It leads to the following claim.

Claim 6

For the symbols above, we have \(f(u)>f(u_1)>\cdots>f(u_{k-1})>f(u_k)\) and \(f(u_i)>f(x_{s-i+1})\).

Now we are ready to present our last transformation.

Lemma 7

Let \(T_u(l,s)\) be the unicyclic graph described above. If \(l>4\), then \(\lambda _p(T_u(l,s))<\lambda _p(T_u(l-1,s+1))\).

Proof

If \(f(u_2)\ge f(x_s)\), by noticing that \(T_{u}(l-1,s+1)=T_u(l,s)-ux_s-u_2u_1+uu_2+u_1x_s\) and \(f(u)>f(u_1)\), then we have \(\lambda _p(T_u(l,s))<\lambda _p(T_u(l-1,s+1))\) due to Lemma 4. If \(f(u_2)<f(x_s)\), then taking i to be the maximum index such that \(f(u_i)<f(x_{s-i+2})\). It means that \(f(u_{i+1})\ge f(x_{s-i+1})\). By noticing that \(T_{u}(l-1,s+1)=T_u(l,s)-u_iu_{i+1}-x_{s-i+2}x_{s-i+1}+u_{i+1}x_{s-i+2}+u_ix_{s-i+1}\), we have \(\lambda _p(T_u(l,s))<\lambda _p(T_u(l-1,s+1))\) due to Lemma 4. \(\square \)

We end up this part with the following result, which is obtained by using the transformations above.

Lemma 8

Let \(\pi \) be a graphical sequence, and let \(G\in {\mathcal {G}}_{\pi }\) be a graph with Perron vector f. If there exist vertices uvw such that \(u\sim v\), \(u\not \sim w\), \(f(v)<f(w)\), and \(f(u)\ge f(x)\) for all \(x\in N(w)\), then there exists \(G'\in {\mathcal {G}}_{\pi }\) such that \(\lambda _p(G')>\lambda _p(G)\).

Proof

If \(d(w)<d(v)\), then there exists a non-empty set \(S\subseteq N(v)\setminus N(w)\), and the graph \(G'\) could be obtained by the transformation of Lemma 2. If \(d(w)\ge d(v)\) then \(N(w)\setminus N(v)\ne \emptyset \). Let P be a path from u to w. If there exists a vertex \(x\in N(w)\setminus N(v)\) lying in P, then the graph \(G'=G-uv-wx+uw+vx\) is connected and Lemma 4 implies \(\lambda _p(G')>\lambda _p(G)\). Otherwise, every y lying in P is adjacent to v whenever it is adjacent to w. Taking \(x\in N(w)\setminus N(v)\) lying in P, then the graph \(G'=G-uv-wx+uw+vx\) is also connected and Lemma 4 implies \(\lambda _p(G')>\lambda _p(G)\) as well. \(\square \)

3 Extremal Graph Among \({\mathcal {G}}_{\pi }\)

In this section, we determine the graph maximizing \({\mathcal {G}}_{\pi }\) when \(\pi \) is a degree sequence of a unicyclic graph. As a start, we present the following conditions for a graphical sequence to be a sequence of a unicyclic graph.

Lemma 9

([11]) Let \(\pi =(d_0,d_1,\ldots ,d_{n-1})\) be a positive non-increasing integer sequence with even sum and \(n\ge 3\). Then \(\pi \) is unicyclic graphic if and only if \(\sum _{i=0}^{n-1}d_i=2n\) and \(d_2\ge 2\).

In view of Lemma 9, in what follows we always assume that \(\sum _{i=0}^{n-1}d_i=2n\) and \(d_2\ge 2\) in the sequence \(\pi \). Noticing that \(d_0=2\) if and only if \({\mathcal {G}}_{\pi }=\{C_n\}\), we would exclude this trivial case and always assume \(d_0\ge 3\). For a sequence \(\pi \) with \(\sum _{i=0}^{n-1}d_i=2n\), \(d_2\ge 2\) and \(d_0\ge 3\), we define the unique unicyclic graph \(U_{\pi }\) through the following algorithm:

  1. (i)

    Start with a single vertex v as the root and give v the appropriate number of children so that it has the largest degree;

  2. (ii)

    Label the neighbors of v as \(v_1,v_2,\ldots ,\) and add an edge between \(v_1\) and \(v_2\);

  3. (iii)

    Assign to the vertices \(v_1,v_2,\ldots \) the largest available degrees such that \(d(v_1)\ge d(v_2)\ge \cdots \);

  4. (iv)

    Label the neighbors of \(v_1\) (except v) as \(v_{11},v_{12},\ldots \) such that they take all the largest degrees available and that \(d(v_{11})\ge d(v_{12})\ge \cdots \), then do the same for \(v_2,v_3,\ldots \);

  5. (v)

    Repeat iv) for all newly labeled vertices, always start with the neighbor of the labeled vertex with largest degree whose neighbors are not labeled yet.

For example, Fig. 5 shows the unicyclic graph with degree sequence \(\pi =(5,4,3,3,3,2,2,2,1,\ldots ,1)\).

Fig. 5
figure 5

The unicyclic graph \(U_{\pi }\) with \(\pi =(5,4,3,3,3,2,2,2,1,\ldots ,1)\)

Now we assume that \(G_0\) maximizing \(\lambda _p\) among \({\mathcal {G}}_{\pi }\). In what follows, we always assume that f is the Perron vector of \(Q_p(G_0)\). Let \(V(G_0)\) be labeled as \(V=\{v_0,v_1,\ldots ,v_{n-1}\}\) such that \(f(v_0) \ge f(v_1) \ge \cdots \ge f(v_{n-1})\). We first prove that the ordering \(v_0\prec v_1\prec \cdots \prec v_{n-1}\) is a BSF-ordering.

Lemma 10

Let \(V(G_0)\) be labeled as above and let \(G_0\) be viewed as a rooted graph with root \(v_0\). Then for \(i<j\) we have

  1. (i)

    \(d(v_i)\ge d(v_j)\) and the equality holds if \(f(v_i)=f(v_j)\);

  2. (ii)

    \(h(v_i)\le h(v_j)\).

Proof

If \(f(v_i)\ge f(v_j)\) and \(d(v_j)>d(v_i)\) for \(i<j\), then there exists a non-empty set \(S\subseteq N(v_j)\setminus N(v_i)\), and the transformation of Lemma 2 leads to a graph \(G'\in {\mathcal {G}}_{\pi }\) such that \(\lambda _p(G') > \lambda _p(G_0)\), a contradiction. Moreover, if \(f(v_i)=f(v_j)\), then either \(d(v_i)>d(v_j)\) or \(d(v_j)>d(v_i)\) results in a \(G'\) such that \(\lambda _p(G') > \lambda _p(G_0)\) due to Lemma 2, a contradiction. Hence \(d(v_i)=d(v_j)\). The statement (i) holds.

To show (ii), we would prove \(h(v_i)\le h(v_{i+1})\) for \(0\le i\le n-1\) by induction on i. If \(i=0\), then \(h(v_0)=0\le h(v_1)\), and the assertion holds. Assume that the assertion holds for \(i\le k-1\), that is \(h(v_0)\le h(v_1)\le \cdots \le h(v_k)\). It only needs to show the case for \(i=k\), i.e., \(h(v_k)\le h(v_{k+1})\). Without loss of generality, we may assume that \(f(v_{k+1})<f(v_k)\). Since G is connected, there exists a smallest integer s in \(\{0,1,\ldots ,k\}\) such that \(v_s\) is adjacent to some vertex \(v_r\) in \(v_{k+1},\ldots ,v_{n-1}\). We divide into two cases to discuss.

Case 1 \(h(v_s)\ge h(v_k)-1\).

Let \(P_{v_0v_{k+1}}\) be a shortest path from \(v_0\) to \(v_{k+1}\), and let \(0\le t\le k\) be the maximum index such that \(v_t\in V(P_{v_0v_{k+1}})\). Since \(v_t\) is adjacent to some vertex in \(\{v_{k+1},\ldots ,v_{n-1}\}\), from the choice of s, we have \(s\le t\le k\) and thus \(h(v_s)\le h(v_t)\). Hence

$$\begin{aligned} h(v_{k+1})\ge h(v_t)+1\ge h(v_s)+1\ge h(v_k)-1+1=h(v_k). \end{aligned}$$

Case 2 \(h(v_s)< h(v_k)-1\).

In this case, \(v_k\not \sim v_l\) for any \(0\le l\le s\), since otherwise \(h(v_k)\le h(v_l)+1\le h(v_s)+1<h(v_k)-1+1=h(v_k)\), which is impossible. Moreover, we have

$$\begin{aligned} f(v_r)\le f(v_{k+1})<f(v_k)\le f(v_s) \text { and }f(v_l)\le f(v_s), \end{aligned}$$

for any \(v_l\in N(v_k)\). Now we get three vertices \(v_s\), \(v_r\) and \(v_k\) satisfying \(v_r\sim v_s\), \(v_s\not \sim v_k\), \(f(v_r)<f(v_k)\) and \(f(v_s)\ge f(v_l)\) for any \(v_l\in N(v_k)\). Therefore, Lemma 8 implies that there exists \(G'\in {\mathcal {G}}_{\pi }\) such that \(\lambda _p(G')>\lambda _p(G_0)\), a contradiction.

The proof is completed. \(\square \)

According to Lemma 10, we get the following result.

Lemma 11

The ordering \(v_0\prec v_1\prec \cdots \prec v_{n-1}\) is a BSF-ordering.

Proof

Lemma 10 indicates that \(v_i\prec v_j\) implies \(h(v_i)\le h(v_j)\) and \(d(v_i)\ge d(v_j)\). Now assume that there are four vertices \(v_i,v_j,v_s,v_t\) such that \(v_iv_s\in E(G)\), \(v_jv_t\in E(G)\), \(v_iv_t\notin E(G)\), \(v_jv_s\notin E(G)\), \(h(v_i)=h(v_j)=h(v_s)-1=h(v_t)-1\) and \(v_i\prec v_j\). It only needs to prove \(v_s\prec v_t\). Otherwise, without loss of generality, assume that \(f(v_t)>f(v_s)\). Let \(G'=G_0-v_iv_s-v_tv_j+v_iv_t+v_sv_j\). Clearly, \(G'\in {\mathcal {G}}_{\pi }\). Lemma 4 implies \(\lambda _p(G')>\lambda _p(G_0)\), a contradiction. \(\square \)

Note that Lemma 11 implies that \(G_0=U_{\pi }\) if \(v_1\sim v_2\). In what follows, we show that \(G_0=U_{\pi }\) by proving \(v_1\sim v_2\). We need to consider two different cases for \(d_1=2\) and \(d_1\ge 3\).

Lemma 12

If \(d_1=2\) in the sequence \(\pi \), then \(G_0=U_{\pi }\).

Proof

Since \(d_1=2\), we see \(G_0\) is obtained from a cycle \(C_l\) containing \(v_0\) by attaching \(d_0-2\) pendant paths of lengths \(k_1,\ldots ,k_{d_0-2}\) to \(v_0\). Assume that \(k_1\ge \cdots \ge k_{d_0-2}\). It suffices to show that \(l=3\) and \(|k_1-k_{d_0-2}|\le 1\). If \(l\ge 4\), then the transformation of Lemma 7 results in a graph \(G'\in {\mathcal {G}}_{\pi }\) such that \(\lambda _p(G')>\lambda _p(G_0)\), a contradiction. If \(|k_1-k_{d_0-2}|\ge 2\), then the transformation in Lemma 6 leads to graph \(G'\in {\mathcal {G}}_{\pi }\) such that \(\lambda _p(G')>\lambda _p(G_0)\), a contradiction. \(\square \)

Lemma 13

If \(d_1\ge 3\) in the sequence \(\pi \), then \(G_0=U_{\pi }\).

Proof

Let \(V_i=\{v\in V(G),h(v)=i\}\) for \(0\le i\le h^*\), where \(h^*=h(v_{n-1})\). Hence we can relabel the vertices of G in such a way that \(V_i=\{v_{i,1},\cdots ,v_{i,s_i}\}\) with \(f(v_{i,1})\ge f(v_{i,2})\ge \cdots \ge f(v_{i,s_i})\), \(f(v_{i,j})\ge f(v_{i+1,k})\) and \(d(v_{i,j})\ge d(v_{i+1,k})\) for \(0\le i\le h^*-1\) and \(1\le j\le s_i, 1\le k\le s_{i+1}\). Clearly, \(s_0=1\) and \(s_1=d_0\). Further, we can show that \(f(v_{0,1})> f(v_{1,s_1})\). In fact, if \(f(v_{0,1})=f(v_{1,s_1})\), then from eigenequations, we have

$$\begin{aligned} \lambda _p(G_0)f(v_{0,1})^{p-1}=\sum _{i=1}^{s_1}(f(v_{0,1})+f(v_{1,i}))^{p-1}=2^{p-1}d(v_{0,1})f(v_{0,1})^{p-1}. \end{aligned}$$

Thus \(\lambda _p(G_0)=2^{p-1}d(v_{0,1})=2^{p-1}\Delta (G_0)\). Hence by Lemma 5, \(G_0\) is regular, a contradiction. Since G is a unicyclic graph, there exists only one cycle C in \(G_0\). Let \(v_{r,w}\) be the vertex with smallest height among in V(C), i.e., \(h(v_{r,w})=r\le h(u)\) for any \(u\in V(C)\). Now we consider the following five cases.

Case 1 \(v_{r,w}=v_{0,1}\) and \(v_{1,1}\sim v_{1,2}\).

In this case, \(G_0=U_{\pi }\), as desired.

Case 2 \(v_{r,w}=v_{0,1},v_{1,1}\not \sim v_{1,2}\), and \(v_{1,i}\sim v_{1,j}\) for some \(1\le i<j\le s_1\).

If \(i=1\) and \(2<j\le s_1\), then \(d(v_{1,2})\ge d(v_{1,j})\ge 2\). Since \(G_0\) is a unicyclic graph, there exists a vertex \(v_{2,t}\in V_2\) such that \(v_{1,2}\sim v_{2,t}\) and \(v_{1,j}\not \sim v_{2,t}\). Let \(G_1=G_0-v_{1,1}v_{1,j}-v_{1,2}v_{2,t}+v_{1,1}v_{1,2}+v_{1,j}v_{2,t}\). Then \(G_1\in {\mathcal {G}}_{\pi }\). Further, we claim that \(f(v_{1,1})>f(v_{2,t})\). Otherwise \(f(v_{1,1})=f(v_{2,t})\). Then it is easy to show that for any \(u\in N(v_{1,1})\setminus \{v_0\}\), \(f(u)=f(v_{1,1})\) and \(f(v_{1,1})=\cdots =f(v_{1,s_1})\). From eigenequations we have

$$\begin{aligned} \lambda _p(G_0)f(v_{0,1})^{p-1}=\sum _{u\sim v_{0,1}}(f(v_{0,1})+f(u))^{p-1}=d(v_{0,1})(f(v_{0,1})+f(v_{1,1}))^{p-1}, \end{aligned}$$

which implies \(\frac{f(v_{1,1})}{f(v_{0,1})}=\left( \frac{\lambda _p(G_0)}{d(v_{0,1})}\right) ^{q-1}-1\); and

$$\begin{aligned} \lambda _p(G_0)f(v_{1,1})^{p-1}= & {} \sum _{u\sim v_{1,1}}(f(v_{1,1})+f(u))^{p-1}\\ {}= & {} 2^{p-1}(d(v_{1,1})-1)f(v_{1,1})^{p-1}+(f(v_{0,1})\\ {}{} & {} \quad +f(v_{1,1}))^{p-1}, \end{aligned}$$

which implies \(\frac{f(v_{0,1})}{f(v_{1,1})}=(\lambda _p(G_0)-(d(v_{1,1})-1)2^{p-1})^{q-1}-1\). On the other hand, from eigenequations, we have

$$\begin{aligned} \lambda _p(G_0)f(v_{2,t})^{p-1}= & {} \sum _{u\sim v_{2,t}}(f(u)+f(v_{2,t}))^{p-1}\le \sum _{u\sim v_{2,t}}(f(v_{2,t})+f(v_{2,t}))^{p-1}\\ {}{} & {} \quad =2^{p-1}d(v_{2,t})f(v_{2,t})^{p-1}. \end{aligned}$$

Hence \(\lambda _p(G_0)\le 2^{p-1}d(v_{2,t})\le 2^{p-1}d(v_{1,1})\le 2^{p-1}d(v_{0,1})\). Therefore \(\frac{f(v_{1,1})}{f(v_{0,1})}\le 1\) and \(\frac{f(v_{0,1})}{f(v_{1,1})}\le 1\). But \(\frac{f(v_{1,1})}{f(v_{0,1})}\times \frac{f(v_{0,1})}{f(v_{1,1})}=1\), so \(\frac{f(v_{1,1})}{f(v_{0,1})}=\frac{f(v_{0,1})}{f(v_{1,1})}=1\). Then we have \(\lambda _p(G_0)=2^{p-1}d(v_{0,1})=2^{p-1}\Delta \), which implies \(G_0\) is a regular graph, that is impossible. Since \(f(v_{1,1})>f(v_{2,t})\) and \(f(v_{1,2})\ge f(v_{1,j})\), Lemma 4 implies \(\lambda _p(G_1)>\lambda _p(G_0)\), a contradiction.

If \(1<i<j\le s_1\), then \(d(v_{1,1})\ge d(v_{1,i})\ge 2\), and there exists a vertex in \(V_2\) that is adjacent to \(v_{1,1}\). Particularly, if \(d(v_{1,1})=2\), let \(v_{2,t}\) be the unique neighbor of \(v_{1,1}\) in \(V_2\); if \(d(v_{1,1})\ge 3\), let \(v_{2,t}\) be the neighbor of \(v_{1,1}\) in \(V_2\) such that \(f(u)\ge f(v_{2,t})\) for any \(u\sim v_{1,1}\). Obviously \(f(v_{1,1})\ge f(v_{1,i})\ge f(v_{1,j})\ge f(v_{2,t})\). By the same argument as the above paragraph, we show that \(f(v_{1,1})> f(v_{2,t})\). Since \(G_0\) is a unicyclic graph, we have \(v_{1,1}\not \sim v_{1,i}\) and \(v_{1,j}\not \sim v_{2,t}\). Let \(G_2=G_0-v_{1,1}v_{2,t}-v_{1,i}v_{1,j}+v_{1,1}v_{1,i}+v_{1,j}v_{2,t}\). Then \(G_2\in {\mathcal {G}}_{\pi }\). Furthermore, we claim \(f(v_{1,1})>f(v_{1,j})\) or \(f(v_{1,i})> f(v_{2,t})\), otherwise \(f(v_{1,1})=f(v_{2,t})\), which is impossible. Hence Lemma 4 implies \(\lambda _p(G_2)>\lambda _p(G)\), a contradiction.

Case 3 \(v_{r,w}=v_{0,1}\) and \(v_{1,i}\not \sim v_{1,j}\) for all \(1\le i<j\le s_1\).

In this case, there exists two vertices \(v_{1,i}\in V_1\) and \(v_{2,j}\in V_2\) such that \(v_{1,i},v_{2,j}\in V(C)\), \(v_{1,i}\sim v_{2,j}\in E(C)\) and \(i\ge 2\). On the other hand, since \(d(v_{1,1})=d_1\ge 3\), there exists a vertex \(v_{2,t}\in V_2\) such that \(v_{2,t}\notin V(C)\), \(v_{1,1}\sim v_{2,t}\) and \(f(v_{2,t})\le f(u) \) for any \(u\in N(v_{1,1})\setminus V(C)\). Since \(G_0\) is unicyclic, we have \(v_{1,i}\not \sim v_{2,t}\) and \(v_{2,t}\not \sim v_{2,j}\). Let \(G_3=G_0-v_{1,1}v_{2,t}-v_{1,i}v_{2,j}+v_{1,1}v_{1,i}+v_{2,t}v_{2,j}\). It is clear that \(G_3\in {\mathcal {G}}_{\pi }\), \(f(v_{1,1})\ge f(v_{2,j})\) and \(f(v_{1,i})\ge f(v_{2,t})\). Furthermore, we claim \(f(v_{1,1})>f(v_{2,j})\) or \(f(v_{1,i})> f(v_{2,t})\). Otherwise \(f(v_{1,1})=f(v_{2,j})\) and \(f(v_{1,i})=f(v_{2,t})\). Then \(f(v_{1,1})=f(v_{1,i})=f(v_{2,j})=f(v_{2,t})\). Moreover, it is easy to show that for any \(u\in N(v_{1,1})\setminus \{v_{0,1}\}\), \(f(u)=f(v_{1,1})\) and \(f(v_{1,1})=\cdots =f(v_{1,s_1})\). By the same argument as Case 2, we have \(\lambda _p(G_0)=2^{p-1}d(v_{0,1})=2^{p-1}\Delta \), which implies \(G_0\) is regular, that is impossible. Hence, Lemma 4 implies \(\lambda _p(G_3)>\lambda _p(G_0)\), a contradiction.

Case 4 \(v_{r,w}=v_{1,1}\).

In this case, there exists a vertex \(v_{2,i}\in V(C)\cap V_2\) with \(v_{1,1}\sim v_{2,i}\). Since \(G_0\) is unicyclic and \(d(v_{1,2})\ge d(v_{2,i})\ge 2\), there exists a vertex \(v_{2,j}\notin V(C)\) such that \(v_{2,j}\in V_2\) and \(v_{1,2}\sim v_{2,j}\). Clearly, \(v_{2,i}\not \sim v_{2,j}\). Let \(G_4=G_0-v_{1,1}v_{2,i}-v_{1,2}v_{2,j}+v_{1,1}v_{1,2}+v_{2,i}v_{2,j}\) . By the same arguments as those in Case 3, one can verify that \(f(v_{1,1})>f(v_{2,j})\) or \(f(v_{1,2})>f(v_{2,i})\). Hence Lemma 4 implies \(\lambda _p(G_4)>\lambda _p(G)\), a contradiction.

Case 5 \(v_{r,w}\not \in \{v_{0,1},v_{1,1}\}\).

It is easy to show that \(h(v_{r,w})<h(u)\) for \(u\in V(C)\setminus \{v_{r,w}\}\). Otherwise, there exist two vertices \(v_{r,w}\) and \(v_{r,l}\) in V(C) with \(h(v_{r,w})=h(v_{r,l})=r\) such that there are two disjoint paths \(P_1\) and \(P_2\) on the cycle C from \(v_{r,w}\) to \(v_{r,l}\). On the other hand, there exist two paths \(P_3\) and \(P_4\) from \(v_{0,1}\) to \(v_{r,w}\) and \(v_{r,l}\), respectively. Then the union of the four paths \(P_1,\cdots ,P_4\) contains two cycles. Therefore, there exists a vertex \(v_{r+1,t}\in V(C)\) such that \(h(v_{r+1,t})=r+1\) and \(v_{r,w}\sim v_{r+1,t}\). Since \(d(v_{r+1,t})\ge 2\), there must exist two vertices \(v_{r,i},v_{r+1,j}\notin V(C)\) with \(h(v_{r,i})=r,h(v_{r+1,j})=r+1\) and \(i>1\) such that \(v_{r,i}\sim v_{r+1,j}\). Clearly, \(v_{r,w}\not \sim v_{r,i}\) and \(v_{r+1,t}\not \sim v_{r+1,j}\). Let \(G_5=G_0-v_{r,w}v_{r+1,t}-v_{r,i}v_{r+1,j}+v_{r,w}v_{r,i}+v_{r+1,t}v_{r+1,j}\). Since \(f(v_{r,w})\ge f(v_{r+1,j}) \) and \(f(v_{r,i})\ge f(v_{r+1,t})\), Lemma 4 implies \(\lambda _p(G_5)\ge \lambda _p(G_0)\). Moreover, \(G_5\in {\mathcal {G}}_{\pi }\) and the smallest height of vertices of the cycle in \(G_5\) is less than r. Therefore, by repeating all these process, one could get \(\lambda _p(G_0)\le \lambda _p(G_5)<\lambda _p(U_{\pi })\), a contradiction.

The proof is completed. \(\square \)

Combining Lemmas 12 and 13, one of our main results is obtained.

Theorem 1

Let \(\pi =(d_0,\cdots ,d_{n-1})\) be a positive non-increasing integer sequence with \(\sum _{i=0}^{n-1}d_i=2n\), \(d_2\ge 2\) and \(d_0\ge 3\). Then \(U_{\pi }\) is the unique unicyclic graph that has the largest signless p-Laplacian spectral radius in \({\mathcal {G}}_{\pi }\).

Recall the definition of \(x\lhd y\). The following well-known result is needed.

Lemma 14

([7]) Let \(\pi =(d_0,\cdots ,d_{n-1})\) and \(\pi '=(d_0',\cdots ,d_{n-1}')\) be two non-increasing sequences. If \(\pi \lhd \pi '\), then there exists a series of graphic sequences \(\pi _1,\cdots ,\pi _k\) such that \(\pi \lhd \pi _1\lhd \cdots \lhd \pi _k\lhd \pi '\), and only two components of \(\pi _i\) and \(\pi _{i+1}\) are different 1.

From Lemma 14, we get the following result.

Lemma 15

Let \(\pi \) and \(\pi '\) be two different degree sequences of unicyclic graphs with the same order. If \(\pi \lhd \pi '\), then \(\lambda _p(U_{\pi })<\lambda _p(U_{\pi '})\).

Proof

According to Lemma 15, we may assume that \(\pi =(d_0,\ldots ,d_{n-1})\) and \(\pi '=(d_0',\ldots ,d_{n-1}')\) with \(d_i=d_i'\) for \(i\ne s,t\), and \(d_s=d_s'-1,d_t=d_t'+1,0\le s<t\le n-1\). By Lemma 11, we can relabel the vertices of \(U_{\pi }\) as \(V(G)=\{v_0,\ldots ,v_{n-1}\}\) such that \(d(v_i)=d_i\) for \(i=0,\cdots ,n-1\) and \(f(v_0)\ge f(v_1)\ge \cdots \ge f(v_{n-1})\). If \(t=1\) or \(t=2\), then \(d_t=d_t'+1\ge 3\). If \(t\ge 3\), then \(d_t=d_t'+1\ge 2\). Hence there exists a vertex \(v_k\) with \(k>t\) such that \(v_kv_t\in E(U_{\pi })\) and \(v_kv_s\notin E(U_{\pi })\). Let \(U_1=U_{\pi }-v_kv_t+v_kv_s\). Then Lemma 2 indicates that \(\lambda _p(U_{\pi })<\lambda _p(U_1)\). Moreover, \(U_1\in {\mathcal {G}}_{\pi '}\) and thereby \(\lambda _p(U_1)<\lambda _p(U_{\pi '})\) due to Theorem 1. Thus \(\lambda _p(U_{\pi })<\lambda _p(U_{\pi '})\). \(\square \)

Combining Theorem 1 and Lemma 15, the other main result is obtained.

Theorem 2

Let G be any unicyclic graph of order n and \(\pi _0=(n-1,2,2,1,\ldots ,1)\). Then \(\lambda _p(G)\le \lambda _p(U_{\pi _0})=\lambda _0\), where \(\lambda _0\) is the only solution to \(f(x)=0\) and

$$\begin{aligned} f(x)=x-\frac{2(x-2^{p-1})}{\left( (x-2^{p-1})^{q-1}-1\right) ^{p-1}}-\frac{(n-3)x}{(x^{q-1}-1)^{p-1}}. \end{aligned}$$

Furthermore, the equality holds if and only if \(G=U_{\pi _0}\).

Proof

Theorem 1 and Lemma 15 imply \(\lambda _p(G)\le \lambda _p(U_{\pi _0})\) with equality if and only if \(G=U_{\pi _0}\). It remains to calculate \(\lambda _p(U_{\pi _0})\). By symmetry, denote by x, y and z the components of f at vertices of degree \(n-1\), 2 and 1, respectively. Therefore from eigenequations we have that

$$\begin{aligned}\left\{ \begin{array}{l} \lambda x^{p-1}=2(x+y)^{p-1}+(n-3)(x+z)^{p-1},\\ \lambda y^{p-1}=(y+y)^{p-1}+(x+y)^{p-1},\\ \lambda z^{p-1}=(x+z)^{p-1}. \end{array}\right. \end{aligned}$$

From the second and the third equation, we have \(\frac{x}{z}=\lambda ^{q-1}-1\) and \(\frac{x}{y}=(\lambda -2^{p-1})^{q-1}-1\). Combining them with the first equation, we have

$$\begin{aligned} \lambda -\frac{2(\lambda -2^{p-1})}{\left( (\lambda -2^{p-1})^{q-1}-1\right) ^{p-1}}-\frac{(n-3)\lambda }{(\lambda ^{q-1}-1)^{p-1}}=0 . \end{aligned}$$

Thus, \(\lambda \) is the solution to \(f(x)=0\) for \(x>2^{p-1}+1\). Note that f(x) could be rewritten as

$$\begin{aligned} f(x)=x-\frac{2}{\left( 1-\frac{1}{(x-2^{p-1})^{q-1}}\right) ^{p-1}}-\frac{n-3}{\left( 1-\frac{1}{x^{q-1}}\right) ^{p-1}}. \end{aligned}$$

It is easy to see that f(x) is a continuous monotonically increasing function in \((2^{p-1}+1,+\infty )\), \(\lim _{x\rightarrow (2^{p-1}+1)}f(x)=-\infty \), and \(\lim _{x\rightarrow +\infty }f(x)=+\infty \). By Rolle’s Theorem, \(f(x)=0\) has only one solution \(\lambda _0\) in the interval \((2^{p-1}+1,+\infty )\), and it is the largest root of f(x). It completes the proof. \(\square \)