1 Introduction

Throughout this paper, we consider only simple connected graphs. Let \(G=(V,E)\) be a graph with vertex set \(V=\{v_1,v_2,\ldots ,v_n\}\). Two vertices \(v_i\) and \(v_j\) of G are called adjacent, denoted by \(v_i\sim v_j\), if they are connected by an edge. The adjacency matrix A(G) of G is a square matrix of order n, whose entry \(a_{i,j}\) is defined as follows: \(a_{i,j}=1\) if \(v_i\sim v_j\), and \(a_{i,j}=0\) otherwise. Let D(G) be the diagonal degree matrix of G. The matrix \(Q(G)=D(G)+A(G)\) is called the signless Laplacian matrix of G. The Q-spectrum of G is defined to

$$\begin{aligned} S(G) = (q_1 (G),q_2 (G), \ldots ,q_n (G)), \end{aligned}$$

where \(q_1 (G)\ge q_2 (G)\ge \cdots \ge q_n (G)\) are the eigenvalues of Q(G). They also are the roots of the Q-polynomial \(f_Q(\lambda )=\det (\lambda I_n-Q(G))\) of G. If it is clear from the context, then we use Q and \(q_i\) instead of Q(G) and \(q_i(G)\), respectively. Denote Q-polynomial of the complement graph \(\overline{G}\) of G by \(f_{\overline{Q}}(\lambda )=\det (\lambda I_n-Q(\overline{G}))\). For more information on the Q-spectrum and Q-polynomial, we refer the reader to [1, 5,6,7,8,9,10, 16] and the references therein.

Let G be a simple connected graph and A(G) be its adjacency matrix. A walk (of length k) in G is an alternating sequence \(v_1,e_1,v_2,e_2,\ldots ,v_k, e_k, v_{k+1}\) of vertices \(v_1, v_2,\ldots , v_{k+1}\) and edges \(e_1, e_2,\ldots , e_k\) such that for any \(i=1,2,\ldots , k\) the vertices \(v_i\) and \(v_{i+1}\) are distinct end-vertices of the edge \(e_i\). It is well known [10] that the (ij)-entry of the matrix \(A(G)^k\) equals the number of walks of length k starting at vertex \(v_i\) and terminating at vertex \(v_j\). Let \(M_k\) denote the total number of all walks of length k in G. \(H_G(t)=\sum \nolimits _{k = 0}^\infty {M_k t^k }\) is called the generating function of the numbers \(M_k\) of all walks of length k in G. In [10], the generating function \(H_G(t)\) is expressed in terms of the characteristic polynomials of the graph G and its complement \(\overline{G}\), and many spectral properties are obtained. For example, the characteristic polynomials of some graphs are computed by employing the generating function \(H_G(t)\) in [10].

For a simple connected graph G, let Q(G) be its signless Laplacian matrix. Similarly, a semi-edge walk (of length k) [6] in an (undirected) graph G is an alternating sequence \(v_1,e_1,v_2,e_2,\ldots ,v_k, e_k, v_{k+1}\) of vertices \(v_1, v_2,\ldots , v_{k+1}\) and edges \(e_1, e_2,\ldots , e_k\) such that for any \(i=1,2,\ldots , k\) the vertices \(v_i\) and \(v_{i+1}\) are end-vertices (not necessarily distinct) of the edge \(e_i\). Let \(Q(G)^k=(q_{ij}^{(k)})\) and \(N_k(i,j)\) denote the number of semi-edge walks of length k starting at vertex \(v_i\) and terminating at vertex \(v_j\) in G. It is proved [6] that the (ij)-entry of the matrix \(Q(G)^k\) equals the number of semi-edge walks of length k starting at vertex \(v_i\) and terminating at vertex \(v_j\), that is, \(q_{ij}^{(k)}=N_k(i,j)\).

The Q-generating function of the numbers \(N_k\) of semi-edge walks of length k in G is defined to \(W_Q(t)=\sum \nolimits _{k = 0}^\infty {N_k t^k }\), where \(N_k\) denotes the total number of semi-edge walks of length k in G. The following problem seems interesting:

Study the Q-generating function \(W_Q(t)\) for the numbers \(N_k\) of semi-edge walks of length k in G and compute the Q-polynomials of some graphs by employing the Q-generating function \(W_Q(t)\).

This paper reveals that the Q-generating function \(W_Q(t)\) may be expressed in terms of the Q-polynomials of the graph G and its complement \(\overline{G}\). Using this result, we obtain some Q-spectral properties of graphs and compute the Q-polynomials for some graphs obtained by the use of some operation on graphs, such as the complement of a graph, the join of two graphs and the (edge)corona of two graph.

As another application of the Q-generating function \(W_Q(t)\), we also give a combinatorial interpretation of the Q-coronal of a graph G, which is defined to be the sum of the entries of the matrix \((\lambda I_n-Q(G))^{-1}\). This result may be used to obtain the many alternative calculations of the Q-polynomials of the (edge)corona of two graphs. Further, we also compute the Q-generating functions of the join of two graphs and complete multipartite graphs.

2 The Q-generating Functions and Q-polynomials of Graphs

For a simple connected graph G, Proposition 2.1 reveals that the Q-generating function \(W_Q(t)\) may be expressed in terms of the Q-polynomials of the graph G and its complement \(\overline{G}\).

Proposition 2.1

Let G be a simple connected graph on n vertices. Then, for any \(-\frac{1}{q_1}<t<\frac{1}{q_1}\), we have

$$\begin{aligned} W_Q (t) = \frac{1}{t}\left( {( - 1)^n \frac{{f_{ \overline{Q} } \left( {n - 2 - \frac{1}{t}} \right) }}{{f_Q \left( {\frac{1}{t}} \right) }} - 1} \right) . \end{aligned}$$

Proof

The proof is totally similar to Theorem 1.11 in [10]. Let B be a nonsingular n-by-n square matrix and J be a square matrix each of whose entries is 1. Then, for arbitrary number x,

$$\begin{aligned} \det (B + xJ) = \det B + x\;\mathrm{{sum}}(\mathrm{{adj}}B), \end{aligned}$$
(1)

where \(\text {sum}(K)\) denotes the sum of all entries of a matrix K and \(\text {adj}K\) denotes its adjoint matrix.

Now, from Theorem 4.1 in [6], one gets \(N_k=\text {sum}(Q^k)\). Note that, for \(-\frac{1}{q_1}<t<\frac{1}{q_1}\),

$$\begin{aligned} \sum \limits _{k = 0}^\infty {Q^k t^k } = (I - tQ)^{ - 1} = \frac{{\text {adj}(I - tQ)}}{{\det (I - tQ)}}. \end{aligned}$$

Thus, we obtain

$$\begin{aligned} W_Q (t) = \sum \limits _{k = 0}^\infty {N_k t^k } = \sum \limits _{k = 0}^\infty {\text {sum}(Q^k )t^k } = \frac{{\text {sum}(\text {adj}(I - tQ))}}{{\det (I - tQ)}}. \end{aligned}$$

With \(B=I-tQ\), \(x=t\), formula (1) yields

$$\begin{aligned} \text {sum}(\text {adj}(I - tQ))&= \frac{1}{t}\left( {\det (I - tQ + tJ) - \det (I - tQ)} \right) \\&= \frac{1}{t}\left( {\det ((1 - (n - 2)t)I + t\overline{Q} ) - \det (I - tQ)} \right) , \end{aligned}$$

where \(\overline{Q}=(n-2)I+J-Q\) is the signless Laplacian matrix of the complement \(\overline{G}\) of G. Hence,

$$\begin{aligned} W_Q (t)&= \frac{1}{t}\left( {\frac{{\det ((1 - (n - 2)t)I + t\overline{Q} )}}{{\det (I - tQ)}} - 1} \right) \\&= \frac{1}{t}\left( {( - 1)^n \frac{{\det \left( {(n - 2 - \frac{1}{t})I - \overline{Q} } \right) }}{{\det \left( {\frac{1}{t}I - Q} \right) }} - 1} \right) \\&= \frac{1}{t}\left( {( - 1)^n \frac{{f_{\overline{Q} } \left( {n - 2 - \frac{1}{t}} \right) }}{{f_Q \left( {\frac{1}{t}} \right) }} - 1} \right) . \end{aligned}$$

This completes the proof of Proposition 2.1. \(\square \)

Theorem 2.2

Let G be an r-regular graph on n vertices and \(\overline{G}\) be its complement graph. Then

$$\begin{aligned} f_{\overline{Q} } (\lambda ) = ( - 1)^n \left( {1 + \frac{n}{{n - 2 - 2r - \lambda }}} \right) f_Q (n - 2 - \lambda ). \end{aligned}$$

Moreover, if the signless Laplacian spectrum of G is \(2r,q_2,\ldots ,q_n\), then the signless Laplacian spectrum of \(\overline{G}\) is \(2(n-r-1),n-2-q_2,\ldots ,n-2-q_n\).

Proof

Since G is an r-regular graph on n vertices, then \(\text {sum}(A(G)^l)=nr^l\) for any integer l (see [10]). Thus, the total number \(N_k\) of semi-edge walks of length k in G equals

$$\begin{aligned} N_k = \mathrm{{sum}}((rI_n + A(G))^k ) = \mathrm{{sum}}\sum \limits _{i = 0}^k {\left( {\begin{array}{*{20}c} k \\ i \\ \end{array}} \right) r^i (A(G))^{k - i} } = \sum \limits _{i = 0}^k {\left( {\begin{array}{*{20}c} k \\ i \\ \end{array}} \right) nr^k } = n(2r)^k . \end{aligned}$$

Hence, for \(|t| < \frac{1}{{2r}}\),

$$\begin{aligned} W_Q (t) = \sum \limits _{k = 0}^\infty {N_k t^k } = \sum \limits _{k = 0}^\infty {n(2r)^k t^k } = \frac{n}{{1 - 2rt}}. \end{aligned}$$

From Proposition 2.1, one has

$$\begin{aligned} \frac{1}{t}\left( {( - 1)^n \frac{{f_{\overline{Q} } \left( {n - 2 - \frac{1}{t}} \right) }}{{f_Q \left( {\frac{1}{t}} \right) }} - 1} \right) = \frac{n}{{1 - 2rt}}. \end{aligned}$$
(2)

With \(\lambda =(n-2)-\frac{1}{t}\), that is, \(\frac{1}{t}=(n-2)-\lambda \) in (2), we obtain the required result. Moreover, if the signless Laplacian spectrum of G contains \(2r,q_2,\ldots ,q_n\), then it is easy to see that the signless Laplacian spectrum of \(\overline{G}\) contains \(2(n-r-1),n-2-q_2,\ldots ,n-2-q_n\). \(\square \)

Let \(G_1\) and \(G_2\) be two graphs with disjoint vertex sets \(V(G_1)\) and \(V(G_2)\), and edge sets \(E(G_1)\) and \(E(G_2)\), respectively. The join \(G_1\vee G_2\) of \(G_1\) and \(G_2\) is the direct sum of \(G_1\) and \(G_2\) together with all the edges joining \(V(G_1)\) and \(V(G_2)\).

Theorem 2.3

Let \(G_1\) and \(G_2\) be two simple connected graphs with \(n_1\) and \(n_2\) vertices, respectively. Then

$$\begin{aligned} f_{Q(G_1 \vee G_2 )}&= ( - 1)^{n_2 } f_{Q_1 } (\lambda - n_2 )f_{\overline{Q_2 } } (n_1 + n_2 - \lambda - 2)\\&\quad + ( - 1)^{n_1 } f_{Q_2 } (\lambda - n_1 )f_{\overline{Q_1 } } (n_1 + n_2 - \lambda - 2)\\&\quad - ( - 1)^{n_1 + n_2 } f_{\overline{Q_1 } } (n_1 + n_2 - \lambda - 2)f_{\overline{Q_2 } } (n_1 + n_2 - \lambda - 2), \end{aligned}$$

where \(Q_1\) and \(Q_2\) are the signless Laplacian matrices of \(G_1\) and \(G_2\), respectively.

Proof

Clearly, \(W_{Q(G_1\oplus G_2)}(t)=W_{Q_1}(t)+W_{Q_2}(t)\), where \(G_1\oplus G_2\) denotes the direct sum of \(G_1\) and \(G_2\). Proposition 2.1 implies that, for \(|t|<\min \{\frac{1}{q_1(G_1)},\frac{1}{q_1(G_2)}\}\),

$$\begin{aligned}&\frac{1}{t}\left( {( - 1)^{n_1 + n_2 } \frac{{f_{\overline{Q} (G_1 \oplus G_2 )} \left( {n_1 + n_2 - 2 - \frac{1}{t}} \right) }}{{f_{Q_1 } \left( {\frac{1}{t}} \right) f_{Q_2 } \left( {\frac{1}{t}} \right) }} - 1} \right) \nonumber \\&\quad = \sum \limits _{i = 1}^2 {\frac{1}{t}\left( {( - 1)^{n_i } \frac{{f_{\overline{Q_i } } \left( {n_i - 2 - \frac{1}{t}} \right) }}{{f_{Q_i } \left( {\frac{1}{t}} \right) }} - 1} \right) }. \end{aligned}$$
(3)

Note that \(\overline{G_1\oplus G_2}=\overline{G_1}\vee \overline{G_2}\). Setting \({n_1 + n_2 - 2 - \frac{1}{t}}=\lambda \) and substituting \(\overline{G_1}\), \(\overline{G_2}\) for \(G_1\), \(G_2\) in (3), we obtain the required result. \(\square \)

Corollary 2.4

[11] For \(i=1,2\), let \(G_i\) be a regular graph of degree \(r_i\) with \(n_i\) vertices. Then

$$\begin{aligned} f_{Q(G_1 \vee G_2 )} = \left( {1 - \frac{{n_1 n_2 }}{{(\lambda - n_1 - 2r_2 )(\lambda - n_2 - 2r_1 )}}} \right) f_{Q_1 } (\lambda - n_2 )f_{Q_2 } (\lambda - n_1 ). \end{aligned}$$

Proof

This is an immediate consequence of Theorems 2.2 and 2.3, omitted. \(\square \)

Let \(Q(G)=(q_{ij})_{n\times n}\) be the signless Laplacian of a simple graph G. Assume that \(x_1,x_2,\ldots ,x_n\) are mutually orthogonal normalized eigenvectors of Q(G) associated with eigenvalues \(q_1,q_2,\ldots ,q_n\), respectively. Also let \(\Lambda =\text {diag}(q_1,q_2,\ldots ,q_n)\) and \(P=(x_1,x_2,\ldots ,x_n)=(x_{ij})_{n\times n}\). Then \(Q(G)=P\Lambda P^T\), which implies that the number \(N_k\) of all semi-edge walks of length k in G equals

$$\begin{aligned} N_k = \sum \limits _{i,j} {N_k (i,j)} = \sum \limits _{i,j} {q_{ij}^{(k)} } = \sum \limits _{l = 1}^n {\left( {\sum \limits _{i = 1}^n {x_{il} } }\right) ^2 q_l^k }. \end{aligned}$$

Thus, we arrive at:

Theorem 2.5

The total number \(N_k\) of semi-edge walks of length k in G equals

$$\begin{aligned} N_k = \sum \limits _{l = 1}^n {\gamma _l q_l^k } \;\;\;\; (k = 0,1,2, \ldots ), \end{aligned}$$

where \(\gamma _l = \left( {\sum \limits _{i = 1}^n {x_{il} } } \right) ^2.\)

It is clear to see that \(N_k=n(2r)^k\) whenever G is an r-regular graph with n vertices. In this case, the signless Laplacian spectral radius \(q_1\) of G is equal to

$$\begin{aligned} q_1 = \root k \of {{\frac{{N_k }}{n}}} = 2r. \end{aligned}$$

In general case, we have Theorem 2.6, which is analogous to an existing result related to the adjacency spectrum (see Theorem 1.12 in [10]).

Theorem 2.6

$$\begin{aligned} q_1 = \mathop {\lim }\limits _{k \rightarrow \infty } \root k \of {{\frac{{N_k }}{n}}}=\mathop {\lim }\limits _{k \rightarrow \infty } \root k \of {{N_k }}. \end{aligned}$$

Proof

Firstly, it is easy to see that

$$\begin{aligned} q_1 \root k \of {{\frac{{\gamma _1 }}{n}}} \le \root k \of {{\frac{{N_k }}{n}}} = \root k \of {{\frac{{\sum \nolimits _{l = 1}^n {\gamma _l q_l^k } }}{n}}} \le q_1 \root k \of {{\frac{{\sum \nolimits _{l = 1}^n {\gamma _l } }}{n}}}. \end{aligned}$$

The squeeze theorem implies that

$$\begin{aligned} q_1 = \mathop {\lim }\limits _{k \rightarrow \infty } \root k \of {{\frac{{N_k }}{n}}}. \end{aligned}$$

Note that \(\mathop {\lim }\nolimits _{k \rightarrow \infty } \root k \of {{n }}=1\), the required result follows. \(\square \)

The following statement and its proof is analogous to an existing result related to the adjacency spectrum (see Theorem 2.5 in [10]).

Theorem 2.7

If the Q-spectrum of a graph G contains a signless Laplacian eigenvalue \(q_0\) with multiplicity \(s\ge 2\), then the Q-spectrum of its complementary graph \(\overline{G}\) contains a signless Laplacian eigenvalue \(n-2-q_0\) with multiplicity \(\tau \), where \(s-1\le \tau \le s+1\).

Proof

By Theorem 2.5, the Q-generating function of the numbers \(N_k\) of semi-edge walks of length k in G is

$$\begin{aligned} W_Q (t)&= \sum \limits _{k = 0}^\infty {N_k t^k } = \sum \limits _{k = 0}^\infty {\left( {\sum \limits _{l = 1}^n {\gamma _l q_l^k } } \right) t^k } \\&= \sum \limits _{l = 1}^n {\gamma _l \left( {\sum \limits _{k = 0}^\infty {q_l^k t^k } } \right) } = \sum \limits _{l = 1}^n {\frac{{\gamma _l }}{{1 - tq_l }}}\;\;\text {for}\;\; {-\frac{1}{{q_1 }}<t < \frac{1}{{q_1 }}}. \end{aligned}$$

Set

$$\begin{aligned} \Phi (u) = ( - 1)^n \frac{{f_{\overline{Q} } \left( {n - 2 - u} \right) }}{{f_Q (u)}}. \end{aligned}$$

From Proposition 2.1, one has

$$\begin{aligned} \Phi (u) = 1 + \frac{1}{u}W_Q \left( {\frac{1}{u}} \right) = 1 + \sum \limits _{l = 1}^n {\frac{{\gamma _l }}{{u - q_l }}} = \frac{{\varphi _1 (u)}}{{\varphi _2 (u)}}, \end{aligned}$$

where \(\varphi _1 (u)\) and \(\varphi _2 (u)\) are polynomials in u and the roots of \(\varphi _2 (u)\) are all simple. Note that \(q_0\) is a signless Laplacian eigenvalue of G with multiplicity \(s\ge 2\). Then \(f_Q(u)=(u-q_0)^sg(u)\), where \(g(q_0)\ne 0\). Therefore,

$$\begin{aligned} \Phi (u) = ( - 1)^n \frac{{f_{\overline{Q} } \left( {n - 2 - u} \right) }}{{(u - q_0 )^s g(u)}} = \frac{{\varphi _1 (u)}}{{\varphi _2 (u)}}, \end{aligned}$$

which implies that \(f_{\overline{Q} } \left( {n - 2 - u} \right) \) \((u - q_0 )^\tau \), \(\tau \ge s-1\) as the roots of \(\varphi _2 (u)\) are all simple. Thus, \(f_{\overline{Q} } (u )\) must have a factor \((u - (n-2-q_0 ))^\tau \). Hence, the Q-spectrum of the complementary graph \(\overline{G}\) contains a signless Laplacian eigenvalue \(n-2-q_0\) with multiplicity \(\tau \ge s-1\).

Next, we shall prove \(\tau \le s+1\). Assume that the Q-spectrum of the complementary graph \(\overline{G}\) contains a signless Laplacian eigenvalue \(n-2-q_0\) with multiplicity \(\tau > s+1\). According to the above statement, \(\overline{\overline{G}}=G\) contains a signless Laplacian eigenvalue \(n-2-(n-2-q_0)=q_0\) with multiplicity \(r\ge \tau -1>s+1-1=s\), a contradiction. Hence, \(\tau \le s+1\).

This completes the proof of theorem. \(\square \)

Next, we shall consider another applications of the Q-generating function \(W_Q(t)\) of the numbers \(N_k\) of semi-edge walks of length k in G. First we recall the concepts of the corona and edge corona of two graphs. Let \(G_1\) and \(G_2\) be two graphs on disjoint sets of \(n_1\) and \(n_2\) vertices, \(m_1\) and \(m_2\) edges, respectively. The corona \(G_1\circ G_2\) [12] of \(G_1\) and \(G_2\) is the graph obtained by taking one copy of \(G_1\) and \(n_1\) copies of \(G_2\), and then joining the ith vertex of \(G_1\) to every vertex in the ith copy of \(G_2\). The edge corona \(G_1\diamond G_2\) [13] of \(G_1\) and \(G_2\) is the graph obtained by taking one copy of \(G_1\) and \(m_1\) copies of \(G_2\), and then joining two end-vertices of the ith edge of \(G_1\) to every vertex in the ith copy of \(G_2\).

In [3], Cui and Tian introduced a new invariant, the Q-coronal \(\Gamma _Q(\lambda )\) of a graph G of order n. It is defined to be the sum of the entries of the matrix \((\lambda I_n-Q)^{-1}\), where \(I_n\) and Q are the identity matrix of order n and the signless Laplacian matrix of G, respectively. Using this concept, we computed the Q-polynomials of the corona \(G_1\circ G_2\) and edge corona \(G_1\diamond G_2\) (for more details about this aspect, see [2,3,4, 13,14,15, 17, 18]) as follows.

Theorem 2.8

[3] Let \(G_1\) and \(G_2\) be two graphs on \(n_1\) and \(n_2\) vertices, respectively. Also let \(\Gamma _{Q_2} (\lambda )\) be the \(Q_2\)-coronal of \(G_2\) and \(G=G_1\circ G_2\). Then the Q-polynomial of G is

$$\begin{aligned} f_Q (\lambda ) = (f_{Q_2 } (\lambda - 1))^{n_1 } f_{Q_1 } (\lambda - n_2 - \Gamma _{Q_2 } (\lambda - 1)). \end{aligned}$$

Theorem 2.9

[3] Let \(G_1\) be an \(r_1\)-regular graph with \(n_1\) vertices, \(m_1\) edges and \(G_2\) be any graph with \(n_2\) vertices, \(m_2\) edges. Also let \(\Gamma _{Q_2} (\lambda )\) be the \(Q_2\)-coronal of \(G_2\) and \(G=G_1\diamond G_2\). If \(\lambda \) is not a pole of \(\Gamma _{Q_2} (\lambda -2)\), then the Q-polynomial of G is

$$\begin{aligned} f_Q (\lambda ) = (f_{Q_2 } (\lambda -2))^{m_1 } f_{Q_1 } \left( \frac{\lambda -r_1 n_2}{1+ \Gamma _{Q_2 } (\lambda - 2)} \right) (1+ \Gamma _{Q_2 } (\lambda - 2))^{n_1}. \end{aligned}$$

It is well known that it is difficult for us to compute the inverse of matrices, especially high-order matrices, which results in a difficulty when we need to compute the Q-coronal \(\Gamma _Q(\lambda )\) in Theorems 2.8 and 2.9. In [3], we computed the Q-coronal of some special graphs and gave the Q-polynomials of their (edge)coronae.

Next, we shall give a combinatorial interpretation of the Q-coronal of a graph G of order n, which is used to obtain the many alternative calculations of the Q-polynomials of the corona \(G_1\circ G_2\) and edge corona \(G_1\diamond G_2\) for any graphs \(G_1\) and \(G_2\).

Proposition 2.10

Let G be a simple connected graph of order n. Then its Q-coronal equals

$$\begin{aligned} \Gamma _Q (\lambda ) = - 1 + ( - 1)^n \frac{{f_{\overline{Q} } \left( {n - 2 - \lambda } \right) }}{{f_Q (\lambda )}}. \end{aligned}$$

Proof

Let Q be the signless Laplacian matrix of G and \(\mathbf{1} _n\) denote the column n-vector, whose each element equals 1. By a simple calculation,

$$\begin{aligned} \Gamma _Q (\lambda )&= \mathbf{1} _n^T (\lambda I_n - Q)^{ - 1} \mathbf{1} _n \nonumber \\&= \lambda ^{ - 1} \mathbf{1} _n^T (I_n - \lambda ^{ - 1} Q)^{ - 1} \mathbf{1} _n \nonumber \\&= \frac{1}{\lambda }{} \mathbf{1} _n^T \left( {\sum \limits _{k = 0}^\infty {Q^k \left( {\frac{1}{\lambda }} \right) ^k } } \right) \mathbf{1} _n \nonumber \\&= \frac{1}{\lambda }\sum \limits _{k = 0}^\infty {\left( \mathbf{1 _n^T Q^k \mathbf{1} _n } \right) \left( {\frac{1}{\lambda }} \right) ^k }. \end{aligned}$$
(4)

Since the sum \(\mathbf{1} _n^T Q^k \mathbf{1} _n \) of all elements of \(Q^k\) is the total number \(N_k\) of all semi-edge walks of length k in G, then equality (4) becomes

$$\begin{aligned} \Gamma _Q (\lambda ) = \frac{1}{\lambda }\sum \limits _{k = 0}^\infty {N_k \left( {\frac{1}{\lambda }} \right) ^k } = \frac{1}{\lambda }W_Q \left( {\frac{1}{\lambda }} \right) . \end{aligned}$$

From Proposition 2.1, the required result follows. \(\square \)

Now applying Proposition 2.10, Theorems 2.8 and 2.9 may be rewritten as Theorems 2.11 and 2.12, respectively.

Theorem 2.11

Let \(G_1\) and \(G_2\) be two graphs on \(n_1\) and \(n_2\) vertices, respectively. Also let \(G=G_1\circ G_2\). Then the Q-polynomial of G is

$$\begin{aligned} f_Q (\lambda ) = (f_{Q_2 } (\lambda - 1))^{n_1 } f_{Q_1 }\left( \lambda - n_2 + 1 -( - 1)^{n_2} \frac{{f_{\overline{Q}_2 } \left( {n_2 - \lambda -1} \right) }}{{f_{Q_2} (\lambda -1 )}}\right) . \end{aligned}$$

Theorem 2.12

Let \(G_1\) be an \(r_1\)-regular graph with \(n_1\) vertices, \(m_1\) edges and \(G_2\) be any graph with \(n_2\) vertices, \(m_2\) edges. Also let \(G=G_1\diamond G_2\). Then the Q-polynomial of G is

$$\begin{aligned} f_Q (\lambda ) = (f_{Q_2 } (\lambda -2))^{m_1 } f_{Q_1 } \left( ( - 1)^{n_2}\frac{(\lambda -r_1 n_2)\cdot {f_{Q_2} (\lambda -2 )}}{ {f_{\overline{Q}_2 } ( {n_2 - \lambda } )}} \right) \left( ( - 1)^{n_2} \frac{{f_{\overline{Q}_2 } \left( {n_2 - \lambda } \right) }}{{f_{Q_2} (\lambda -2 )}}\right) ^{n_1}. \end{aligned}$$

Proposition 2.13 exhibits the Q-coronal of the join \(G_1\vee G_2\) of two regular graphs \(G_1\) and \(G_2\).

Proposition 2.13

Let \(G_1\) be an \(r_1\)-regular graph on \(n_1\) vertices and \(G_2\) be an \(r_2\)-regular graph on \(n_2\) vertices. Also let \(G=G_1\vee G_2\). Then

$$\begin{aligned} \Gamma _Q (\lambda ) = \frac{{(\lambda - n_2 - 2r_1 )n_2 + (\lambda - n_1 - 2r_2 )n_1 + 2n_1 n_2 }}{{(\lambda - n_2 - 2r_1 )(\lambda - n_1 - 2r_2 ) - n_1 n_2 }}. \end{aligned}$$

Proof

This follows directly from Theorem 2.2, Corollary  2.4 and Proposition 2.10. Namely, from Theorem 2.2, we have

$$\begin{aligned} f_{\overline{Q}_i } (\lambda ) = ( - 1)^{n_i} \left( {1 + \frac{n_i}{{n_i - 2 - 2r_i - \lambda }}} \right) f_{Q_i} (n_i - 2 - \lambda ),\quad (i=1,2). \end{aligned}$$

It follows from \(f_{\overline{Q} } (\lambda ) =f_{\overline{Q}_1 } (\lambda )f_{\overline{Q}_2 } (\lambda )\) that

$$\begin{aligned} f_{\overline{Q} } (n - 2 - \lambda )= & {} ( - 1)^{n_1 + n_2 } \left( {1 + \frac{{n_1 }}{{\lambda - n_2 - 2r_1 }}} \right) \left( {1 + \frac{{n_2 }}{{\lambda - n_1 - 2r_2 }}} \right) \\&f_{Q_1 } (\lambda - n_2 )f_{Q_2 } (\lambda - n_1 ). \end{aligned}$$

By Corollary 2.4, one gets

$$\begin{aligned} f_{Q}(\lambda ) = \left( {1 - \frac{{n_1 n_2 }}{{(\lambda - n_1 - 2r_2 )(\lambda - n_2 - 2r_1 )}}} \right) f_{Q_1 } (\lambda - n_2 )f_{Q_2 } (\lambda - n_1 ). \end{aligned}$$

Now the result follows easily from Proposition 2.10. \(\square \)

Next, we shall derive the Q-generating function for some graphs obtained by the use of some operation on graphs, such as the complement of a graph, the direct sum and the join of two graphs.

Theorem 2.14

For the Q-generating function \(W_Q(t)\) for the numbers \(N_k\) of semi-edge walks of length k in a graph G, we have

$$\begin{aligned} W_{\overline{Q} } (t)= & {} \frac{{ - W_Q \left( {\frac{t}{{(n - 2)t - 1}}} \right) }}{{(n - 2)t - 1 + tW_Q \left( {\frac{t}{{(n - 2)t - 1}}} \right) }}, \end{aligned}$$
(5)
$$\begin{aligned} W_{Q_1 \oplus Q_2 } (t)= & {} W_{Q_1 } (t) + W_{Q_2 } (t), \end{aligned}$$
(6)
$$\begin{aligned} W_{Q_1 \vee Q_2 } (t)= & {} \frac{M}{{1 - tM}}, \end{aligned}$$
(7)

where

$$\begin{aligned} M =\sum _{i=1}^2\frac{W_{Q_i}(\frac{t}{(n_i-n)t+1})}{(n_i-n)t+1+tW_{Q_i}(\frac{t}{(n_i-n)t+1})}. \end{aligned}$$

Proof

From Proposition 2.1, one has

$$\begin{aligned} W_{\overline{Q} } (t) = \frac{1}{t}\left( {( - 1)^n \frac{{f_Q \left( {n - 2 - \frac{1}{t}} \right) }}{{f_{\overline{Q} } \left( {\frac{1}{t}} \right) }} - 1} \right) \end{aligned}$$

and

$$\begin{aligned} W_Q \left( {\frac{1}{{n - 2 - \frac{1}{t}}}} \right) = \left( {n - 2 - \frac{1}{t}} \right) \left( {( - 1)^n \frac{{f_{\overline{Q} } \left( {\frac{1}{t}} \right) }}{{f_Q \left( {n - 2 - \frac{1}{t}} \right) }} - 1} \right) , \end{aligned}$$

which implies that the required result (5). Formula (6) is obvious. Next, we shall prove (7). According to (5) and (6), one gets

$$\begin{aligned} W_{Q_1 \vee Q_2 } (t)&= W_{\overline{\overline{Q_1 } \oplus \overline{Q_2 } } } (t)\nonumber \\&= \frac{{ - W_{\overline{Q_1 } \oplus \overline{Q_2 } } \left( {\frac{t}{{(n - 2)t - 1}}} \right) }}{{(n - 2)t - 1 + tW_{\overline{Q_1 } \oplus \overline{Q_2 } } \left( {\frac{t}{{(n - 2)t - 1}}} \right) }}\nonumber \\&= - \frac{{W_{\overline{Q_1 } } \left( {\frac{t}{{(n - 2)t - 1}}} \right) + W_{\overline{Q_2 } } \left( {\frac{t}{{(n - 2)t - 1}}} \right) }}{{(n - 2)t - 1 + t\left( {W_{\overline{Q_1 } } \left( {\frac{t}{{(n - 2)t - 1}}} \right) + W_{\overline{Q_2 } } \left( {\frac{t}{{(n - 2)t - 1}}} \right) } \right) }}. \end{aligned}$$
(8)

For \(i=1,2\), formula (5) implies that

$$\begin{aligned} W_{\overline{Q_i}}\left( \frac{t}{(n-2)t-1}\right)&=\frac{-W_{Q_i}(\frac{t}{(n_i-n)t+1})}{(n_i-2)\frac{t}{(n-2)t-1}-1+\frac{t}{(n-2)t-1}W_{Q_i}(\frac{t}{(n_i-n)t+1})}\nonumber \\&=\frac{-((n-2)t-1)W_{Q_i}(\frac{t}{(n_i-n)t+1})}{(n_i-n)t+1+tW_{Q_i}(\frac{t}{(n_i-n)t+1})}. \end{aligned}$$
(9)

Substituting (9) back into (8), we obtain the required result (7). \(\square \)

Remark 2.15

In view of formulas (5) and (6), the formula in (7) may generalized to the case \(k>2\), that is,

$$\begin{aligned} W_{Q_1 \vee Q_2 \vee \cdots \vee Q_k} (t) = \frac{M}{{1 - tM}}, \end{aligned}$$
(10)

where

$$\begin{aligned} M=\sum _{i=1}^k\frac{W_{Q_i}(\frac{t}{(n_i-n)t+1})}{(n_i-n)t+1+tW_{Q_i}(\frac{t}{(n_i-n)t+1})}. \end{aligned}$$

Example 2.16

Consider the complete multipartite graph \(G=K_{n_1,n_2,\ldots ,n_k}\), which can be represented as the join of graphs \(G_1, G_2 \ldots , G_k\), all of which contain only isolated vertices. For an r-regular graph G, its Q-generating function \(W_Q(t)=\frac{n}{1-2rt}\) for the numbers \(N_k\) of semi-edge walks of length k in G (see the proof of Theorem 2.2). Hence, the \(Q_i\)-generating function for the numbers \(N_k\) of semi-edge walks of length k in \(G_i\) equals \(n_i\) for \(i=1,2,\ldots ,k\). Now applying (10), we obtain

$$\begin{aligned} W_Q (t) = \left( {\left( {\sum \limits _{i = 1}^k {\frac{{n_i }}{{(n_i - n)t + 1 + tn_i }}} } \right) ^{ - 1} - t} \right) ^{ - 1}. \end{aligned}$$

According to the proof of Proposition 2.10, the Q-coronal of the complete multipartite graph \(G=K_{n_1,n_2,\ldots ,n_k}\) equals

$$\begin{aligned} \Gamma _Q (\lambda ) = \left( {\left( {\sum \limits _{i = 1}^k {\frac{{n_i }}{{\lambda - n + 2n_i }}} } \right) ^{ - 1} - 1} \right) ^{ - 1}. \end{aligned}$$

Finally, Liu and Lu [14] introduced the definitions of the subdivision-vertex neighbourhood corona and subdivision-edge neighbourhood corona for two graphs \(G_1\) and \(G_2\), and their Q-polynomials are determined by using the Q-coronal of \(G_2\). Clearly, Applying the combinatorial interpretation of the Q-coronal of graphs (see Proposition 2.10), we may obtain many alternative calculations of the Q-polynomials of the subdivision-vertex neighbourhood corona and subdivision-edge neighbourhood corona of \(G_1\) and \(G_2\). These contents are omitted.