#### Abstract

The anti-Ramsey number is the maximum number of colors in an edge-coloring of such that contains no rainbow subgraphs isomorphic to . In this paper, we discuss the anti-Ramsey numbers , , and of , where denote the family of all spanning trees, the family of all perfect matchings, and the family of all Hamilton cycles in , respectively.

#### 1. Introduction

Let be a graph, a -edge-coloring of a graph is a mapping , where is a set of colors, namely, [1]. A subgraph of an edge-colored graph is rainbow if all of its edges have different colors. An edge-colored graph is called rainbow graph if all the colors on the edges are distinct. A representing subgraph in an edge-coloring of is a spanning subgraph obtained by taking one edge of each color. The anti-Ramsey number is the maximum number of colors in an edge-coloring of with no rainbow copy of . Rainbow coloring of graphs also has its application in practice. It comes from the secure communication of information between agencies of government. The anti-Ramsey number was introduced by Erds, Simonovits, and Ss in 1973 [2]. It has been shown that the anti-Ramsey number is closely related to Turn number. The Turn number is the maximum number of edges in a graph on vertices which does not contain any subgraph isomorphic to . Erds et al. conjectured that , for every fixed [2]. The conjecture is proved completely for all in [3] by Montellano-Ballesteros and Neumann-Lara. The anti-Ramsey numbers for some other special graph classes in complete graphs have also been studied, including independent cycles [4], stars [5], spanning trees [6], and matchings [7, 8]. The anti-Ramsey problems for rainbow matchings, cycles, and trees in complete bipartite graphs have been studied in [9–11]. Some other graphs were also considered as the host graphs in anti-Ramsey problems, such as hypergraphs [12], hypecubes [13], plane triangulations [14], and planar graphs [15].

It is natural to consider that the anti-Ramsey problems for rainbow matchings, cycles, and trees in complete -partite graphs. In this paper, we are interested in the anti-Ramsey numbers for spanning trees, perfect matchings, and Hamilton cycles in complete -partite graphs. A complete -partite graph is a graph whose vertices can be partitioned into different independent sets, and any two vertices from different independent sets are connected by an edge. A complete -partite graph, with partitions , , is denoted by , without loss of generality; in the following, we always assume that , , . If , is a complete graph. Bialostocki and Voxman proved that , where denotes the family of all spanning trees in [6]. The maximum number of colors in an edge-coloring of with no rainbow perfect matching (for even ) is , when [8].

#### 2. Main Result

The family of all spanning trees in is denoted by . The maximum number of colors in an edge-coloring of not containing any rainbow spanning tree is denoted by .

Theorem 1. *If , , , then*

*Proof. *Let be a complete -partite graph with vertex set , , , .

The proof of the theorem is distinguished into the following two cases (see Figure 1): Case 1: . There is an edge-coloring of using colors such that does not contain any rainbow spanning tree . Firstly, fix two vertices from and color all edges incident with and by some color, say , that is, and , for all vertices . Since , the number of remaining edges which are not colored is . Then, color all other edges of using colors such that each appears on one edge. Assume that there is a rainbow spanning tree of in this coloring, and then the spanning tree must contain two edges with the same color , one incident with and the other incident with , a contradiction. Thus, Case 2: .If we use different colors to color the edges of , then the does not contain any rainbow spanning tree .

Fix vertices from and from . Firstly, color the edges incident with and by color , that is, , for all vertices and , for all vertices , then color the remaining edges of using colors such that each appears on one edge, and the number of colors is . Now, every spanning tree of has at least two edges of the same color . Thus,

**(a)**

**(b)**

Theorem 2. *If , , , then*

*Proof. *We consider an arbitrary edge-coloring of using different colors. We only show that there is a spanning tree of . We choose a representing subgraph from with . Note that is disconnected by deleting at least edges. Thus, is connected. contains a rainbow spanning tree since every connected graph has a spanning tree.

The family of all Hamilton cycles in is denoted by . is the maximum number of colors in an edge-coloring not containing any rainbow Hamilton cycle.

In order to prove our main result, we need the following lemma.

Lemma 1. *(Dirac’s theorem, see [1]). If is a graph on vertices such that , then is Hamiltonian.*

Theorem 3. *Let be a complete k-partite graph with and ; if , then must have a Hamilton cycle.*

*Proof. *By assumption and the structure of , it is clear that , and according to Dirac’s Theorem, , have a Hamilton cycle. In fact, , namely, . The proof is finished.

Theorem 4. *If , , , then*

*Proof. *By assumption and Theorem 4, is clear Hamiltonian. Now, we show that there is an edge-coloring of using colors such that does not contain rainbow Hamilton cycle. Firstly, fix any one vertex from , color all the edges incident with by color , and then color all other edges of using colors such that each appears on one edge. Note that every Hamilton cycle of must contain two edges incident with , and the two edges have the same color . So, has no rainbow Hamilton cycle. Thus,In order to prove the next main theorem, we need the following definition.

Let be a -partite graph with vertex set , if there are two vertices and , , , , with , then add an edge to . The closure of is the graph obtained from by repeating this step until there are no such pair of vertices, denoted by .

Lemma 2. *(see [1]). is a simple graph, and then contains a Hamilton cycle if and only if its closure is Hamiltonian.*

Theorem 5. *Let be a -partite graph with . Suppose are the vertex degrees of of , all in nondecreasing order, where . If for each , then contains a Hamilton cycle.*

*Proof. *By Lemma 2, we only need to prove that is Hamiltonian. is a -partite graph with vertex set . Suppose are the vertex degrees of of , all in nondecreasing order, where . for . To the contrary, suppose contains no Hamilton cycle, then is not a complete -partite graph. Let be two vertices in , , , , , and . If , set . , contains at least vertices that are not adjacent to , and each of which has degree at most . Thus, we can find some vertex whose degree is at most in , which implies that , that is , a contradiction.

Theorem 6. *If , , then*

*Proof. *By Theorem 4, we can easily prove the lower bound. We consider an arbitrary edge-coloring of using different colors, and we will find a rainbow Hamilton cycle in . We choose a representing subgraph with . Let be the vertex degrees of of , all in nondecreasing order. If for each , , then must contain a Hamilton cycle. If not, we assume that there exists such that , . Without loss of generality, we assume that and . We have , that is, . Set , , , . We conclude that for each . Thus, we have for each , . By Theorem 7, must have a rainbow Hamilton cycle.

A matching in a graph is a set of nonadjacent edges. A perfect matching is a matching which saturates every vertex of the graph. The family of all perfect matchings is denoted by . is the maximum number of colors in an edge-coloring of not containing any rainbow perfect matching.

In [9], it has been shown that , , which is the maximum numbers of colors in an edge-coloring of that contains no rainbow . Now, we consider the maximum numbers of colors in an edge-coloring of not containing any rainbow perfect matching.

Tutte gives the sufficient and necessary condition of a graph with perfect matchings.

Lemma 3. *(Tutte’s theorem, see [1]). A graph has a perfect matching if and only if , for all , where is the number of odd components of .*

According to Tutte’s theorem, we give the following sufficient condition that completes -partite graph have a perfect matching.

Theorem 7. *If , , is even and , then the complete k-partite graph must have a perfect matching.*

*Proof. *Let be a subset of , and we consider the following three cases according to the cardinality of . Case 1: . Note that is disconnected by deleting at least vertices. For , it is clear that is connected. If is even, then , and if is odd, then , by assuming that is even; thus, is odd and by the parity. So, . By Lemma 3, has a perfect matching. Case 2: . If , , which meets Lemma 3, then has a perfect matching. Case 3: .If , , which also meets Lemma 9, then has a perfect matching.

Therefore, if is even and , must have a perfect matching.

In this section, we consider the anti-Ramsey problem of perfect matching in complete -partite graph .

Theorem 8. *If , , is even and , then*

*Proof. *The known conditions clearly met that must have a perfect matching by Theorem 9. Now, we firstly show that there is an edge-coloring of using colors such that does not contain any rainbow perfect matching . Fix two vertices from , color the edges incident with and by coloring , and color the remaining edges of using colors such that each appears on one edge. It is clear that there is no rainbow perfect matching in . So, we have

Theorem 9. *If , , is even, then*

*Proof. *We consider an arbitrary edge-coloring of using different colors, and we choose a representing subgraph from . By the proof of Theorem 6, we know that must have a rainbow Hamilton cycle . Then, we can find a rainbow perfect matching from since the number of vertices in is even. So,The proof is completed.

#### Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

The research and publication of our article was funded by the National Natural Science Foundation of China (61662079). H. Bian was supported by the National Natural Science Foundation of China (11761070). H. Z. Yu was supported by the National Natural Science Foundation of China (61662079). J. L. Ding was supported by the 2020 Postgraduate Innovation Project of Xinjiang.