Edge Colorings of Complete Multipartite Graphs Forbidding Rainbow Cycles

It is well known that if the edges of a finite simple connected graph on n vertices are colored so that no cycle is rainbow, then no more than n−1 colors can appear on the edges. In previous work, it has been shown that the essentially different rainbow-cycle-forbidding edge colorings of Kn with n− 1 colors appearing are in 1-1 correspondence with (can be encoded by) the (isomorphism classes of) full binary trees with n leafs. In the encoding, the natural Huffman labeling of each tree arising from the assignment of 1 to each leaf plays a role. Very recently, it has been shown that a similar encoding holds for rainbowcycle-forbidding edge colorings of Ka,b with a + b − 1 colors appearing. In this case the binary trees are given Huffman labelings arising from certain assignments of (0,1) or (1,0) to the leafs. (Sibling leafs are not allowed to be assigned the same label.) In this paper we prove the analogous result for complete r-partite graphs, for r > 2.


Introduction
Suppose H is a subgraph of a graph G and the edges of G are colored.Let C[X] denote the set of colors on G[X], the subgraph of G induced by X, for any X ⊆ V (G).Let C = C[V (G)] for short.
Definitions.H is said to be a rainbow subgraph of G (with respect to the coloring of G) if no two edges in H are the same color.We say that rainbow subgraphs from a certain class of graphs are forbidden by the coloring of G if every subgraph of G in that class of graphs is not rainbow with respect to the coloring on G.
Ramsey problems in graphs are generally about coloring the edges of a graph with as few colors as necessary so that no subgraph of a specified class is monochromatic.In this paper we look at a particular anti-Ramsey problem: that is, a problem that involves coloring the edges of a graph with as many different colors as possible so that no member of a specified class of subgraphs is rainbow.
Reference [4] is an excellent survey of anti-Ramsey results, including a section on Gallai colorings, which are edge colorings of complete graphs that forbid rainbow K 3 's.In [1] it is proven that an edge coloring of K n forbids rainbow K 3 's if and only if it forbids rainbow cycles of all lengths (this could be a well known folkloric result).So, one of the main results of [1], a characterization of all edge colorings of K n with n − 1 colors appearing which forbid rainbow cycles, is a theorem about certain kinds of Gallai colorings.[The result in [1] follows easily from a characterization of Gallai colorings in general, discussed in [4], of which the authors of [1] were unaware.However, the statement of the result in [1] does not arise in any obvious way from the earlier result on Gallai colorings.Further, that statement and its proof, in [1], inspired the main result in [2] which inspired the main result of this paper.] We will prove in this paper a result for complete multipartite graphs with at least three parts analogous to results already proven for complete graphs in [1] and complete bipartite graphs in [2].
The following proposition is well known; the first author heard about it from a friend who heard about it from a friend, so it may be folkloric.We do not know of any particular reference for it, so we include its short proof.Proof.Let T be a spanning tree in G.
. Let v 0 be the root of T .We then sort the vertices of G into levels (distances within T from the root).Define Since T is a tree, each v ∈ S j has exactly one neighbor in T in S j−1 for j > 0. We say S j−1 is "above" S j .There are no edges of T among the vertices of S j ; otherwise T is not a tree.
We then order V (G) \ {v 0 } (call the vertices v 1 , . . ., v n−1 ) where the first |S 1 | vertices are an arbitrary ordering of S 1 , the next |S 2 | vertices are an arbitrary ordering of S 2 , and so on. If with the color of the edge of T which joins v j with its unique neighbor on the level above it.
Suppose H is a cycle in G. Let j be the largest index such that v j ∈ V (H).Then the two edges incident to v j in H are the same color by our construction.So H is not rainbow.
Corollary 1.3.For any graph G, the greatest number of colors that can appear in a rainbowcycle-forbidding edge-coloring of G is |V (G)| − c where c is the number of components of G.

Definitions.
A connected graph G is JL-colored if it is edge-colored with |V (G)| − 1 colors appearing and rainbow cycles are forbidden.In an edge-colored graph, a color c is said to be dedicated to a vertex v if every edge colored c is incident to v.
The last two propositions are necessary for the proof of the main result.We believe it is likely these two propositions will play a pivotal role in future work on JL-colorings. ( The inequality holds since no color can be dedicated to more than two vertices.If each vertex had two or more colors dedicated to it, then exactly one vertex has one color dedicated to it.So we must have at least two vertices with exactly one color dedicated to each. Definition.If a graph G is edge-colored, and all edges incident to v ∈ V (G) bear the same color, then v is said to be unicolored in the coloring.

The Main Result
Theorem 2.1.Let G = K n 1 ,...,nm be a complete multipartite graph with parts of size n 1 , . . ., n m , with m ≥ 3.An edge coloring of G is a JL-coloring if and only if there is a partition of V (G) into non-empty subsets R and S which satisfy the following: 1.All R − S edges in G have the same color (let us call it green).

The sets of colors on the complete multipartite subgraphs G[R] and G[S]
induced by R and S, respectively, are disjoint, and neither set contains green.

The induced colorings of G[R] and G[S]
are JL-colorings.
The main result of [2] is precisely Theorem 2.1 in the case m = 2.
Suppose that E(G) is colored, and that V (G) is partitioned into R and S satisfying the stipulated requirements.Let |R| = r and |S| = s.
We verify that the coloring of G is a JL-coloring.Since the colorings of G[R] and G[S] are JL-colorings, these colorings use r − 1 and s − 1 colors, respectively.Also, the set of colors on G[R], G[S] are disjoint and neither contains green, so we see that G is colored with , then C is not rainbow since both subgraphs are JL-colored.If C has vertices in both R and S, then, because C is a cycle, C must contain at least two R − S edges.Then two of C's edges are green, so C is not rainbow.Thus, G is JL-colored.
Notice that the "if" claim of the theorem holds for any connected graph G if the requirement that G[R] and G[S] be connected is added.
The forward implication is more difficult.From here on assume that G is JL-colored.
Note.If G has a JL-coloring and v ∈ V (G) is unicolored in this coloring, then the partition R = {v} and S = V (G) \ {v} satisfies the three conditions in the main theorem.
To see this, let green be the color incident to v. Then 1), all R − S edges are green.
For 2), note that G[R] = v = K 1 has no edges.So certainly the sets of colors on G[R] and G[S] are disjoint.Since v is unicolored by the color green, green must be dedicated to v and thus green cannot appear in the graph G[S].
Finally, for 3) we know that G[R] has a single vertex, so r = 1 and the number of colors used is r From here, the proof proceeds by induction on n.At some points in the proof we may be applying the induction hypothesis to a complete bipartite subgraph of G.The induction hypothesis holds in such cases by the main result of [2].
We start with |V (G)| = 3.Since we assume the number of non-empty independent sets is m with m ≥ 3, we have m = 3 in our base case and there is one vertex in each set.Thus K 3 is the graph in the base case.For a JL-coloring of K 3 , we must use two colors.Let green be the color that appears on two edges and let v be the vertex incident to both of these green edges.Then v is unicolored and we are done.Now we can assume |V (G)| ≥ 4. By Proposition 1.5, we can find a vertex v with exactly one color dedicated to it.Let red be the color dedicated to Then, by our induction hypothesis we have a partition R 0 = ∅ and S 0 = ∅ of V (G) \ {v} that satisfies conditions 1), 2), and 3) of the main theorem.
First, we take care of the special case where one of R 0 , S 0 is a singleton.Without loss of generality, let S 0 = {u}.Then all edges to u in G − v are green.We may assume u is not in v's part (otherwise there is no uv edge and thus u is unicolored in G).For the same reason, we may assume the edge uv is not green.Let c = green be the color on uv.
are green and red.Thus c must be red.Since red is dedicated in G to both v and u, then red appears only on the edge uv.
Consider an edge vw where the vertex w is not in u's part.Since G is a complete multipartite graph, there is a cycle in G with edges uv, uw, and vw.We know uv is red and uw is green, so vw is either red or green (since G has no rainbow cycles).This implies vw must be green since red appears only on uv.Thus all edges from v to parts other than u's part are green.
If all edges incident to v except uv are green, then the partition R = R 0 and S = {u, v} satisfies the desired conditions.Now, we may assume for some w ∈ R 0 in u's part, the edge vw is not green.Let vw be blue where blue ∈ C. If all edges incident to w are blue, then w is unicolored and we are done.Suppose there is some edge wx not colored blue.Note that x ∈ R 0 .Then wx cannot be green since w, x ∈ R 0 .Also, it is not red since red only appears on uv.Let wx be yellow.This creates a rainbow 4-cycle where uv is red, ux is green, wx is yellow and vw is blue.This impossibility finishes Case 1 under the supposition that min Case 2: Suppose c is not dedicated to u in G.
Since green is the only other color incident to u, it follows that green is dedicated to u in G by Proposition 1.4.Therefore no v − R 0 edge is green.
Subcase 1: Suppose c is red.Let's consider the edge vw for any w ∈ R 0 not in u's part.Note that G[{u, v, w}] is a three cycle.Also, uv is red and uw is green.This implies vw is red since green is dedicated to u.So every vw is red for every w ∈ R 0 where w is not in u's part.
Again, if v is unicolored we are done, so we can assume there is some x ∈ R 0 in u's part where vx is not colored red.Let's say vx is blue.As above, if x is unicolored, we are done.So for some y ∈ R 0 where y is not in u's part, xy / ∈ {blue, green, red}.Then {uv, uy, xy, vx} is a rainbow four cycle which contradicts that G is JL-colored.Subcase 2: Suppose c is not red.So c ∈ C[R 0 ].Let's say c is blue.As in subcase 1, since green is dedicated in G to u we know that all edges vw, where w ∈ R 0 and w is not in u's part, are blue.
Red is dedicated to v, so there must be some x in u's part where vx is red.Pick any vertex y = v not in u's part.Then {uv, uy, xy, vx} is a four cycle where uv is blue, uy is green and vx is red.Since green is dedicated to u and red is dedicated to v, xy must be blue.We know blue is not dedicated to x in G (since it appears on uv).Since y was arbitrary, it follows that red is the only color other than blue incident to x and thus red is dedicated to x, in G.This means that red appears only on the edge vx.
Let's take S = {v, x} and R = V (G) − {v, x}.It will suffice to show this choice satisfies conditions 1), 2), and 3) of our main theorem to dispose of the special case min We begin by showing that blue / ∈ C[R].First we note that all edges incident to x in G − v are blue; this was part of the proof that vx is red.Recall that R 0 = V (G − v) − {u}.By assumption G[R 0 ] was JL-colored, and thus x has a color dedicated to it in , the edge ab cannot be blue.Now we will show that either all R − S edges are blue, or there is a unicolored vertex in G.We have already shown all edges from x to R are blue.We have also shown that all edges from v to w ∈ R where w is not in u's part are blue.If all edges from v to vertices in u's part are blue (other than the red vx edge), then we have shown what we needed to show.
So consider z ∈ R where z is in u's part and vz is not blue.We note that vz is not green, because if it were green then for any w in a part other than those of u and v, the three cycle {vz, wz, vw} is rainbow since vz is green, vw is blue as above, and wz is neither blue nor green since z, w ∈ V (G[R 0 ]) and neither vertex is x.
Let yellow / ∈ {blue, red, green} be the color on vz.By the argument in the paragraph above, for any w ∈ V (G) \ {v} which is in neither v's part nor in z's (u's) part (which implies that w ∈ R 0 ), wz must be colored yellow.If z is unicolored by yellow, then we are done.If z is not unicolored, let zz 0 be an edge not colored yellow.This color is in In particular, the color is neither blue nor green.If z 0 is not in v's part, then we have a rainbow three cycle {vz, vz 0 , zz 0 } where vz is yellow, vz 0 is blue, and zz 0 is neither blue nor yellow.Alternatively, if z 0 is in v's part then we have a rainbow four cycle {uz 0 , uv, vz, zz 0 } where uz 0 is green, uv is blue, vz is yellow, and zz 0 is not yellow, blue nor green.Thus we either have a unicolored vertex z, or condition 1) is satisfied and all R − S edges are blue.
For 2), we have red appearing as the only color in C[S] and since red is only on vx, red is not blue since blue is dedicated to x, and uy is green.Thus, the green edge vy cannot exist and so all edges incident to v must be red.

Encoding JL-colorings of Complete Multipartite Graphs
Definitions.A full binary tree is a tree with exactly one vertex of degree two and all other vertices of degrees 1 or 3.The vertex of degree 2 is the root of the tree, and the vertices of degree 1 are leafs.Furthermore, every non-leaf (a vertex of degree 3 or the root) has exactly two children, which we call siblings.The non-leaf vertex is called the parent of the two children.The children of a vertex of degree 3 are its two neighbors other than the neighbor which is on the path joining it to the root.In [1] it is shown that the JL-colorings of K n , n > 1 are in 1 − 1 correspondence with the (isomorphism classes of) the full binary trees with n leafs.
In the case of complete bipartite graphs the situation is a little more complicated: each JLcoloring of K m,n can be encoded by a certain vertex labeling of a full binary tree with m + n leafs, and conversely, every labeling of the vertices of a full binary tree with ordered pairs of non-negative integers, satisfying certain requirements, encodes a JL-coloring.
Theorem 2.1 implies an analogous result in which full binary trees with n 1 + . . .+ n r leafs, equipped with certain labelings of the tree vertices with of non-negative integers, encode JL-colorings of K n 1 ,...,nr .
In a Huffman labeling of a full binary tree, each leaf is given a certain label from a commutative semigroup.The label assigned to any parent vertex is the sum of the labels of the parent vertex's two children; by this rule, every vertex of the tree gets a label.See [3] for Huffman labeling in coding theory.
In particular, a Huffman labeling of a full binary tree with r-tuples of non-negative integers is a labeling such that the label of each parent is the coordinate-wise sum of the label of its children.Such a labeling produces a JL-coloring of a complete r-partite graph given the following conditions: 1.Each leaf has weight 1 (a 1 appears in one coordinate and zeros appear elsewhere).
3. For each j ∈ {1, . . ., r}, at least one leaf has the label with a 1 in position j of the r-tuple.
To see how Theorem 2.1 implies a correspondence between JL-colorings of complete multipartite graphs and these r-tuple Huffman labelings of full binary trees, let us have an example., so R has one vertex from P 1 , two from P 2 , and one from P 3 .Since R and S partition V (G), the sum of the labels on R T and S T must be (2, 2, 3).
When labeling the vertices from the top down, as was done in this example, not every partition of V (G) is permitted.No label with only one non-zero entry, and that entry greater than one, can appear.For instance, (2, 0, 0) is not permitted as a label on any vertex of the full binary tree in a labeling of the tree in Figure 2 representing a JL-coloring of G = K 2,2,3 .This is because G[R], a complete multipartite graph, must be JL-colorable by condition 3 of the main theorem, and a complete 1-partite graph with more than one vertex is not JL-colorable.To return to our example: the line joining T and S T with the word "green" above it is not part of the tree.This line indicates to the reader that the colorist will color all R − S edges in G with the same color, call it green, that will never be used again.
Next, the JL-coloring of G[R] K 1,2,1 and of G[S] K 1,0,2 K 1,2 begins as the JLcoloring of G began, and so on.Theorem 2.1 guarantees both that an edge-coloring of a complete multipartite graph K n 1 ,...,nr for r ≥ 3, n i ≥ 0, and i = 1, . . ., r derived from a properly labeled full binary tree with root label (n 1 , . . ., n r ), as indicated in the example, will be a JL-coloring of the graph, and that every JL-coloring of K n 1 ,...,nr is so derivable.
We end the paper with an observation: the same full binary tree with different labelings may produce different JL-colorings of the same graph, and even JL-colorings of different complete multipartite graphs.
Notice that the coloring of K 2,2,3 produced by the labeled full binary tree in Figure 2 has 9 green edges.The coloring of K 2,2,3 produced by the labeled full binary tree of Figure 3 has 10 green edges.Since there are 16 edges in K 2,2,3 , it is clear that these two labelings produce different colorings of K 2,2,3 .
Figure 4 shows the same full binary tree with a different labeling produces a JL-coloring for a different underlying graph.

Proposition 1 . 1 .
For any connected graph G, if G is edge-colored so that rainbow cycles are forbidden, then the number of colors appearing is at most |V (G)| − 1. Proof.Suppose G is edge-colored with more than |V (G)| − 1 colors.Pick |V (G)| edges with no two edges bearing the same color.Let H be the subgraph of G induced by these edges.Because |E(H)| ≥ |V (H)|, H must necessarily contain a cycle and this cycle is necessarily rainbow since H is rainbow.Moreover, Proposition 1.2 shows that the maximum number of colors stated above can be achieved in any connected graph G. Proposition 1.2.If G is connected, there is an edge-coloring of G with |V (G)| − 1 colors appearing such that rainbow cycles are forbidden.

Proposition 1 . 4 .
If G is JL-colored, then every vertex in V (G) has a color dedicated to it.Proof.Let n = |V (G)|.If v ∈ V (G) has no color dedicated to it, then all n − 1 colors appear on G − v, which has only n − 1 vertices, and there are no rainbow cycles in G − v.But this is impossible by Corollary 1.3.Proposition 1.5.If G is JL-colored, there are at least two vertices in G with exactly one dedicated color each.Proof.Let n = |V (G)|.We will count the number of ordered pairs in the set (v, c) : v ∈ V (G), c ∈ C and c is dedicated to v .For each v ∈ V (G), let d v be the number of colors dedicated to v. Note that d v ≥ 1 for all v ∈ V (G) by Proposition 1.4.The number of such ordered pairs (v, c) is v∈V (G) and all edges incident to u are green except uv, blue / ∈ C[R].So C[R] and C[S] are disjoint and neither set contains blue.For 3), since G has no rainbow cycles, neither G[R] nor G[S] can have rainbow cycles.Since G[S] has only one edge and that edge is red, has the appropriate number of colors.We need G[R] to have n − 3 colors.We note that G has n − 1 colors appearing.We have already shown red and blue are not in C[R].All other n − 3 colors must appear somewhere and since the one G[S] edge is red and all R − S edges are blue (the only other edges are in G[R]), they must appear on G[R].

Figure 1 :
Figure 1: A full binary tree with 7 leafs

Figure 3 : 3 ( 2
Figure 3: A Huffman labeling of the tree in Figure 2 for a different JL-coloring of K 2,2,3

Figure 4 :
Figure 4: A Huffman labeling of the same full binary tree in Figures 2 and 3, for a JL-coloring of K 4,2,1