1 Introduction

We consider finite simple graphs and use standard terminology and notations. Denote by V(G) and E(G) the vertex set and edge set of a graph G. The order of a graph is its number of vertices, and the size is its number of edges. For a vertex v in a graph, we denote by d(v) and N(v) the degree of v and the neighborhood of v in G,  respectively. For \(S\subseteq V(G),\) we denote by \(N_S(v)\) the set \(S\cap N(v)\) and \(d_S(v)=|N_S(v)|.\) For two vertices u and v, we use the symbol \(u\leftrightarrow v\) to mean that u and v are adjacent and use \(u\nleftrightarrow v\) to mean that u and v are nonadjacent. For graphs, we will use equality up to isomorphism, so \(G_1=G_2\) means that \(G_1\) and \(G_2\) are isomorphic. \({\overline{G}}\) denotes the complement of a graph G. For two graphs G and H\(G\vee H\) denotes the join of G and H,  which is obtained from the disjoint union \(G+H\) by adding edges joining every vertex of G to every vertex of H. Let \(K_{r_1,r_2}\) denote the complete bipartite graph with class sizes \(r_1,r_2\) and let \(K_s\) denote the complete graph of order s. For a positive integer k,  let \([k]:=\{1,2,\ldots ,k\}.\)

We denote by \(\delta (G)\) the minimum degree of a graph G. The order of a longest path in a graph G is called the detour order of G. The circumference c(G) of a graph G is the length of a longest cycle in G. An s-clique is a clique of cardinality s. The order of a maximum clique in a graph G is called the clique number of G. A linear forest is a graph consisting of vertex disjoint paths and isolated vertices. The maximum linear forest number l(G) is the maximum size of linear forests in G. A matching M is a set of pairwise nonadjacent edges of G. The matching number \(\alpha '(G)\) is the size of a maximum matching in G.

Erdős and Gallai [5] determined the maximum size of graph with a prescribed circumference or detour order. Generalizing this result, Luo [14] gave the maximum number of s-cliques of graph with a prescribed circumference or detour order. Recently, Ning and Peng [17] generalized Luo’s work and gave the maximum number of s-cliques of graphs with prescribed circumference c and minimum degree at least k. In [21], Zykov determined the maximum number of s-cliques in graphs with given order and clique number. For stability results about these topics, one can see [6, 7, 11, 13, 15, 17]. The problem of estimating the generalized Turán number has also received a lot of attention; see [1, 8,9,10, 16].

Notation 1

Fix \(n-1\ge k\ge 1.\) Let \(F(n,k,\delta )=K_{\delta }\vee (K_{k-2\delta }+\overline{K_{n-k+\delta }})\). Denote by \(f_s(n,k,\delta )\) the number of s-cliques in \(F(n,k,\delta )\); more precisely,

$$\begin{aligned} f_s(n,k,\delta )=\left( {\begin{array}{c}k-\delta \\ s\end{array}}\right) +(n-k+\delta )\left( {\begin{array}{c}\delta \\ s-1\end{array}}\right) . \end{aligned}$$

We write \(f(n,k,\delta )\) for \(f_2(n,k,\delta )\) which equals the size of \(F(n,k,\delta ).\) Erdős and Gallai [5] determined the maximum size of n-vertex graph with \(\alpha '(G)\le \alpha '\). The graphs \(K_{2\alpha '+1}\) and \(K_{\alpha '}\vee \overline{K_{n-\alpha '}}\) show that the bound given below is tight.

Theorem 1

[5] Let G be a graph on n vertices. If \(\alpha '(G)\le \alpha '\), then \(e(G)\le \textrm{max}\{\left( {\begin{array}{c}2\alpha '+1\\ 2\end{array}}\right) ,f(n,2\alpha '+1,\alpha ')\}.\)

Notation 2

Let N(HG) denote the number of copies of H in G; e.g., \(N(K_2,G)=e(G)\).

Generalizing Theorem 1, Wang [19] determined the maximum number of s-cliques of a graph with given order and matching number at most \(\alpha '\).

Theorem 2

[19] Let G be a graph on n vertices. If \(\alpha '(G)\le \alpha '\), then \(N(K_s,G)\le \textrm{max}\{\left( {\begin{array}{c}2\alpha '+1\\ s\end{array}}\right) ,f_s(n,2\alpha '+1,\alpha ')\}.\)

Obviously, a graph G with \(\alpha '(G)\le \alpha '\) has \(l(G)< 2\alpha '+1\). Generalizing Theorem 1, Ning and Wang [18] proved the following result.

Theorem 3

[18] Let \(n-1\ge k\ge 1\) and \(t=\lfloor (k-1)/2\rfloor .\) If G is a graph on n vertices and \(l(G)< k\), then \(e(G)\le \textrm{max}\{\left( {\begin{array}{c}k\\ 2\end{array}}\right) ,f(n,k,t)\}.\)

For a graph with given order and maximum linear forest number at most \(k-1\), Zhang et al. [22] proved the following result.

Theorem 4

[22] Let \(n-1\ge k\ge 1\) and \(t=\lfloor (k-1)/2\rfloor .\) If G is a graph on n vertices and \(l(G)< k\), then \(N(K_s,G)\le \textrm{max}\{\left( {\begin{array}{c}k\\ s\end{array}}\right) ,f_s(n,k,t)\}.\)

It is natural to ask the same question by putting constraints on the graphs. Recently, Duan et al. [3] determined the maximum number of s-cliques of graphs with prescribed order n, matching number k and minimum degree \(\delta .\) Duan et al. [4] determined the maximum number of 3-cliques in n-vertex graph with \(l(G)=k-1\) and \(\delta (G)=\delta \).

Theorem 5

[3] If G is an n-vertex graph with \(\alpha '(G)=\alpha '\) and \(\delta (G)=\delta \), then \(N(K_s,G)\le \textrm{max}\{f_s(n,2\alpha '+1,\delta ),f_s(n,2\alpha '+1,\alpha ')\}.\)

Theorem 6

[4] Let \(n-1\ge k\ge 1\) and \(t=\lfloor (k-1)/2\rfloor .\) If G is an n-vertex graph with \(l(G)= k-1\) and \(\delta (G)=\delta \), then \(N(K_3,G)\le \textrm{max}\{f_3(n,k,\delta ),f_3(n,k,t)\}.\)

Let \(h_s(n,\alpha ',\delta )=\textrm{max}\{f_s(n,2\alpha '+1,\delta ),f_s(n,2\alpha '+1,\alpha ')\}.\) Note that, for some cases, this upper bound of s-cliques is not attained by a graph of minimum degree \(\delta .\) For example, \(h_2(15,7,3)=77\) is attained by a unique graph of minimum degree 7,  not 3. Motivated by these works, we give a sharp result on this problem. We determine the maximum number of s-cliques of n-vertex graphs with prescribed l(G) and \(\delta (G)\). Our main results are the following:

Notation 3

Fix \(n-1\ge k\ge 1.\) For \(t=\lfloor (k-1)/2\rfloor \), let \(G(n,k,\delta )\) denote the graph obtained from \(K_t\vee (K_{k-2t}+\overline{K_{n-k+t}})\) by deleting \(t-\delta \) edges that are incident to one common vertex in \(\overline{K_{n-k+t}}\). Denote by \(g_s(n,k,\delta )\) the number of s-cliques in \(G(n,k,\delta )\); more precisely,

$$\begin{aligned} g_s(n,k,\delta )=\left( {\begin{array}{c}k-t\\ s\end{array}}\right) +(n-k+t-1)\left( {\begin{array}{c}t\\ s-1\end{array}}\right) +\left( {\begin{array}{c}\delta \\ s-1\end{array}}\right) . \end{aligned}$$

Theorem 7

Let \(n-1\ge k\ge 1.\) If G is an n-vertex graph with \(l(G)=k-1\) and \(\delta (G)=\delta \), then

$$\begin{aligned} N(K_s,G)\le \textrm{max}\{f_s(n,k,\delta ),g_s(n,k,\delta )\}. \end{aligned}$$

This theorem is sharp as shown by the examples \(F(n,k,\delta )\) and \(G(n,k,\delta )\). As a corollary of our main result, we determine the maximum number of s-cliques in n-vertex graphs with prescribed matching number and minimum degree.

Corollary 8

If G is an n-vertex graph with \(\alpha '(G)=\alpha '\) and \(\delta (G)=\delta \), then

$$\begin{aligned} N(K_s,G)\le \textrm{max}\{f_s(n,2\alpha '+1,\delta ),g_s(n,2\alpha '+1,\delta )\}. \end{aligned}$$

In [19], Wang also determined the maximum number of copies of \(K_{r_1,r_2}\) in bipartite graphs with given matching number. In [22], Zhang et al. determined the maximum number of copies of \(K_{r_1,r_2}\) in bipartite graphs with given maximum linear forest number. Their proofs are mainly based on the shifting method. However, the shifting method used in [19, 22] seems not to work for the case of general graphs. In this paper, we can determine the maximum number of copies of \(K_{r_1,r_2}\) in n-vertex graphs with given l(G) and \(\delta (G)\).

Notation 4

Let \(F(n,k,\delta )=K_{\delta }\vee (K_{k-2\delta }+\overline{K_{n-k+\delta }}).\) We order the vertices of \(F(n,k,\delta )\) in \(\overline{K_{n-k+\delta }}\) with \(x_1,\dots ,x_{n-k+\delta }.\) Let \(r=r_1+r_2.\) Note that, for \(i\in [n-k+\delta ],\) the number of copies of \(K_{r_1,r_2}\) containing \(x_i\) in \(F(n,k,\delta )-\{x_1,\ldots ,x_{i-1}\}\) is \(\frac{1}{c}\sum _{j=1}^2\left( {\begin{array}{c}\delta \\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) ,\) where \(c=1\) if \(r_1\ne r_2\), and \(c=2\) otherwise. The number of copies of \(K_{r_1,r_2}\) in \(K_{\delta }\vee K_{k-2\delta }\) is \(\frac{1}{c}\left( {\begin{array}{c}k-\delta \\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) .\) Denote by \(f_{r_1,r_2}(n,k,\delta )\) the number of \(K_{r_1,r_2}\) in \(F(n,k,\delta )\); more precisely,

$$\begin{aligned} f_{r_1,r_2}(n,k,\delta )=&\frac{1}{c}\left[ \sum _{i=1}^{n-k+\delta }\sum _{j=1}^2\left( {\begin{array}{c}\delta \\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) +\left( {\begin{array}{c}k-\delta \\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) \right] . \end{aligned}$$

Denote by \(g_{r_1,r_2}(n,k,\delta )\) the number of \(K_{r_1,r_2}\) in \(G(n,k,\delta )\), where \(G(n,k,\delta )\) is defined in Notation 3. For the same reason, the number of copies of \(K_{r_1,r_2}\) in \(G(n,k,\delta )\) is

$$\begin{aligned} g_{r_1,r_2}(n,k,\delta )&=\frac{1}{c}\left[ \sum _{j=1}^2\left( {\begin{array}{c}\delta \\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-1\\ r-r_j-1\end{array}}\right) +\sum _{i=2}^{n-k+t}\sum _{j=1}^2\left( {\begin{array}{c}t\\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) \right. \\ {}&\quad \left. +\left( {\begin{array}{c}k-t\\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) \right] , \end{aligned}$$

where \(c=1\) if \(r_1\ne r_2\), and \(c=2\) otherwise.

Theorem 9

Let \(n-1\ge k\ge 1.\) If G is an n-vertex graph with \(l(G)=k-1\) and \(\delta (G)=\delta \), then

$$\begin{aligned} N(K_{r_1,r_2},G)\le \textrm{max}\{f_{r_1,r_2}(n,k,\delta ),g_{r_1,r_2}(n,k,\delta )\}. \end{aligned}$$

This theorem is sharp as shown by the examples \(F(n,k,\delta )\) and \(G(n,k,\delta ).\) By Theorem 9, we have the following corollary determining the maximum number of \(K_{r_1,r_2}\) in n-vertex graph with given matching number and minimum degree.

Corollary 10

If G is an n-vertex graph with \(\alpha '(G)=\alpha '\) and \(\delta (G)=\delta \), then

$$\begin{aligned} N(K_{r_1,r_2},G)\le \textrm{max}\{f_{r_1,r_2}(n,2\alpha '+1,\delta ),g_{r_1,r_2}(n,2\alpha '+1,\delta )\}. \end{aligned}$$

2 Proof of the Main Results

To prove Theorem 7, we will need the following definitions and lemmas.

Definition 1

(Bondy and Chvátal [2]) The k-closure of G is the graph obtained from G by iteratively joining nonadjacent vertices with degree sum at least k until there is no more such a pair of vertices.

Definition 2

(t-disintegration of a graph, Kopylov [12]) Let G be a graph and t be a natural number. Delete all vertices of degree at most t from G; for the resulting graph \(G'\), we again delete all vertices of degree at most t from \(G'\). Iterating this process until we finally obtain a graph, denoted by D(Gt), such that either D(Gt) is a null graph or \(\delta (D(G; t))\ge t+1.\) The graph D(Gt) is called the \((t+1)\)-core of G.

Lemma 11

[18] Suppose there are two vertices u and v in V(G) satisfying \(d(u)+d(v)\ge k\) and \(u\nleftrightarrow v.\) Then, \(l(G+uv)\le k-1\) if and only if \(l(G)\le k-1.\)

Lemma 12

[20] Suppose G is a graph that contains a linear forest F with \(k-1\) edges. If u and v are vertices that are end points of different paths in F and \(d_G(u)+d_G(v)\ge k,\) then G contains a linear forest with k edges.

Note that, if G has maximum linear forest number \(k-1,\) the minimum degree of G is at most \(\lfloor (k-1)/2\rfloor \) by Lemma 12. Now we are ready to prove Theorem 7.

Proof of Theorem 7

It is easy to verify that the graphs \(F(n,k,\delta )\) and \(G(n,k,\delta )\) stated in Notations 1 and 3 are graphs of order n, maximum linear forest number \(k-1\) and minimum degree \(\delta .\) The number of copies of s-cliques in \(F(n,k,\delta )\) or \(G(n,k,\delta )\) is \(f_s(n,k,\delta )\) or \(g_s(n,k,\delta ).\)

Let G be an n-vertex graph with \(l(G)=k-1\) and \(\delta (G)=\delta .\) Let w be a vertex of G with minimum degree \(\delta .\) If there exist two vertices \(u,v\in V(G)\backslash \{w\}\) such that \(u\nleftrightarrow v\) and \(d_G(u)+d_G(v)\ge k,\) we denote by \(G_1\) the graph \(G+uv.\) For the graph \(G_1,\) we again choose \(u_1,v_1\in V(G_1)\backslash \{w\}\) with \(u_1\nleftrightarrow v_1, d_{G_1}(u)+d_{G_1}(v)\ge k,\) and denote by \(G_2\) the graph \(G_1+u_1v_1.\) Iterating this process until we finally obtain a graph, denoted by Q,  such that for any \(x,y\in V(Q)\backslash \{w\}\) and \(x\nleftrightarrow y,\) we have \(d_Q(x)+d_Q(y)\le k-1.\) Obviously, \(\delta (Q)=\delta \) and \(l(Q)=k-1\) by Lemma 11.

Let \(t=\lfloor \frac{k-1}{2}\rfloor .\) Denote by \(D=D(Q;t)\) the \((t+1)\)-core of Q, i.e., the resulting graph of applying t-disintegration to Q. We distinguish two cases.

Case 1. D is a null graph. Without loss of generality, let \(x_i\) be the i-th deleted vertex. Since \(\delta (Q)\le \lfloor \frac{k-1}{2}\rfloor =t\) by Lemma 12, we can always let \(x_1=w.\) By the definition of t-disintegration, we have \(d_{Q_i}(x_i)\le t,2\le i\le n-t.\) Note that, once the vertex x is deleted, we delete at most \(\left( {\begin{array}{c}d_Q(x)\\ s-1\end{array}}\right) \) copies of \(K_s\). For the last t vertices, the number of \(K_s\) is at most \(\left( {\begin{array}{c}t\\ s\end{array}}\right) \). Thus,

$$\begin{aligned} N(K_s,Q)\le \left( {\begin{array}{c}\delta \\ s-1\end{array}}\right) +(n-t-1)\left( {\begin{array}{c}t\\ s-1\end{array}}\right) +\left( {\begin{array}{c}t\\ s\end{array}}\right) \le g_s(n,k,\delta ). \end{aligned}$$

Case 2. D is not a null graph. Let \(d=|D|.\) We claim that V(D) is a clique and \(\delta \le k-d\).

For all \(u, v\in V(D)\), we have \(d_D(u)\ge t+1\), \(d_D(v)\ge t+1\). Since every nonadjacent pair of vertices has degree sum at most \(k-1\) in Q and \(d_Q(u)+d_Q(v)\ge d_D(u)+d_D(v)\ge 2t+2\ge k\), we have u and v are adjacent in Q, i.e., V(D) is a clique.

We next prove \(\delta \le k-d.\) Suppose \(d\ge k-\delta +1,\) and hence, \(d_D(u)\ge d-1\ge k-\delta \) for all \(u\in V(D)\). Since V(D) is a clique and \(d_D(u)\ge t+1\) for all \(u\in V(D),\) we have \(d\ge t+2.\) Thus, every vertex in \( V(Q)\backslash V(D)\) is not adjacent to at least two vertices in D. Let \(x\in V(Q)\backslash V(D),\) and \(y\in V(D)\) is not adjacent to x. Note that, \(w\in V(Q)\setminus V(D).\) We distinguish two cases. If \(V(Q)\setminus V(D)=\{w\},\) we have \(x=w\) and \(|D|=n-1.\) Then, there is a Hamiltonian path between x and y as D is a complete graph. Since \(l(G)=k-1\le n-2,\) we get a contradiction. If \(V(Q)\setminus V(D)\ne \{w\},\) we can choose \(x\ne w.\) Note that, \(d_Q(x)\ge \delta ,\) we have \(d_Q(x)+d_Q(y)\ge \delta +k-\delta =k.\) According to the structure of graph Q, we get a contradiction. Thus, \(d\le k-\delta ,\) i.e., \(\delta \le k-d\).

Let \(D'\) be the \((k-d+1)\)-core of Q,  i.e., the resulting graph of applying \((k-d)\)-disintegration to Q. Since \(d\ge t+2\), we obtain \(k-d\le t.\) Therefore, \(D\subseteq D'\). There are two cases.

  1. (a)

    If \(D'=D\), then \(|D'|=|D|=d.\) By the definition of \((k-d)\)-disintegration, we have

    $$\begin{aligned} N(K_s,Q)&\le \left( {\begin{array}{c}\delta \\ s-1\end{array}}\right) +(n-d-1)\left( {\begin{array}{c}k-d\\ s-1\end{array}}\right) +\left( {\begin{array}{c}d\\ s\end{array}}\right) \\&=\left( {\begin{array}{c}\delta \\ s-1\end{array}}\right) +\uplambda _s(n,k,k-d)\\&\le \textrm{max}\{ f_s(n,k,\delta ),g_s(n,k,\delta )\}, \end{aligned}$$

    where \(\uplambda _s(n,k,x)=(n-k+x-1)\left( {\begin{array}{c}x\\ s-1\end{array}}\right) +\left( {\begin{array}{c}k-x\\ s\end{array}}\right) .\) The third inequality follows from the condition \(\delta \le k-d \le t\) and that the function \(\uplambda _s(n,k,x)\) is convex for \(x\in [\delta ,t].\)

  2. (b)

    Otherwise, \(D'\ne D.\) Let \(u\in V(D')\backslash V(D).\) Since \(d\ge t+2,\) we deduce that u is not adjacent to at least two vertices in D. We choose one of the vertices and denote it by v,  and then \(d_Q(u)+d_Q(v)\ge k-d+1+d-1\ge k.\) Since every nonadjacent pair of vertices has degree sum at most \(k-1,\) we obtain a contradiction and the Theorem is proved. \(\square \)

To prove Theorem 9, we need the following definition and lemma.

Definition 3

h(x) is a convex function of x if and only if \(h(x+1)+h(x-1)-2h(x)\ge 0\).

Lemma 13

\(h_{r_1,r_2}(n,k,x)=\frac{1}{c}\left[ \sum _{i=2}^{n-k+x}\sum _{j=1}^2\left( {\begin{array}{c}x\\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) +\left( {\begin{array}{c}k-x\\ r_1+r_2\end{array}}\right) \left( {\begin{array}{c}r_1+r_2\\ r_1\end{array}}\right) \right] \) is a convex function of x,  where \(c=1\) if \(r_1\ne r_2\), and \(c=2\) otherwise.

Proof

Note that, \(f_{r_1,r_2}(n,k,x)\) is the number of copies of \(K_{r_1,r_2}\) in F(nkx) and \(h_{r_1,r_2}(n,k,x)=f_{r_1,r_2}(n,k,x)-\frac{1}{c}\left( \left( {\begin{array}{c}x\\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-1\\ r_2-1\end{array}}\right) +\left( {\begin{array}{c}x\\ r_2\end{array}}\right) \left( {\begin{array}{c}n-r_2-1\\ r_1-1\end{array}}\right) \right) .\) Let \(H(n,k,x)=K_{x}\vee (K_{k-2x}+\overline{K_{n-1-k+x}}).\) Then, \(h_{r_1,r_2}(n,k,x)\) denote the number of copies of \(K_{r_1,r_2}\) in H(nkx). Let \(r=r_1+r_2.\) Assume that \(r_1\ne r_2.\) For the case \(r_1= r_2\), the proof is similar and is omitted. Note that, the number of copies of \(K_{r_1,r_2}\) inside \(K_x\vee K_{k-2x}\) is \(\left( {\begin{array}{c}k-x\\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) ,\) and the number of copies of \(K_{r_1,r_2}\) not inside \(K_x\vee K_{k-2x}\) of H(nkx) is \(\sum _{j=1}^2\left( {\begin{array}{c}x\\ r_j\end{array}}\right) \left( \left( {\begin{array}{c}n-1-r_j\\ r-r_j\end{array}}\right) -\left( {\begin{array}{c}k-x-r_j\\ r-r_j\end{array}}\right) \right) \). Hence,

$$\begin{aligned} h_{r_1,r_2}(n,k,x)=\left( {\begin{array}{c}k-x\\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) +\sum _{j=1}^2\left( {\begin{array}{c}x\\ r_j\end{array}}\right) \left( \left( {\begin{array}{c}n-1-r_j\\ r-r_j\end{array}}\right) -\left( {\begin{array}{c}k-x-r_j\\ r-r_j\end{array}}\right) \right) . \end{aligned}$$

Note that,

$$\begin{aligned}&h_{r_1,r_2}(n,k,x+1)-h_{r_1,r_2}(n,k,x)\\&\quad =-\left( {\begin{array}{c}k-1-x\\ r-1\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) +\sum _{j=1}^2\left( {\begin{array}{c}x\\ r_j-1\end{array}}\right) \left( {\begin{array}{c}n-r_j-1\\ r-r_j\end{array}}\right) \\&\qquad +\,\sum _{j=1}^2\left( \left( {\begin{array}{c}x\\ r_j\end{array}}\right) \left( {\begin{array}{c}k-x-r_j-1\\ r-r_j-1\end{array}}\right) -\left( {\begin{array}{c}x\\ r_j-1\end{array}}\right) \left( {\begin{array}{c}k-x-r_j-1\\ r-r_j\end{array}}\right) \right) , \end{aligned}$$

we have

$$\begin{aligned}&h_{r_1,r_2}(n,k,x+1)+h_{r_1,r_2}(n,k,x-1)-2h_{r_1,r_2}(n,k,x)\\&\quad \ge \left( {\begin{array}{c}k-1-x\\ r-2\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) +\sum _{j=1}^2\left( {\begin{array}{c}x-1\\ r_j-2\end{array}}\right) \left( {\begin{array}{c}n-r_j-1\\ r-r_j\end{array}}\right) \\&\qquad -\sum _{j=1}^2\left( \left( {\begin{array}{c}x-1\\ r_j-2\end{array}}\right) \left( {\begin{array}{c}k-r_j-1-x\\ r-r_j\end{array}}\right) +\left( {\begin{array}{c}x-1\\ r_j\end{array}}\right) \left( {\begin{array}{c}k-1-x-r_j\\ r-r_j-2\end{array}}\right) \right) \\&\quad \ge \left( {\begin{array}{c}k-1-x\\ r-2\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) -\sum _{j=1}^2\left( {\begin{array}{c}x-1\\ r_j\end{array}}\right) \left( {\begin{array}{c}k-1-x-r_j\\ r-r_j-2\end{array}}\right) . \end{aligned}$$

In order to prove \(h_{r_1,r_2}(n,k,x)\) is a convex function of x,  by Definition 3, it is enough to prove the following inequality:

$$\begin{aligned} \left( {\begin{array}{c}k-1-x\\ r-2\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) \ge \sum _{j=1}^2\left( {\begin{array}{c}x-1\\ r_j\end{array}}\right) \left( {\begin{array}{c}k-1-x-r_j\\ r-r_j-2\end{array}}\right) , \end{aligned}$$

which simplifies to

$$\begin{aligned} 1\ge \sum _{j=1}^2\frac{r_j(r_j-1)}{r(r-1)}\frac{(x-1)(x-2)\ldots (x-r+r_j)}{(k-x-1)(k-x-2)\ldots (k-x-r+r_j)}. \end{aligned}$$

Since \(k\ge 2x\) and \(r=r_1+r_2,\) we have

$$\begin{aligned} \sum _{j=1}^2\frac{r_j(r_j-1)}{r(r-1)}\frac{(x-1)(x-2)\ldots (x-r+r_j)}{(k-x-1)(k-x-2)\ldots (k-x-r+r_j)}<\sum _{j=1}^2 \frac{r_j(r_j-1)}{r(r-1)}\le 1. \end{aligned}$$

Thus, \(h_{r_1,r_2}(n,k,x)\) is a convex function of x. This completes the proof. \(\square \)

The proof of Theorem 9 follows the same steps as the proof of Theorem 7. So we will omit some details.

Proof of Theorem 9

It is easy to verify that the graphs \(F(n,k,\delta )\) and \(G(n,k,\delta )\) stated in Notations 1 and 3 are graphs of order n, maximum linear forest number \(k-1\) and minimum degree \(\delta .\) By Notation 4, the number of copies of \(K_{r_1,r_2}\) in \(F(n,k,\delta )\) is \(f_{r_1,r_2}(n,k,\delta )\) and the number of copies of \(K_{r_1,r_2}\) in \(G(n,k,\delta )\) is \(g_{r_1,r_2}(n,k,\delta ),\) respectively.

Let Q be defined as in Theorem 7 and let \(D=D(Q;t)\) denote the \((t+1)\)-core of Q. We distinguish two cases.

Case 1. D is a null graph. As the proof of Theorem 7, let \(x_i\) be the i-th deleted vertex and \(x_1=w.\) First, consider the case \(r_1=r_2.\) Note that, once the vertex \(x_i\) is deleted, we delete at most \(\left( {\begin{array}{c}d_Q(x_i)\\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-i\\ r_{1}-1\end{array}}\right) \) copies of \(K_{r_1,r_1}\). For the last t vertices, the number of \(K_{r_1,r_1}\) is at most \(\frac{1}{2}\left( {\begin{array}{c}t\\ 2r_1\end{array}}\right) \left( {\begin{array}{c}2r_1\\ r_1\end{array}}\right) \). Thus,

$$\begin{aligned} N(K_{r_1,r_1},Q)&\le \left( {\begin{array}{c}\delta \\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-1\\ r_1-1\end{array}}\right) +\sum _{i=2}^{n-t}\left( {\begin{array}{c}t\\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-i\\ r_{1}-1\end{array}}\right) +\frac{1}{2}\left( {\begin{array}{c}t\\ 2r_1\end{array}}\right) \left( {\begin{array}{c}2r_1\\ r_1\end{array}}\right) \\&\le g_{r_1,r_1}(n,k,\delta ). \end{aligned}$$

Next, we consider the case of \(r_1\ne r_2.\) Let \(r=r_1+r_2.\) Note that, once the vertex \(x_i\) is deleted, we delete at most \(\sum _{j=1}^2\left( {\begin{array}{c}d_Q(x_i)\\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) \) copies of \(K_{r_1,r_2}\). For the last t vertices, the number of \(K_{r_1,r_2}\) is at most \(\left( {\begin{array}{c}t\\ r_1+r_2\end{array}}\right) \left( {\begin{array}{c}r_1+r_2\\ r_1\end{array}}\right) \). Thus,

$$\begin{aligned} N(K_{r_1,r_2},Q)&\le \sum _{j=1}^2\left( {\begin{array}{c}\delta \\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-1\\ r-r_j-1\end{array}}\right) +\sum _{i=2}^{n-t}\sum _{j=1}^2\left( {\begin{array}{c}t\\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) +\left( {\begin{array}{c}t\\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) \\&\le g_{r_1,r_2}(n,k,\delta ). \end{aligned}$$

Case 2. D is not a null graph. Let \(d=|D|\). The same argument as in the proof of Theorem 7 also shows that D is a complete graph and \(\delta \le k-d\).

Let \(D'\) be the \((k-d+1)\)-core of Q,  i.e., the resulting graph of applying \((k-d)\)-disintegration to Q. Since \(d\ge t+2,\) we obtain \(k-d\le k-t-2\le t.\) Therefore, \(D\subseteq D'\). If \(D\ne D',\) by a similar discussion in Theorem 7, we can get a contradiction. Otherwise, \(D'=D\), then \(|D'|=|D|=d.\) If \(r_1=r_2,\) by the definition of \((k-d)\)-disintegration, we have

$$\begin{aligned} N(K_{r_1,r_1},Q)&\le \left( {\begin{array}{c}\delta \\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-1\\ r_1-1\end{array}}\right) +\sum _{i=2}^{n-d}\left( {\begin{array}{c}k-d\\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-i\\ r_{1}-1\end{array}}\right) +\frac{1}{2}\left( {\begin{array}{c}d\\ 2r_1\end{array}}\right) \left( {\begin{array}{c}2r_1\\ r_1\end{array}}\right) \nonumber \\&=\left( {\begin{array}{c}\delta \\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-1\\ r_1-1\end{array}}\right) +h_{r_1,r_1}(n,k,k-d)\nonumber \\&\le \textrm{max}\{ f_{r_1,r_1}(n,k,\delta ),g_{r_1,r_1}(n,k,\delta )\}, \end{aligned}$$
(1)

where

$$\begin{aligned} h_{r_1,r_1}(n,k,x)=\sum _{i=2}^{n-k+x}\left( {\begin{array}{c}x\\ r_1\end{array}}\right) \left( {\begin{array}{c}n-r_1-i\\ r_{1}-1\end{array}}\right) +\frac{1}{2}\left( {\begin{array}{c}k-x\\ 2r_1\end{array}}\right) \left( {\begin{array}{c}2r_1\\ r_1\end{array}}\right) . \end{aligned}$$

By Lemma 13, we have \(h_{r_1,r_1}(n,k,x)\) is convex for x. Inequality (1) can be obtained from the condition \(\delta \le k-d \le t\) and that the function \(h_{r_1,r_1}(n,k,x)\) is convex for \(x\in [\delta ,t].\) If \(r_1\ne r_2,\) we count the number of copies of \(K_{r_1,r_2}\) as follows.

$$\begin{aligned} N(K_{r_1,r_2},Q)&\le \sum _{j=1}^2\left( {\begin{array}{c}\delta \\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-1\\ r-r_j-1\end{array}}\right) +\sum _{i=2}^{n-d}\sum _{j=1}^2\left( {\begin{array}{c}k-d\\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) +\left( {\begin{array}{c}d\\ r\end{array}}\right) \left( {\begin{array}{c}r\\ r_1\end{array}}\right) \nonumber \\&=\sum _{j=1}^2\left( {\begin{array}{c}\delta \\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-1\\ r-r_j-1\end{array}}\right) +h_{r_1,r_2}(n,k,k-d)\nonumber \\&\le \textrm{max}\{ f_{r_1,r_2}(n,k,\delta ),g_{r_1,r_2}(n,k,\delta )\}, \end{aligned}$$
(2)

where

$$\begin{aligned} h_{r_1,r_2}(n,k,x)=\sum _{i=2}^{n-k+x}\sum _{j=1}^2\left( {\begin{array}{c}x\\ r_j\end{array}}\right) \left( {\begin{array}{c}n-r_j-i\\ r-r_j-1\end{array}}\right) +\left( {\begin{array}{c}k-x\\ r_1+r_2\end{array}}\right) \left( {\begin{array}{c}r_1+r_2\\ r_1\end{array}}\right) . \end{aligned}$$

Inequality (2) can be obtained from the condition \(\delta \le k-d \le t\) and that the function \(h_{r_1,r_2}(n,k,x)\) is convex for \(x\in [\delta ,t].\)

This completes the proof. \(\square \)

3 Concluding Remarks

In this paper, we determine the maximum number of s-cliques of an n-vertex graph with prescribed maximum linear forest number and minimum degree. As a corollary of our main result, we determine the maximum number of s-cliques in n-vertex graphs with prescribed matching number and minimum degree. Moreover, we also determine the maximum number of copies of \(K_{r_1,r_2}\) in n-vertex graphs with given maximum linear forest number and minimum degree. All results in our paper are sharp. Note that, in [3], Duan et al. gave two results which are stability versions of Theorem 5 for \(s=2\). Naturally, it is interesting to consider the stability versions of Theorem 7. We leave it as a work in future.