1 Introduction

All graphs in this paper are undirected, finite, and simple. We follow [2] for graph theoretical notation and terminology not defined here. Let G be a nontrivial connected graph with an edge-coloring \(c: E(G)\rightarrow \{1, 2,\cdots , t\}, t \in \mathbb {N}\), where adjacent edges may be colored the same. A path of G is said to be a rainbow path if no two edges on the path have the same color. An edge-colored graph G is called rainbow connected if for every pair of distinct vertices of G there exists a rainbow path connecting them. The rainbow connection number of G, denoted by rc(G), is defined as the minimum number of colors that are needed in order to make G rainbow connected. The rainbow k-connectivity of G, denoted by \(rc_{k}(G)\), is defined as the minimum number of colors in an edge-coloring of G such that every two distinct vertices of G are connected by k internally disjoint rainbow paths. These concepts were introduced by Chartrand et al. in [5, 6]. Recently, a lot of results on the rainbow connections have been published. We refer the reader to [3, 4, 16, 17] for details.

Similarly, a tree T in G is called a rainbow tree if no two edges of T have the same color. For \(S\subseteq V(G)\), a rainbow S-tree is a rainbow tree connecting the vertices of S. Suppose \(\{T_{1},T_{2},\cdots , T_{\ell }\}\) is a set of rainbow S-trees. They are called internally disjoint if \(E(T_{i})\cap E(T_{j})=\emptyset \) and \(V(T_{i})\bigcap V(T_{j})=S\) for every pair of distinct integers ij with \(1\le i,j\le \ell \) (note that these trees are vertex-disjoint in \(G{\setminus } S\)); see [14, 15] for more knowledge about this. Given two positive integers k, \(\ell \) with \(k\ge 2\), the \((k,\ell )\)-rainbow index \(rx_{k,\ell }(G)\) of G is the minimum number of colors needed in an edge-coloring of G such that for any set S of k vertices of G, there exist \(\ell \) internally disjoint rainbow S-trees. In particular, for \(\ell =1\), we often write \(rx_{k}(G)\) rather than \(rx_{k,1}(G)\) and call it the k-rainbow index. It is easy to see that \(rx_{2,\ell }(G)=rc_{\ell }(G)\). So the \((k,\ell )\)-rainbow index can be viewed as a generalization of the rainbow connectivity. In the sequel, we always assume \(k\ge 3\).

The concept of \((k,\ell )\)-rainbow index was also introduced by Chartrand et al.; see [7]. They determined the k-rainbow index of all unicyclic graphs and the \((3,\ell )\)-rainbow index of complete graphs for \(\ell =1,2\). In [3], we investigated the \((k,\ell )\)-rainbow index of complete graphs. We proved that for every pair of positive integers \(k,\ell \) with \(k\ge 3\), there exists a positive integer \(N=N(k,\ell )\) such that \(rx_{k,\ell }(K_{n})=k\) for every integer \(n\ge N\), which settled down the two conjectures in [7].

In this paper, we apply the probabilistic method [1] to study a similar question for complete bipartite graphs and complete multipartite graphs. It is shown that for \(k\ge 4\), \(rx_{k,\ell }(K_{n,n})=k+1\) when n is sufficiently large, whereas for \(k=3\), \(rx_{k,\ell }(K_{n,n})=3\) for \(\ell =1,2\) and \(rx_{k,\ell }(K_{n,n})=4\) for \(\ell \ge 3\) when n is sufficiently large. Moreover, we prove that when n is sufficiently large, \(rx_{k,\ell }(K_{r\times n})=k\) for \(k<r\); \(rx_{k,\ell }(K_{r\times n})=k+1\) for \(k\ge r\) and \(\ell >\frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\); \(rx_{k,\ell }(K_{r\times n})=k\) or \(k+1\) for \(k\ge r\) and \(\ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\). At the end of this paper, we totally determine the \((3,\ell )\)-rainbow index of \(K_{r\times n}\) for sufficiently large n. Note that all these results can be expanded to more general complete bipartite graphs \(K_{m,n}\) with \(m=O(n^{\alpha })\) and complete multipartite graphs \(K_{n_{1},n_{2},\cdots ,n_{r}}\) with \(n_{1}\le n_{2}\le \cdots \le n_{r}\) and \(n_{r}=O(n_{1}^{\alpha })\), where \(\alpha \in \mathbb {R}\) and \(\alpha \ge 1\).

2 Results for Complete Bipartite Graphs

This section is devoted to the \((k,\ell )\)-rainbow index for complete bipartite graphs. We start with a lemma about the regular complete bipartite graphs \(K_{n,n}\).

Lemma 2.1

For every pair of positive integers \(k,\ell \) with \(k\ge 3\), there exists a positive integer \(N=N(k,\ell )\), such that \(rx_{k,\ell }(K_{n,n})\le k+1\) for every integer \(n \ge N\).

Proof

Let \(C=\{1,2,\cdots ,k+1\}\) be a set of \(k+1\) different colors. We color the edges of \(K_{n,n}\) with the colors from C randomly and independently. For \(S\subseteq V(K_{n,n})\) with \(|S|=k\), define A(S) as the event that there exist at least \(\ell \) internally disjoint rainbow S-trees. If Pr[\(\bigcap \limits _{S}A(S)\)]\(>0\), then there exists a required \((k+1)\)-edge-coloring, which implies \(rx_{k,\ell }(K_{n,n})\le k+1\).

Assume that \(K_{n,n}=G[U,V]\), where \(U={\{u_{1},u_{2},\cdots ,u_{n}\}}\) and \(V={\{v_{1},v_{2},\cdots ,v_{n}\}}\). We distinguish the following three cases.

Case 1 \(S\subseteq U\).

Without loss of generality, we suppose \(S=\{u_{1}, u_{2}, \cdots , u_{k}\}\). For any vertex \(v_{i}\in V\), let \(T(v_{i})\) denote the star with \(v_{i}\) as its center and \(E(T(v_{i}))=\{u_{1}v_{i}, u_{2}v_{i},\cdots , u_{k}v_{i}\}\). Clearly, \(T(v_{i})\) is an S-tree. Moreover, for \(v_{i}, v_{j} \in V\) and \(v_{i}\ne v_{j}\), \(T(v_{i})\) and \(T(v_{j})\) are two internally disjoint S-trees. Let \({\mathcal {T}}_{1}=\{T(v_{i})|v_{i} \in V, 1\le i\le n\}\). Then \({\mathcal {T}}_{1}\) is a set of n internally disjoint S-trees. It is easy to see that \(p_{1}\):= Pr[\(T\in {\mathcal {T}}_{1}\) is a rainbow S-tree]\(=(k+1){!}/(k+1)^{k}\). Define \(X_{1}\) as the number of rainbow S-trees in \({\mathcal {T}}_{1}\). Then, we have

$$\begin{aligned} Pr[{\overline{A(S)}}]\le Pr[X_{1}\le \ell -1]\le \left( {n \atopwithdelims ()\ell -1}\right) (1-p_{1})^{n-\ell +1}\le n^{\ell -1}(1-p_{1})^{n-\ell +1} \end{aligned}$$

Case 2 \(S\subseteq V\).

Similar to Case 1, we get \(Pr[{\overline{A(S)}}]\le n^{\ell -1}(1-p_{1})^{n-\ell +1}.\)

Case 3 \(S\cap U \ne \emptyset \), \(S\cap V \ne \emptyset \).

Assume that \(U^{\prime }=S\cap U=\{u_{x_{1}},u_{x_{2}},\cdots ,u_{x_{a}}\}\) and \(V^{\prime }=S\cap V=\{v_{y_{1}},v_{y_{2}},\cdots ,v_{y_{b}}\}\), where \(x_{i},y_{i}\in \{1,2,\cdots , n\}\), \(a\ge 1\), \(b\ge 1\) and \(a+b=k\). For every pair \(\{u_{i},v_{i}\}\) of vertices with \(u_{i}\in U{\setminus } U^{\prime }\) and \(v_{i}\in V{\setminus } V^{\prime }\), let \(T(u_{i}v_{i})\) denote the S-tree, where \(V(T(u_{i}v_{i}))=S \cup \{u_{i},v_{i}\}\) and \(E(T(u_{i}v_{i}))=\{u_{i}v_{i},u_{i}v_{y_{1}},u_{i}v_{y_{2}}, \cdots , u_{i}v_{y_{b}}, v_{i}u_{x_{1}},v_{i}u_{x_{2}}, \cdots , v_{i}u_{x_{a}}\}\). Clearly, for \(i\ne j\), \(T(u_{i}v_{i})\) and \(T(u_{j}v_{j})\) are two internally disjoint S-trees. Let \({\mathcal {T}}_{2}=\{T(u_{i}v_{i})|u_{i}\in U{\setminus } U^{\prime }, v_{i}\in V{\setminus } V^{\prime }\}\). Then \({\mathcal {T}}_{2}\) is a set of \(n-d\) \((max\{a,b\}\le d \le k)\) internally disjoint S-trees. It is easy to see that \(p_{2}{:}=\)Pr[T\(\in {\mathcal {T}}_{2}\) is a rainbow tree]=\((k+1){!}/(k+1)^{k+1}\). Define \(X_{2}\) as the number of rainbow S-trees in \({\mathcal {T}}_{2}\). Then, we have

$$\begin{aligned} Pr[{\overline{A(S)}}]\le Pr[X_{2}\le \ell -1]\le {n-d \atopwithdelims ()\ell -1} (1-p_{2})^{n-d-\ell +1}\le n^{\ell -1}(1-p_{2})^{n-k-\ell +1}. \end{aligned}$$

Comparing the above three cases, we get \(Pr[{\overline{A(S)}}]\le n^{\ell -1}(1-p_{2})^{n-k-\ell +1}\) for every set S of k vertices in \(K_{n,n}\). From the union bound, it follows that

$$\begin{aligned} Pr\Big [ \bigcap \limits _{S} A(S)\Big ]= & {} 1-Pr\Big [ \bigcup \limits _{S} {\overline{A(S)}}\Big ]\\\ge & {} 1- \sum \limits _{S}Pr[{\overline{A(S)}}] \\\ge & {} 1- {2n \atopwithdelims ()k}n^{\ell -1}(1-p_{2})^{n-k-\ell +1} \\\ge & {} 1-2^{k}n^{k+\ell -1}(1-p_{2})^{n-k-\ell +1} \end{aligned}$$

Since \(\lim \limits _{n\rightarrow \infty }1-2^{k}n^{k+\ell -1}(1-p_{2})^{n-k-\ell +1}=1\), there exists a positive integer \(N=N(k,\ell )\) such that \(Pr\Big [ \bigcap \limits _{S}A(S)\Big ]>0\) for all integers \(n\ge N\), and thus \(rx_{k,\ell }(K_{n,n})\le k+1\). \(\square \)

We proceed with the definition of bipartite Ramsey number, which is used to derive a lower bound for \(rx_{k,\ell }(K_{n,n})\). Classical Ramsey number involves coloring the edges of a complete graph to avoid monochromatic cliques, while bipartite Ramsey number involves coloring the edges of a complete bipartite graph to avoid monochromatic bicliques. In [13], Hattingh and Henning defined the bipartite Ramsey number b(ts) as the least positive integer n such that in any red–blue coloring of the edges of K(nn), there exists a red K(tt) (that is, a copy of K(tt) with all edges red) or a blue K(ss). More generally, one may define the bipartite Ramsey number \(b(t_{1},t_{2}, \cdots ,t_{k})\) as the least positive integer n such that any coloring of the edges of K(nn) with k colors will result in a copy of \(K(t_{i},t_{i})\) in the ith color for some i. If \(t_{i} = t\) for all i, we denote the number by \(b_{k}(t)\). The existence of all such numbers follows from a result first proved by Erdős and Rado [11], and later by Chvátal [8]. The known bounds for b(tt) are \(\left( 1+o(1)\right) \frac{t}{e}(\sqrt{2})^{t+1}\le b(t,t) \le \left( 1+o(1)\right) 2^{t+1}\log t\), where the \(\log \) is taken to the base 2. The proof of the lower bound [13] is an application of the Lovász Local Lemma, while the upper bound [9] is proved upon the observation that, in order for a two-colored bipartite graph \(K_{m,n}\) to necessarily contain a monochromatic \(K_{k,k}\), it is only necessary that one of m and n be very large. With similar arguments, we can obtain the bounds for \(b_{k}(t)\) as \(\left( 1+o(1)\right) \frac{t}{e}(\sqrt{k})^{t+1}\le b_{k}(t) \le \left( 1+o(1)\right) k^{t+1}\log _{k}t\).

Lemma 2.2

For every pair of positive integers \(k,\ell \) with \(k\ge 4\), if \(n \ge b_{k}(k)\), then \(rx_{k,\ell }(K_{n,n})\ge k+1\).

Proof

By contradiction. Suppose \({\varvec{c}}\) is a k-edge-coloring of \(K_{n,n}\) such that for any set S of k vertices in \(K_{n,n}\), there exist \(\ell \) internally disjoint rainbow S-trees. From the definition of bipartite Ramsey number, we know that if \(n \ge b_{k}(k)\), then in this k-edge-coloring \({\varvec{c}}\), one will find a monochromatic subgraph \(K_{k,k}\). Let \(K_{n,n}=G[U,V]\) and \(U^{\prime }\), \(V^{\prime }\) be the bipartition of the monochromatic \(K_{k,k}\), where \(U^{\prime }\subset U\), \(V^{\prime }\subset V\) and \(|U^{\prime }|=|V^{\prime }|=k\). Now take S as follows: two vertices are from \(V^{\prime }\) and the other \(k-2 \ (\ge 2)\) vertices are from \(U^{\prime }\). Assume that T is one of the \(\ell \) internally disjoint rainbow S-trees. Since there are k different colors, the rainbow tree T contains at most \(k+1\) vertices (i.e., at most one vertex in \(V{\setminus } S\)). It is easy to see that T possesses at least two edges from the subgraph induced by S, which share the same color. It contradicts the fact that T is a rainbow tree. Thus, \(rx_{k,\ell }(K_{n,n})\ge k+1\) when \(k\ge 4\) and \(n\ge b_{k}(k)\). \(\square \)

From Lemmas 2.1 and 2.2, we get that if \(k\ge 4\), \(rx_{k,\ell }(K_{n,n})=k+1\) for sufficiently large n. What remains to deal with is the \((3,\ell )\)-rainbow index of \(K_{n,n}\).

Lemma 2.3

For every integer \(\ell \ge 1\), there exists a positive integer \(N=N(\ell )\) such that

$$\begin{aligned} rx_{3,\ell }(K_{n,n}) = \left\{ \begin{array}{ll} 3 &{}\quad \hbox {if }\ell =1,2,\\ 4 &{}\quad \hbox {if }\ell \ge 3\ \ \ \end{array} \right. \end{aligned}$$

for every integer \(n\ge N\).

Proof

Assume that \(K_{n,n}=G[U,V]\) and \(|U|=|V|=n\).

Claim 1 If \(\ell \ge 1\), \(rx_{3,\ell }(K_{n,n})\ge 3\); furthermore, if \(\ell \ge 3\), \(rx_{3,\ell }(K_{n,n})\ge 4\).

If \(S=\{x,y,z\}\subseteq U\), then the size of S-trees is at least three, which implies that \(rx_{3,\ell }(K_{n,n})\ge 3\) for all integers \(\ell \ge 1\). If \(S=\{x,y,z\}, \{x, y\}\subseteq U, z\in V\), then the number of internally disjoint S-trees of size two or three is no more than two. Thus, we have \(rx_{3,\ell }(K_{n,n})\ge 4\) for all integers \(\ell \ge 3\).

Combing with Lemma 2.1, we get that if \(\ell \ge 3\), there exists a positive integer \(N=N(\ell )\) such that \(rx_{3,\ell }(K_{n,n})=4\) for every integer \(n\ge N\).

Claim 2 If \(\ell =1,2\), then there exists a positive integer \(N=N(\ell )\) such that \(rx_{3,\ell }(K_{n,n})=3\) for every integer \(n\ge N\).

Note that \(3\le rx_{3,1}(K_{n,n})\le rx_{3,2}(K_{n,n})\). So it suffices to prove \(rx_{3,2}(K_{n,n})\le 3\). In other words, we need to find a 3-edge-coloring \(c:E(K_{n,n})\rightarrow \{1,2,3\}\) such that for any \(S\subseteq V(K_{n,n})\) with \(|S|=3\), there are at least two internally disjoint rainbow S-trees. We color the edges of \(K_{n,n}\) with colors 1, 2, 3 randomly and independently. For \(S=\{x,y,z\}\subseteq V(K_{n,n})\), define B(S) as the event that there exist at least two internally disjoint rainbow S-trees. Similar to the proof in Lemma 2.1, we only need to prove \(Pr\Big [ {\overline{B(S)}}\Big ]=o(n^{-3})\), since Pr[\(\bigcap \limits _{S}B(S)\)]\(>0\) and \(rx_{3,2}(K_{n,n})\le 3\) for sufficiently large n. We distinguish the following two cases.

Case 1 x, y, z are in the same vertex class.

Without loss of generality, assume that \(\{x,y,z\} \subseteq U\). For any vertex \(v\in V\), let T(v) denote the star with v as its center and \(E(T(v))=\{xv, yv,zv\}\). Clearly, \({\mathcal {T}}_{3}=\{T(v)|v \in V\}\) is a set of n internally disjoint S-trees and Pr[T\(\in {\mathcal {T}}_{3}\) is a rainbow tree] = \(\frac{3\times 2\times 1}{3\times 3\times 3}=\frac{2}{9}\). Define \(X_{3}\) as the number of internally disjoint rainbow S-trees in \({\mathcal {T}}_{3}\). Then we have

$$\begin{aligned} Pr[{\overline{B(S)}}]=Pr[X_{3}\le 1]={n\atopwithdelims ()1}\frac{2}{9}\left( 1-\frac{2}{9}\right) ^{n-1}+\left( 1-\frac{2}{9}\right) ^{n}=o(n^{-3}). \end{aligned}$$

Case 2 xyz are in two vertex classes. Without loss of generality, assume that \(\{x,y\} \subseteq U\) and \(z\in V\).

Subcase 2.1 The edges xzyz share the same color. Without loss of generality, we assume \(c(xz)=c(yz)=1\). For any vertex \(v\in V{\setminus } \{z\}\), if \(\{c(xv), c(yv)\}=\{2,3\}\), then \(\{xz, xv, yv\}\) or \(\{yz, xv, yv\}\) induces a rainbow S-tree. So, \(Pr[\{xz, xv, yv\}\) induces a rainbow S-tree\(]=Pr[\{yz, xv, yv\}\) induces a rainbow S-tree\(]=\frac{2}{9}\). If there do not exist two internally disjoint rainbow S-trees, then we can find at most one vertex \(v\in V{\setminus } \{z\}\) satisfying \(\{c(xv), c(yv)\}=\{2,3\}\). Thus,

$$\begin{aligned} Pr\Big [ {\overline{B(S)}}|c(xz)=c(yz)\Big ]= & {} {n-1 \atopwithdelims ()1}\cdot \frac{2}{9}\cdot \left( 1-\frac{2}{9}\right) ^{n-2}+\left( 1-\frac{2}{9}\right) ^{n-1}\\= & {} \frac{2n+5}{9}\left( \frac{7}{9}\right) ^{n-2}. \end{aligned}$$

Subcase 2.2 The edges xzyz have distinct colors. Without loss of generality, we assume \(c(xz)=1, c(yz)=2\). For any vertex \(v\in V{\setminus } \{z\}\), if \(\{c(xv), c(yv)\}=\{2,3\}\), then \(\{xz, xv, yv\}\) induces a rainbow S-tree, and so \(Pr[\{xz, xv, yv\}\) induces a rainbow S-tree\(]=\frac{2}{9}\). Moreover, if \(\{c(xv), c(yv)\}=\{1,3\}\), then \(\{yz, xv, yv\}\) induces a rainbow S-tree, and so \(Pr[\{yz, xv, yv\}\) induces a rainbow S-tree\(]=\frac{2}{9}\). If there do not exist two internally disjoint rainbow S-trees, then we cannot find two vertices \(v,v^{\prime }\in V{\setminus } \{z\}\) satisfying \(\{c(xv), c(yv)\}=\{2,3\}\) and \(\{c(xv^{\prime }), c(yv^{\prime })\}=\{1,3\}\). Thus,

$$\begin{aligned} Pr\Big [ {\overline{B(S)}}|c(xz)\ne c(yz)\Big ]= & {} \left( 1-\frac{2}{9}-\frac{2}{9}\right) ^{n-1}\\&+\,2\sum _{i=1}^{n-1}{n-1\atopwithdelims ()i}\left( \frac{2}{9}\right) ^{i}\left( 1-\frac{2}{9}-\frac{2}{9}\right) ^{n-1-i}\\= & {} 2\left( \frac{7}{9}\right) ^{n-1}-\left( \frac{5}{9}\right) ^{n-1}. \end{aligned}$$

From the law of total probability, we have

$$\begin{aligned} Pr\Big [ {\overline{B(S)}}\Big ]= & {} Pr\Big [ c(xz)=c(yz)\Big ]\cdot Pr\Big [{\overline{B(S)}}|c(xz)= c(yz)\Big ]\\&+\,Pr\Big [ c(xz)\ne c(yz)\Big ]\cdot Pr\Big [ {\overline{B(S)}}|c(xz)\ne c(yz)\Big ]\\= & {} \frac{1}{3}\cdot \frac{2n+5}{9}\left( \frac{7}{9}\right) ^{n-2}+\frac{2}{3}\cdot \left[ 2\left( \frac{7}{9}\right) ^{n-1}-\left( \frac{5}{9}\right) ^{n-1}\right] \\&\le 2n\left( \frac{7}{9}\right) ^{n-2}=o(n^{-3}). \end{aligned}$$

Thus, there exists a positive integer \(N=N(\ell )\) such that \(rx_{3,2}(K_{n,n})\le 3\), and then \(rx_{3,1}(K_{n,n})=rx_{3,2}(K_{n,n})=3\) for all integers \(n\ge N\). The proof is thus complete. \(\square \)

By Lemmas 2.12.2 and 2.3, we come to the following conclusion.

Theorem 2.4

For every pair of positive integers \(k,\ell \) with \(k\ge 3\), there exists a positive integer \(N=N(k,\ell )\), such that

$$\begin{aligned} rx_{k,\ell }(K_{n,n}) = \left\{ \begin{array}{l@{\quad }l} 3 &{}\quad \hbox {if }k=3, \ell =1,2\\ 4 &{}\quad \hbox {if }k=3, \ell \ge 3\\ k+1 &{}\quad \hbox {if }k \ge 4 \ \ \ \ \end{array} \right. \end{aligned}$$

for every integer \(n \ge N\).

With similar arguments, we can expand this result to more general complete bipartite graphs \(K_{m,n}\), where \(m=O(n^{\alpha })\) (i.e., \(m\le Cn^{\alpha }\) for some positive constant C), \(\alpha \in \mathbb {R}\) and \(\alpha \ge 1\).

Corollary 2.5

Let mn be two positive integers with \(m=O(n^{\alpha })\), \(\alpha \in \mathbb {R}\) and \(\alpha \ge 1\). For every pair of positive integers \(k,\ell \) with \(k\ge 3\), there exists a positive integer \(N=N(k,\ell )\), such that

$$\begin{aligned} rx_{k,\ell }(K_{m,n}) = \left\{ \begin{array}{ll} 3 &{}\quad \hbox {if }k=3, \ell =1,2\\ 4 &{}\quad \hbox {if }k=3, \ell \ge 3\\ k+1 &{}\quad \hbox {if }k \ge 4\ \ \ \end{array} \right. \end{aligned}$$

for every integer \(n \ge N\).

3 Results for Complete Multipartite Graphs

In this section, we focus on the \((k,\ell )\)-rainbow index for complete multipartite graphs. Let \(K_{r\times n}\) denote the complete multipartite graph with \(r\ge 3\) vertex classes of the same size n. We obtain the following result about \(rx_{k,\ell }(K_{r\times n})\):

Theorem 3.1

For every triple of positive integers \(k,\ell ,r\) with \(k\ge 3\) and \(r\ge 3\), there exists a positive integer \(N=N(k,\ell ,r)\) such that

$$\begin{aligned} rx_{k,\ell }(K_{r\times n}) = \left\{ \begin{array}{ll} k &{}\quad \hbox {if }k< r\\ k \ or \ k+1 &{}\quad \hbox {if }k\ge r, \ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor } \\ k+1 &{}\quad \hbox {if }k\ge r, \ell >\frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\ \ \ \ \end{array} \right. \end{aligned}$$

for every integer \(n\ge N\).

Proof

Assume that \(K_{r\times n}=G[V_{1},V_{2},\ldots ,V_{r}]\) and \(V_{i}=\{v_{i1},v_{i2},\cdots ,v_{in}\}\), \(1\le i\le r\). For \(S\subseteq V(K_{r\times n})\) with \(|S|=k\), define C(S) as the event that there exist at least \(\ell \) internally disjoint rainbow S-trees.

Claim 1 \(rx_{k,\ell }(K_{r\times n})\ge k\); furthermore, if \(k\ge r\), \(\ell >\frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\), then \(rx_{k,\ell }(K_{r\times n})\ge k+1\).

Let \(S\subseteq V_{1}\). Then the size of S-trees is at least k, which implies that \(rx_{k,\ell }(K_{r\times n})\ge k\) for all integers \(\ell \ge 1\). If \(k\ge r\), we can take a set \(S^{\prime }\) of k vertices such that \(|S^{\prime }\cap V_{i}|=\lfloor \frac{k}{r}\rfloor \) or \(\lceil \frac{k}{r}\rceil \) for \(1\le i\le r\). Let H denote the subgraph induced by \(S^{\prime }\). We know \(|E(H)|\le {r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}\). Let \({\mathcal {T}}=\{T_{1},T_{2},\cdots , T_{q}\}\) be the set of internally disjoint \(S^{\prime }\)-trees with k or \(k-1\) edges. Clearly, if \(T\in {\mathcal {T}}\) is an \(S^{\prime }\)-tree with \(k-1\) edges, then \(|E(T)\cap E(H)|=k-1\); if \(T\in {\mathcal {T}}\) is an \(S^{\prime }\)-tree with k edges, then \(|E(T)\cap E(H)|\ge \lfloor \frac{k}{r}\rfloor \). Therefore, \(c\le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\) (note that the bound is sharp for \(r=3\), \(k=3\)). Thus, we have \(rx_{k,\ell }(K_{r\times n})\ge k+1\) for \(k\ge r\) and \(\ell >\frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\).

Claim 2 If \(k<r\), then there exists an integer \(N=N(k,\ell ,r)\) such that \(rx_{k,\ell }(K_{r\times n})\le k\) for every integer \(n\ge N\).

We color the edges of \(K_{r\times n}\) with k colors randomly and independently. Since \(k<r\), no matter how S is taken, we can always find a set \(V_{i}\) satisfying \(V_{i}\cap S=\emptyset \). For any \(v_{ij}\in V_{i}\), let \(T(v_{ij})\) denote the star with \(v_{ij}\) as its center and \(E(T(v_{ij}))=\{v_{ij}s|s\in S\}\). Clearly, \({\mathcal {T}}_{4}=\{T(v_{ij})|v_{ij} \in V_{i}\}\) is a set of n internally disjoint S-trees. Similar to the proof of Case 1 in Lemma 2.1, we get \(Pr[{\overline{C(S)}}]=o(n^{-k})\). So there exists a positive integer \(N=N(k,\ell ,r)\) such that \(Pr\Big [\bigcap \limits _{S}C(S)\Big ]>0\), and thus \(rx_{k,\ell }(K_{r,n})\le k\) for all integers \(n\ge N\).

It follows from Claims 1 and 2 that if \(k< r\), there exists a positive integer \(N=N(k,\ell ,r)\) such that \(rx_{k,\ell }(K_{r\times n})= k\) for every integer \(n\ge N\).

Claim 3 If \(k\ge \ell \), then there exists a positive integer \(N=N(k,\ell ,r)\) such that \(rx_{k,\ell }(K_{r\times n})\le k+1\) for every integer \(n\ge N\).

Color the edges of \(K_{r\times n}\) with \(k+1\) colors randomly and independently. We distinguish the following two cases.

Case 1 \(S\cap V_{i} =\emptyset \) for some i.

We follow the notation \(T(v_{ij})\) and \({\mathcal {T}}_{4}\) in Claim 2. Similarly, \({\mathcal {T}}_{4}\) is a set of n internally disjoint S-trees and \(Pr[{\overline{C(S)}}]=o(n^{-k})\).

Case 2 \(S\cap V_{i}\ne \emptyset \) for \(1\le i\le r\).

We pick up two vertex classes \(V_{1}, V_{2}\). Suppose \(V_{1}^{\prime }=S\cap V_{1}=\{v_{1x_{1}},v_{1x_{2}},\cdots ,v_{1x_{a}}\}\) and \(V_{2}^{\prime }=S\cap V_{2}=\{v_{2y_{1}},v_{2y_{2}},\cdots ,v_{2y_{b}}\}\), where \(x_{i},y_{i}\in \{1,2,\cdots , n\}\), \(a\ge 1\), \(b\ge 1\). Note that \(a+b\le k-r+2\). For every pair \(\{v_{1i},v_{2i}\}\) of vertices with \(v_{1i}\in V_{1}{\setminus } V_{1}^{\prime }\) and \(v_{2i}\in V_{2}{\setminus } V_{2}^{\prime }\), let \(T(v_{1i}v_{2i})\) denote the S-tree, where \(V(T(v_{1i}v_{2i}))=S \cup \{v_{1i},v_{2i}\}\) and \(E(T(v_{1i}v_{2i}))=\{v_{1i}v_{2i}\}\cup \{v_{1i}v|v\in V_{2}^{\prime }\}\cup \{v_{2i}v|v\in S\backslash V_{2}^{\prime } \}\). Clearly, for \(i\ne j\), \(T(v_{1i}v_{2i})\) and \(T(v_{1j}v_{2j})\) are two internally disjoint S-trees. Let \({\mathcal {T}}_{5}=\{T(v_{1i}v_{2i})|v_{1i}\in V_{1}{\setminus } V_{1}^{\prime }, v_{2i}\in V_{2}{\setminus } V_{2}^{\prime }\}\). Then \({\mathcal {T}}_{5}\) is a set of \(n-d\) \((max\{a,b\}\le d \le a+b \le k-r+2)\) internally disjoint S-trees. Similar to the proof of Case 3 in Lemma 2.1, we get \(Pr[{\overline{C(S)}}]=o(n^{-k})\).

Therefore, we conclude that there exists a positive integer \(N=N(k,\ell ,r)\) such that

\(Pr\Big [ \bigcap \limits _{S}C(S)\Big ]>0\), and thus \(rx_{k,\ell }(K_{r\times n})\le k+1\) for all integers \(n\ge N\).

It follows from Claims 1 and 3 that if \(k\ge r, \ell >\frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\), \(rx_{k,\ell }(K_{r\times n})=k+1\) and if \(k\ge r, \ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\), \(rx_{k,\ell }(K_{r\times n})=k\) or \(k+1\) for sufficiently large n. The proof is thus complete. \(\square \)

Note that if \(k\ge r\ge 3, \ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\), we cannot tell \(rx_{k,\ell }(K_{r\times n})=k\) or \(k+1\) from Theorem 3.1. However, the next lemma shows that when \(k=r=3\), \(\ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }=3\), \(rx_{3,\ell }(K_{n,n,n})=3\) for sufficiently large n.

Lemma 3.2

For \(\ell \le 3\), there exists a positive integer \(N=N(\ell )\) such that \(rx_{3,\ell }(K_{n,n,n})=3\) for every integer \(n\ge N\).

Proof

Assume that \(K_{n,n,n}=G[V_{1},V_{2},V_{3}]\) and \(|V_{1}|=|V_{2}|=|V_{3}|=n\). Note that \(3\le rx_{3,1}(K_{n,n,n})\le rx_{3,2}(K_{n,n,n})\le rx_{3,3}(K_{n,n,n})\). So it suffices to show \(rx_{3,3}(K_{n,n,n})\le 3\). In other words, we need to find a 3-edge-coloring c :  \(E(K_{n,n,n})\rightarrow \{1,2,3\}\) such that for any \(S=\{u,v,w\}\subseteq V(K_{n,n,n})\), there are at least three internally disjoint rainbow S-trees. We color the edges of \(K_{n,n,n}\) with the colors 1, 2, 3 randomly and independently. Define D(S) as the event that there exist at least three internally disjoint rainbow S-trees. We only need to prove \(Pr[{\overline{D(S)}}]=o(n^{-3})\), sincePr[\(\bigcap \limits _{S}D(S)\) ]\(>0\) and \(rx_{3,3}(K_{n,n,n})\le 3\) for sufficiently large n. We distinguish the following three cases.

Case 1 uvw are in the same vertex class.

Without loss of generality, assume that \(\{u,v,w \}\subseteq V_{1}\). For any vertex \(z\in V_{2}\cup V_{3}\), let \(T_{1}(z)\) denote the star with z as its center and \(E(T_{1}(z))=\{zu, zv, zw\}\). Obviously, \({\mathcal {T}}_{6}=\{T_{1}(z)|z\in V_{2}\cup V_{3}\}\) is a set of 2n internally disjoint S-trees and Pr[T\(\in {\mathcal {T}}_{6}\) is a rainbow tree]=\(\frac{2}{9}\). So,

$$\begin{aligned} Pr\Big [ {\overline{D(S)}}\Big ]\le {2n \atopwithdelims ()2}\left( 1-\frac{2}{9}\right) ^{2n-2}\le 4n^{2}\left( \frac{7}{9}\right) ^{2n-2}=o(n^{-3}) \end{aligned}$$

Case 2 uvw are in two vertex classes.

Without loss of generality, assume that \(\{u,v\} \subseteq V_{1}\) and \(w\in V_{2}\). For any vertex \(z\in V_{3}\), let \(T_{2}(z)\) denote a star with z as its center and \(E(T_{2}(z))=\{zu, zv, zw\}\). Clearly, \({\mathcal {T}}_{7}=\{T_{2}(z)|z\in V_{3}\}\) is a set of n internally disjoint S-trees and Pr[T\(\in {\mathcal {T}}_{7}\) is a rainbow tree] \(=\frac{2}{9}\). So,

$$\begin{aligned} Pr[{\overline{D(S)}}]\le {n \atopwithdelims ()2} \left( 1-\frac{2}{9}\right) ^{n-2}\le n^{2}\left( \frac{7}{9}\right) ^{n-2}=o(n^{-3}) \end{aligned}$$

Case 3 uvw are in three vertex classes.

Assume that \(u\in V_{1}\), \(v\in V_{2}\) and \(w\in V_{3}\). For \(e\in \{uv, vw, wu\}\), define \(E_{e}\) as the event that e is not used to construct a rainbow S-tree. Clearly, \(Pr[{\overline{D(S)}}]\le Pr[E_{uv}]+Pr[E_{vw}]+Pr[E_{wu}]\).

Subcase 3.1 The edges uvvwwu receive distinct colors.

Let \(p_{e}=Pr[E_{e}|uv,vw,wu\) receive distinct colors] for \(e\in \{uv, vw, wu\}\). Without loss of generality, we assume \(c(uv)=1,\ c(vw)=2,\ c(wu)=3\). If uv is not used to construct a rainbow S-tree, then for any vertex \(u'\in V_{1}{\setminus } \{u\}\), \(v'\in V_{2}{\setminus } \{v\}\), \(\{c(u'v), c(u'w)\}\ne \{2,3\}\) and \(\{c(v'u), c(v'w)\}\ne \{2,3\}\). So \(p_{uv}\le (1-\frac{2}{9})^{2n-2}\). Similarly \(p_{vw}\le (1-\frac{2}{9})^{2n-2}\), \(p_{wu}\le (1-\frac{2}{9})^{2n-2}\). Thus,

$$\begin{aligned} Pr[{\overline{D(S)}}|uv,vw,wu\hbox { receive distinct colors}]\le p_{uv}+p_{vw} +p_{wu}\le 3 \left( \frac{7}{9}\right) ^{2n-2} \end{aligned}$$

Subcase 3.2 the edges uvvwwu receive two colors.

Let \(p'_{e}=Pr[E_{e}|uv,vw,wu\) receive two colors] for \(e\in \{uv, vw, wu\}\). Without loss of generality, we assume \(c(uv)= c(vw)=1,\ c(wu)=2\). If uv is not used to construct a rainbow S-tree, then either

  • for any vertex \(u'\in V_{1}{\setminus } \{u\}\), \(v'\in V_{2}{\setminus } \{v\}\), \(\{c(u'v), c(u'w)\}\ne \{2,3\}\), and \(\{c(v'u), c(v'w)\}\) \(\ne \{2,3\}\) or

  • there exists exactly one vertex \(v'\in V_{2}{\setminus } \{v\}\) satisfying \(\{c(v'u), c(v'w)\}=\{2,3\}\), and at the same time, for any vertex \(u'\in V_{1}{\setminus } \{u\}\), \(w'\in V_{3}{\setminus } \{w\}\), \(\{c(u'v), c(u'w)\}\ne \{2,3\}\) and \(\{c(w'u), c(w'v)\}\ne \{2,3\}\).

So, \(p'_{uv}\le \left( \frac{7}{9}\right) ^{2n-2}+{n-1 \atopwithdelims ()1}\frac{2}{9}\left( \frac{7}{9}\right) ^{n-2}\left( \frac{7}{9}\right) ^{2n-2}\). Similarly, \(p'_{vw}\le \left( \frac{7}{9}\right) ^{2n-2}+{n-1 \atopwithdelims ()1}\frac{2}{9}\left( \frac{7}{9}\right) ^{n-2}\left( \frac{7}{9}\right) ^{2n-2}\). Similar to \(p_{wu}\), we have \(p'_{wu}\le \left( 1-\frac{2}{9}\right) ^{2n-2}\). Thus,

$$\begin{aligned} Pr[{\overline{D(S)}}|uv,vw,wu\hbox { receive two colors}] \le p'_{uv}+p'_{vw} +p'_{wu}\le (2n+1) \left( \frac{7}{9}\right) ^{2n-2} \end{aligned}$$

Subcase 3.3 The edges uvvwwu receive the same color.

Let \(p''_{e}=Pr[E_{e}|uv,vw,wu\) receive the same color] for \(e\in \{uv, vw, wu\}\). Without loss of generality, we assume \(c(uv)=c(vw)=c(wu)=1\). If uv is not used to construct a rainbow S-tree, then one of the three situations below must occur:

  • For any vertex \(w'\in V_{3}{\setminus }\{w\}\), \(\{c(w'v),c(w'u)\}\ne \{2,3\}\), and at the same time, there exists at most one vertex \(u'\in V_{1}{\setminus }\{u\}\) satisfying \(\{c(u'v),c(u'w)\}= \{2,3\}\) and at most one vertex \(v'\in V_{2}{\setminus }\{v\}\) satisfying \(\{c(v'u),c(v'w)\}= \{2,3\}\).

  • There exists exactly one vertex \(w'\in V_{3}{\setminus }\{w\}\) satisfying \(\{c(w'v),c(w'u)\}=\{2,3\}\), and at the same time, there exists at most one vertex \(s\in (V_{1}{\setminus }\{u\})\cup (V_{2}{\setminus }\{v\})\) satisfying \(\{c(sv),c(sw)\}= \{2,3\}\) or \(\{c(su),c(sw)\}= \{2,3\}\).

  • There exist at least two vertices \(w_{1},w_{2}\) in \(V_{3}{\setminus }\{w\}\) satisfying \(\{c(w_{i}u),c(w_{i}v)\}= \{2,3\}\) for i=1,2, and at the same time, for any vertex \(u^{\prime }\in V_{1}{\setminus }\{u\}\), \(v^{\prime }\in V_{2}{\setminus }\{v\}\), \(\{c(u^{\prime }v),c(u^{\prime }w)\}\ne \{2,3\}\) and \(\{c(v^{\prime }u),c(v^{\prime }w)\}\ne \{2,3\}\).

So, \(p''_{uv}\le (\frac{7}{9})^{n-1}{n-1 \atopwithdelims ()1}{n-1 \atopwithdelims ()1}(\frac{7}{9})^{2n-4}+{n-1 \atopwithdelims ()1}\frac{2}{9}(\frac{7}{9})^{n-2}{2n-2 \atopwithdelims ()1}(\frac{7}{9})^{2n-3}+[1-(\frac{7}{9})^{n-1}- {n-1 \atopwithdelims ()1}\) \(\frac{2}{9}(\frac{7}{9})^{n-2}]\cdot (\frac{7}{9})^{2n-2} \). Obviously, \(p''_{vw}=p''_{wu}=p''_{uv}\). Thus,

$$\begin{aligned} Pr[{\overline{D(S)}}|uv,vw,wu\hbox { receive the same color}]\le & {} p''_{uv}+p''_{vw} +p''_{wu}\\\le & {} 3(3n^{2}+1)\left( \frac{7}{9}\right) ^{2n-2}. \end{aligned}$$

By the law of total probability, we obtain

$$\begin{aligned} Pr[{\overline{D(S)}}]= & {} \frac{2}{9}\cdot Pr[{\overline{D(S)}}|uv,vw,wu\ have\ distinct\ colors]\\&\ \&+\frac{2}{3}\cdot Pr[{\overline{D(S)}}|uv,vw,wu\ receive\ two\ colors]\\&\ \&+\frac{1}{9}\cdot Pr[{\overline{D(S)}}|uv,vw,wu\ share\ the\ same\ color]\\\le & {} \frac{2}{9}\cdot 3\cdot \left( \frac{7}{9}\right) ^{2n-2}+\frac{2}{3}(2n+1) \left( \frac{7}{9}\right) ^{2n-2}+\frac{1}{9}\cdot 3(3n^{2}+1) \left( \frac{7}{9}\right) ^{2n-2}\\= & {} o(n^{-3}). \end{aligned}$$

Therefore, there exists a positive integer N such that \(Pr\Big [\bigcap \limits _{S}D(S)\Big ]>0\) for all integers \(n\ge N\), which implies \(rx_{3,3}(K_{n,n, n})\le 3\) for \(n\ge N\). \(\square \)

From Theorem 3.1 and Lemma 3.2, the \((3,\ell )\)-rainbow index of \(K_{r\times n}\) is totally determined for sufficiently large n.

Theorem 3.3

For every pair of positive integers \(\ell ,r\) with \(r\ge 3\), there exists a positive integer \(N=N(\ell ,r)\) such that

$$\begin{aligned} rx_{3,\ell }(K_{r\times n}) = \left\{ \begin{array}{ll} 3 &{}\quad \hbox {if }r=3, \ell =1,2,3 \\ 4 &{}\quad \hbox {if }r=3, \ell \ge 4 \\ 3 &{}\quad \hbox {if }r\ge 4\ \ \ \ \end{array} \right. \end{aligned}$$

for every integer \(n\ge N\).

With similar arguments, we can expand these results to more general complete multipartite graphs \(K_{n_{1},n_{2},\cdots ,n_{r}}\) with \(n_{1}\le n_{2}\le \cdots \le n_{r}\) and \(n_{r}=O(n_{1}^{\alpha })\), where \(\alpha \in \mathbb {R}\) and \(\alpha \ge 1\).

Theorem 3.4

Let \(n_{1}\le n_{2}\le \cdots \le n_{r}\) be r positive integers with \(n_{r}=O(n_{1}^{\alpha })\), \(\alpha \in \mathbb {R}\) and \(\alpha \ge 1\). For every triple of positive integers \(k,\ell ,r\) with \(k\ge 3\) and \(r\ge 3\), there exists a positive integer \(N=N(k,\ell ,r)\) such that

$$\begin{aligned} rx_{k,\ell }(K_{n_{1},n_{2},\cdots ,n_{r}}) = \left\{ \begin{array}{ll} k &{}\quad \hbox {if }k< r\\ k \ or \ k+1 &{}\quad \hbox {if }k\ge r, \ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor } \\ k+1 &{}\quad \hbox {if }k\ge r, \ell >\frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\ \ \ \ \end{array} \right. \end{aligned}$$

for every integer \(n_{1}\ge N\). Moreover, when \(k=r=3\), \(\ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }=3\), there exists a positive integer \(N=N(\ell )\) such that \(rx_{3,\ell }(K_{n_{1},n_{2},n_{3}})=3\) for every integer \(n_{1}\ge N\).

4 Concluding Remarks

In this paper, we determine the \((k,\ell )\)-rainbow index for some complete bipartite graphs \(K_{m,n}\) with \(m=O(n^{\alpha })\), \(\alpha \in \mathbb {R}\) and \(\alpha \ge 1\). But, we have no idea of the \((k,\ell )\)-rainbow index for general complete bipartite graphs, e.g., when \(m=O(2^{n})\), is \(rx_{k,\ell }(K_{m,n})\) equal to \(k+1\) or \(k+2\) ? it is still an open problem that \(rc_{\ell }(K_{m,n})=3\) or 4 for sufficiently large mn; see [12].

It is also noteworthy that we use the bipartite Ramsey number in Lemma 2.2 to show that \(rx_{k,\ell }\ge k+1\) for sufficiently large n. But, unfortunately the multipartite Ramsey number does not always exist; see [10]. Instead, we analyze the structure of S-trees in complete multipartite graphs and give some lower bounds for \(rx(K_{r\times n})\). Since these bounds are weak (they do not involve coloring), we cannot tell \(rx_{k,\ell }(K_{r\times n})=k\) or \(k+1\) when \(k\ge r\) and \(\ell \le \frac{{r\atopwithdelims ()2}\lceil \frac{k}{r}\rceil ^{2}}{\lfloor \frac{k}{r}\rfloor }\), except for the simple case \(k=3\); see Lemma 3.2. An answer to this question would be interesting.