Edge Colorings of K ( m , n ) with m + n-1 Colors Which Forbid Rainbow Cycles

For positive integers m,n, the greatest number of colors that can appear in an edge coloring of Km,n which avoids rainbow cycles is m+n−1. Here these colorings are constructively characterized; it turns out that these colorings can be encoded by certain vertex labelings of full binary trees with m+ n leafs.


Introduction
All graphs here are finite and simple.Suppose that H is a subgraph of a graph G, and the edges of G are colored.H is monochromatic with respect to this coloring if and only if the edges of H all have the same color.H is rainbow if no two edges of H bear the same color.Problems involving the intention to color the edges of a graph with as few colors as necessary so that no member of a specified class of subgraphs is monochromatic are classified as Ramsey problems.Problems involving the intention to color the edges of a graph with as many different colors as possible so that no member of a specified class of subgraphs is rainbow are classified as anti-Ramsey problems.Jargon: When an edge coloring of G is such that there are no rainbow subgraphs of G from a certain class of subgraphs, it is said that the rainbow subgraphs from that class are forbidden by the coloring.Similarly, Ramsey problems are about edge colorings that forbid monochromatic subgraphs.
For an excellent survey of anti-Ramsey results, see [4].This survey also touches on mixed Ramsey problems.In these, a graph G (usually complete) is to be edge-colored so that some subgraphs are never rainbow, and other subgraphs are never monochromatic.These problems may have arisen from the seminal paper of Erdös and Rado [3].They received a huge boost from [2], in which G is K n and, in the main result, no K 3 is to be rainbow, nor monochromatic.
An edge-coloring of K n which forbids rainbow K 3 's is called a Gallai coloring.A great amount is known about these (see [4]), including how to construct all Gallai colorings of K n , for n ≥ 3, from Gallai colorings of smaller complete graphs: edge-color K s with 1 or 2 colors, and then insert Gallai-colored K t 1 , . . ., K ts , ∑ s j=1 t j = n, into the vertices of K s to create K n , making sure that the sets of colors appearing on the K t j are disjoint from the set of 1 or 2 colors appearing in the edge coloring of K 5 .
In [5], the authors of which were unaware of the previous discoveries about Gallai colorings, one of the main results characterizes the Gallai colorings of K n in which n − 1 colors actually appear, n − 1 being the maximum number of colors that can appear in a Gallai coloring of K n .The result is that, for n ≥ 3, all such colorings are obtained as described above, with s = 2, with t i − 1 colors appearing on the edges of K t i , i = 1, 2, and with disjoint sets of colors appearing on K t 1 , K t 2 .[The theorem is stated differently in [5].We note that the result is easily derivable from the more general characterization of Gallai colorings, plus the fact that n − 1 is the greatest number of colors that can actually appear in a Gallai coloring of K n .]This result has the corollary that for n ≥ 2 the essentially different Gallai colorings of K n with n − 1 colors actually appearing are in one-to-one correspondence with the (isomorphism classes of) full binary trees with n leafs.We can say that each such binary tree encodes a Gallai coloring of K n with n − 1 colors appearing; and every such edge-coloring of K n can be so encoded.
It seems worth noting that the result from [5] described above has a mixed-Ramsey corollary that was only partially stated in [5].It is well known that every Gallai coloring of K n forbids rainbow cycles of all lengths in K n .[Any rainbow cycle C in K n of length > 3 has a chord; one of the two shorter cycles derived from C and that chord will be rainbow.Therefore: the existence of a rainbow cycle implies the existence of a rainbow K 3 .]As noted in [5], if K n is Gallai-colored with n − 1 colors appearing, then the coloring also forbids monochromatic K 3 's; this is an easy consequence of the theorem mentioned, proved by induction on n.Essentially the same proof yields the following.
Theorem 1.1 If n ≥ 2 and K n is Gallai-colored with n−1 colors appearing, then rainbow cycles of all lengths in K n are forbidden by the coloring, and monochromatic cycles of odd lengths are forbidden by the coloring.
In this paper we will give a result for the complete bipartite graphs K m,n which is analogous to the result in [5] for the complete graphs K n .We will constructively characterize the edge-colorings of K m,n which forbid rainbow cycles, and in which the maximum number of colors for a rainbow-cycle-forbidding edge-coloring of K m,n actually appear.Our characterization leads to an encoding of such colorings by binary trees with m ̸ = n leafs, with vertex labels satisfying certain requirements.No such labeling was needed in [5].Another difference is that we see no mixed-Ramsey result easily derivable from our result here.
This characterization was pursued, unsuccessfully, in [1].However, [1] gives us the following fundamental result, which we take as a starting point.

Theorem 1.2 ([1]
, Theorem 1) Suppose that m, n, and t are positive integers.The following are equivalent.
(a) There is an edge-coloring of K m,n with t colors appearing, which forbids rainbow cycles.
(b) There is an edge coloring of K m,n with t colors appearing, which forbids rainbow The equivalence of (a) and (b) in Theorem 1.2 arises from the following stronger statement, also proven in [1].Theorem 1.3 Any edge coloring of K m,n which forbids rainbow C 4 's also forbids rainbow cycles of all orders.

The Main Result
Definition A JL(m, n) coloring, or simply a JL-coloring, of K m,n is an edge coloring of K m,n with m + n − 1 colors which forbids rainbow cycles.

Remark 1
We can consider K m,0 ∼ = K o,m ∼ = Km ∼ = mK 1 , an empty graph with m vertices, to be a complete bipartite graph, for every positive integer m.There is only one edge coloring of such a graph, with 0 colors appearing.This coloring is a JL coloring if and only if m = 1, because m + 0 − 1 = 0 if and only if m = 1.

More definitions
Suppose that m and n are positive integers, and K m,n is edge colored.A color c appearing in the coloring is ) is unicolored if the edges incident to it all bear the same color.
Lemma 2.1 Suppose that m, n ≥ 1 and K m,n is JL-colored.Then: (1) Every vertex in K m,n has at least one color dedicated to it. (2 ) is unicolored with the color green, then green does not appear in Therefore, that coloring of K m,n − v forbids rainbow cycles and has m + n − 1 colors appearing.That is impossible, by Theorem 1.2.Thus (1) holds.
If v is as in (2), then green must be a color dedicated to v, by (1).Therefore, green does not appear in K m,n − v. Therefore, the given coloring restricted to K m,n − v forbids rainbow cycles and has m Remark: Note the similarity to the "Gallai partition" characterization of JL colorings of K n in [5].Proof: First suppose that K m,n is edge colored, and V (K m,n ) is partitioned into nonempty sets R, S satisfying (i), (ii), and (iii).Let r = |R| and s = |S|.Clearly there must be an R − S edge, so the color green does appear.
Therefore, by (i), (ii), and (iii), the number of colors in the coloring is (r There are no rainbow C 4 's in ⟨R⟩, nor in ⟨S⟩, and any C 4 with vertices from both R and S must have at least two green edges.Therefore, the original coloring is a JL-coloring.Now suppose that K m,n is JL-colored.We will show, by induction on m + n, that there must exist R and S, non-empty sets partitioning V (K m,n ) and satisfying (i), (ii), and (iii).
Before starting the induction, let us clear up a matter that some readers may find sticky.Suppose R, S are non-empty sets satisfying (i) -(iii), and partitioning V (K m,n ).Suppose R is contained on one side of the bipartition of K m,n .Then ⟨R⟩ ≃ K r,0 ; therefore, the assumption that ⟨R⟩ is JL-colored implies that r = 1.If this comes as a surprise, please reread the discussion in Remark 1 at the beginning of this section.
If m + n = 2 then m = n = 1 and K m,n is a single edge, uv.Take R = {u}, S = {v}, and call the color on uv green.
In the special cases m = 1 < n, let u be the single vertex on one side of the bipartition, and v 1 , . . ., v n be the vertices on the other side.By the assumption that the given coloring is JL, there must be n different colors on the n edges uv i , i = 1, . . ., n.Take R = {v 1 } and S = V (K 1,n )\R, and call the color on uv 1 green.This provides the desired partition.
Now we can assume that m, n ≥ 2 and that the conclusion we seek holds for all If there exists a unicolored vertex v ∈ X ∪ Y , then the color on edges incident to v must be dedicated to v. It follows that R = {v} and S = V (K m,n )\{v} satisfy (i), (ii), and (iii).Therefore, we may assume that V (K m,n ) contains no unicolored vertices.By Corollary 2.3, there is a vertex in K m,n , say x ∈ X, that has exactly one color, say red, dedicated to it.Then the given coloring restricted to K m,n − x is a JL-coloring, since the number of colors and the number of vertices in the complete bipartite graph have both been reduced by 1, and there are no rainbow cycles in K m,n − x.
By the induction hypothesis, there are non-empty sets R o , S 0 , partitioning V (K m,n −x), such that ⟨R 0 ⟩ and ⟨S 0 ⟩ are JL-colored, with disjoint color sets, and all R 0 − S 0 edges are colored the same, say with the color green, which does not appear in the JL-colorings of ⟨R 0 ⟩ and ⟨S 0 ⟩.Let the bipartition of R 0 be X 1 , Y 1 , where Then, because all R o − S 0 edges bear the color green, and Y 2 = Y , it follows that the lone vertex in X 1 is unicolored in K m,n .Therefore, we may assume that We are in one of the special cases discussed previously.Since the coloring of K 1,2 is JL, the colors on its two edges are different; but then x has two dedicated colors, contrary to assumption.
Therefore, either The rest of the proof is divided into 2 cases.
In this case, Claim 1 If some x-to-R 0 edge is red, then every x-to-R 0 edge is either red or some color that appears in ⟨R 0 ⟩.Consequently, ⟨R 0 ∪ {x}⟩ is JL-colored, if some x-to-R 0 edge is red.The same holds if R 0 is replaced in these statements by S 0 .
Proof of Claim 1.First note that ⟨R 0 ∪ {x}⟩ contains no rainbow cycles, whether the first part of Claim 1 holds or not.If the first part of Claim 1 holds and some x-to-R 0 edge is red, then the number of colors appearing in and so the restriction of the given JL-coloring of xu is red, and xu ′ is colored c, which is neither red nor a color in ⟨R 0 ⟩.Then c is either green or a color in ⟨S 0 ⟩.(Recall that red is the only color dedicated to x.) We seek a contradiction.
Since ⟨R 0 ⟩ is JL-colored, and red does not appear in K m,n − x, by Lemma 2.1(1) u has at least one non-red color, say yellow, dedicated to it in ⟨R 0 ⟩.Let vu be colored yellow, v ∈ X 1 .Then vu ′ is an edge of ⟨R 0 ⟩ and the color on it is not red (which is dedicated to x), nor yellow (which is dedicated to u in ⟨R 0 ⟩).But then the C 4 induced by x, u, v, u ′ is rainbow, contradicting the assumption that the given coloring of K m,n is a JL-coloring.This contradiction establishes Claim 1.
Claim 2 If some x-to-R 0 edge is red, then every x-to-S 0 edge is either red or green.If some x-to-S 0 edge is red, then every x-to-R 0 edge is either red or green.

Proof of Claim 2
Suppose, contrary to the claim, there is a vertex w ∈ Y 2 ⊆ S 0 such that the edge xw is yellow, a color different from red and from green.Since the only color appearing in K m.n which does not appear in K m,n − x is red, and since green appears only on R 0 − S 0 edges, it must be that yellow appears either in ⟨R 0 ⟩ or in ⟨S 0 ⟩.
First suppose that yellow appears in ⟨R 0 ⟩.Then yellow does not appear in ⟨S 0 ⟩.Take any vertex z ∈ X 2 .Then the color on zw is neither red, yellow, nor green, and zu is green, so x, w, z, u induce a rainbow C 4 in K m,n with its given JL-coloring, a contradiction.
Therefore we may assume that yellow appears in ⟨S 0 ⟩, and, therefore, not in ⟨R 0 ⟩.Take any vertex v ∈ X 1 .Then vu is neither red, yellow, nor green, while vw is green, so x, w, v, u induce a rainbow C 4 in K m,n with its supposed JL-coloring.By this contradiction, Claim 2 is established.
Continuing in Case 1, now with Claims 1 and 2 at our disposal: Some edge xu is red, and without loss of generality we may suppose that u ∈ Y 1 ⊆ R 0 .By Claim 1, no x-to-R 0 edge is green, and it is not possible to have both red and green x-to-S o edges.Therefore, by Claim 2, either all the x-to-S 0 edges are red, or all are green.If all the x-to-S 0 edges are green, then R = R 0 ∪ {x} and ∅ ̸ = S = S 0 partition V (K m,n ) and satisfy (i), (ii), and (iii) in the statement of the theorem.(Note that the requirement that ⟨R⟩ be JL-colored is affirmed in Claim 1.) Therefore we may assume that all the x-to-S 0 edges are red.Since Y 2 ̸ = ∅ in Case 1, there is a red x-to-S 0 edge; by Claim 2, it follows that every x-to-R 0 edge is either red or green.Since we already have such an edge; xu, which is red, it follows that all x-to-R 0 edges are red.Thus all edges incident of x are red, which means that x is unicolored.This finishes the proof in Case 1.
Recall that K m,n contains no unicolored vertices (by an early reduction in this proof), so some x-to-S 0 edge is not red.Following the proof of Claim 1 from Case 1, with S 0 here replacing R 0 there, it can be seen that if any 0 edge is red, then every x-to-S 0 edge is either red, or some color appearing in ⟨S 0 ⟩.Therefore, it cannot be that both red and green appear on the x-to-S 0 edges.Suppose w ∈ Y 2 and xw is yellow, a color that appears in ⟨S 0 ⟩.Since w is not unicolored in K m,n , there is a vertex z ∈ X 2 = X\{x} such that zw is not yellow; it is also not green, because the edge is within ⟨S 0 ⟩, and it is not red because red is dedicated to x.Therefore, the C 4 induced in K m,n by x, u, z, and w is rainbow, which contradicts supposition.
Therefore, the x-to-S 0 edges are either all red or all green.They cannot be all red, because no vertex of K m,n is unicolored; therefore they are all green.Then R = {u, x}, S = S 0 is a partition of K m,n satisfying the theorem's requirements.

Subcase 2.2:
The color on xu is not red.Note that the color on xu cannot be green, for that would imply that u is unicolored in K m,n .Let the color on xu be yellow.There must be a vertex w ∈ Y 2 such that xw is red.If z ∈ X 2 is such that zw is not yellow, then x, u, z, w induce a rainbow C 4 in K m,n .
Therefore, all w-to-X 2 edges are yellow; so w is unicolored in K m,n −x, and yellow must be the color dedicated to it there.The only other color appearing on an edge incident to w is red, appearing on xw.Because yellow appears on xu, yellow is not dedicated to w in the JL-coloring of K m,n .Therefore red is dedicated to w in K m,n , so red appears only on the edge xw.
If we take R ′ 0 = {w} and S ′ 0 = V (K m,n )\{x, w}, we have a partition of V (K m,n − x) which satisfies the requirements of the theorem with respect to the JL-coloring of K m,n −x, with yellow, rather than green, being the unique color on R ′ 0 −S ′ 0 edges appearing nowhere in ⟨S 0 ⟩, because yellow is dedicated to w in K m,n − x.We have |R ′ 0 | = 1 and the lone x-to-R ′ 0 edge is colored red.This puts us in Subcase 2.1, and the proof is complete.□

Encoding JL-Colorings of K m,n
A full binary tree is a tree with one vertex of degree 2 and all of the other vertices of degrees 3 or 1.The vertex of degree 2 is the root of the tree, and the vertices of degree 1 are leafs.For each vertex of degree 3, one of its incident edges is on the unique path connecting it to the root; the vertices at the ends of the other two edges are the children of the vertex of degree 3, which is their parent.The root is also a parent of two children.We will be using full binary trees with m + n leafs to encode JL-colorings of K m,n ; but, first, a lemma.
Proof: Let green be the color that appears on R − S edges, and only there, and let blue be the color that serves the same purpose for the partition R ′ , S ′ .Note that possibly green may be the same as blue. If and S 2 = S ∩ Y are all non-empty, and the green edges induce a spanning subgraph of K m,n isomorphic to K r 1 ,s 2 + K r 2 ,s 1 , where + stands for disjoint union.In this case, if green and blue are the same color, then {R, S} = {R ′ , S ′ }, which implies that {(r 1 , r 2 ), (s If green and blue are not the same color, then it must be that ( * ) Therefore, there is a green edge in ⟨S ′ ⟩.Therefore, green edges appear only in ⟨S ′ ⟩, because the coloring of K m,n is JL and the partition R ′ , S ′ of V (K m,n ) satisfies the requirements in Theorem 2.4, with respect to the coloring (but with "blue" replacing "green" in the statement of Theorem 2.4).On the other hand, as noted above, 0 / ∈ {r 1 , r 2 , s 1 , s 2 } implies that the green edges induce a spanning subgraph of K m,n .Therefore S ′ = V (K m,n ), so R ′ = ∅, contradicting assumption about the partition R ′ , S ′ .
The other two cases arising from ( * ) are dealt with similarly.Now suppose that 0 ∈ {r 1 , r 2 , s 1 , s 2 }.Without loss of generality, suppose that all edges incident to u are green, and every green edge is incident to u.If S ′ 2 ̸ = ∅ then there is a u-to-S ′ 2 edge, which, being an R ′ 1 − S ′ 2 edge, is blue; therefore, green and blue are really the same color, and we have {R, S} = {R ′ , S ′ } (even though the green edges don't necessarily induce a spanning subgraph).Therefore, we may assume that S ′ 2 = ∅.But then s ′ 1 = 1, and we have We are well aware that if R, S is a partition of V (K m,n ) associated with a JL-coloring of K m,n , as in Theorem 2.4, and r 1 , r 2 , s 1 , s 2 are as in Lemma 3.1, then s 1 = m − r 1 and s 2 = n − r 2 , so it might be that Lemma 3.1 could be more economically stated.
Suppose now that m + n ≥ 2 and that K m,n , with bipartition X, Y , is JL-colored.Let R, S be a partition of V (K m,n ) associated with this coloring á la Theorem 2.4.Let 1 , r 2 , s 1 , s 2 be as in Lemma 3.1.We will associate to this coloring a full binary tree with vertices labeled with ordered pairs of non-negative integers, in such a way that the coloring can essentially be recovered from the labeled tree.
Label the root of the tree with (m, n), and the two children of the root with (r 1 , r 2 ) and (s 1 , s 2 ).Since ⟨R⟩ ∼ = K r 1 ,r 2 is JL-colored, if r 1 + r 2 ≥ 2 then a partition of R 1 ∪ R 2 as described in Theorem 2.4 can be found, and children of the vertex labeled (r 1 , r 2 ) can be labeled by reference to this coloring just as the children of the original root, labeled (m, n), were just labeled.If |R| = 1 then (r 1 , r 2 ) = (1, 0) or (0, 1), and the vertex with that label will be a leaf of the tree being constructed.Continuing in this way, a full binary tree is constructed with labels (a, b), with a, b both positive integers or with (a, b) ∈ {(0, 1), (1, 0)} in which case the vertex bearing the label is a leaf.
For instance, consider K 3,3 , with X = {u 1 , u 2 , u 3 }, and the JL-coloring described thus: all edges incident to u 1 are green, all edges incident of u 2 are blue, and the 3 edges incident to u 3 are colored yellow, black, and white.Starting with = {u 1 }, the labeled tree obtained as previously indicated is shown in Figure 1.
Given this labeled tree, how can one recover the JL-coloring of K 3,3 from which this tree, with its labels, was derived?Start with the pairs of leafs that are siblings.In this graph there is only one such pair, the vertices labeled (1, 0) and (0, 1) at the bottom of Figure 1.Start the formation of the JL-colored K 3,3 by putting one vertex in X, one in Y , drawing Figure 1: A labeled binary tree representing a JL-coloring of K 3,3 an edge between them, and coloring that edge with a color that will appear on no other edge.Now move up to the siblings labeled (1, 1) and (0, 1).These two are associated with a partition R, S of V (K 1,2 ).R has, as elements, the two vertices already introduced.S consists of a single new vertex in Y .There is one new edge, from the new vertex in Y to the single vertex in X. Color that edge with a second color, which will never be used again.
Continue in this way, building new JL-colorings from pairs of JL-colorings on disjoint induced subgraphs of K 3,3 , according to the plan provided by the labeled binary tree in Figure 1, until all K 3,3 is JL-colored.
By Theorem 2.4, especially (i) and (ii), and the way the labeled full binary tree is generated from the given JL-coloring, it is clear that the coloring reconstructed from the labeled tree is equivalent to, or essentially the same as the original JL-coloring in this sense: A change in the names of the colors, followed by an automorphism of the graph K m,n takes one coloring onto the other.
Clearly, Lemma 3.1 implies that given a JL-coloring of K m,n , the binary tree and its labeling, up to isomorphism of the tree, are determined.What about the other way?Which labelings of the vertices of which full binary trees arise from a JL-coloring of K m,n , for some m and n?Here are some necessary conditions, properties of a tree and a labeling arising from a JL-coloring of K m,n .
2. Each parent is labeled with the vector sum of the labels of its two children.
3. The tree has m + n leafs.(Because the children of the root, with labels (r 1 , r 2 ) and (s 1 , s 2 ), are each either leafs or roots of labeled trees arising from JL-colorings, the claim here is easy to prove by induction on m + n, using observation 2.) Given a full binary tree with L leafs, if we label each leaf with (0, 1) or (1, 0), taking care to have both leaf labels appear on sibling leafs, we can then apply 2 to supply labels to the non-leaf vertices.The resulting labeled tree will represent a JL-coloring of K m,n for some m and n satisfying m + n = L.The JL-coloring can be obtained from the labeled tree as in the example.(To be explicit, when we arrive at siblings with labels (r 1 , r 2 ), (s 1 , s 2 ), it means that we have already JL-colored disjoint K r 1 ,r 2 and K s 1 ,s 2 , say with bipartitions R 1 , R 2 and S 1 , S 2 , respectively, with no color appearing in both graphs; we then proceed to form an edge-colored K r 1 +s 1 ,r 2 +s 2 with bipartition R 1 ∪ S 1 , R 2 ∪ S 2 by leaving R 1 − R 2 and S 1 − S 2 edges with the colors they bear already, and then coloring R 1 − S 2 and S 1 − R 2 edges with a new color that will never be used again.By Theorem 2.4, K r 1 +s 1 ,r 2 +s 2 is now JL-colored, we pronounce the siblings with labels (r 1 , r 2 ) and (s 1 , s 2 ) finished and look for unfinished sibling pairs with the distinction of having all of their descendants already finished.The parent of the just-finished vertices, which bears the label (r 1 + s 1 , r 2 + s 2 ), would be such a distinguished vertex.) Let us call a labeling of a full binary tree with ordered pairs of non-negative integers satisfying 1, 2, and 3, above, a JL-labeling of the tree.Two such labeled trees are equivalent if and only if there is a graph isomorphism from one tree onto the other such that each vertex in the domain is carried into a vertex in the range with the same label; or each vertex in the domain is carried into a vertex in the range with its label reversed.
As mentioned before, we call two JL-colorings of K m,n equivalent, or essentially the same, if and only if there is a renaming of the colors in one of them, followed by an automorphism of K m,n , which carries one coloring onto the other.It is not stated in Lemma 3.1, but inspection of the proof shows that under the hypothesis of the lemma, either the JL-colorings of ⟨R⟩ and ⟨R ′ ⟩, or of ⟨S⟩ and ⟨S ′ ⟩, are essentially the same.This is plainly the case if {R, S} = {R ′ , S ′ }; in fact, the coloring of ⟨R⟩ and ⟨R ′ ⟩ and of ⟨S⟩ and ⟨S ′ ⟩, or of ⟨R⟩ and ⟨S ′ ⟩ and of ⟨S⟩ and ⟨R ′ ⟩, are identical in that case.The equality {R, S} = {R ′ , S ′ } can fail only if 0 ∈ {r 1 , r 2 , s 1 , s 2 }, and the proof of Lemma 3.1 shows that when this occurs, then one of (1, 0), (0, 1) is an element of {(r 1 , r 2 ), (s = (1, 0), then clearly ⟨R⟩ and ⟨R ′ ⟩ are both single vertices, with the JL-coloring with zero colors, and ⟨S⟩ ∼ = ⟨S ′ ⟩ ∼ = K m−1 , n, and if ⟨S⟩ and ⟨S ′ ⟩ are not identical as subgraphs of K m,n then you can get one from the other by switching two vertices of X interchanging the names of two colors, green and blue, in the proof of Lemma 3.1.This is a bit messy, admittedly, but we claim, after this discussion, to have shown the following.
Theorem 3.2 Suppose m, n ≥ 1, and m ≤ n.The equivalence classes of essentially different JL-colorings of K m,n are in natural one-to-one correspondence, as described above, with the equivalence classes of JL-labeled full binary trees with the root labeled (m, n).
In Figure 2 we have the tree of Figure 1 with the JL-labelings generated by two admissible labelings of the leafs.In the first, the leaf labelings differ from those in Figure 1 at only one leaf.In the second, the leaf labelings differ from those in Figure 1 at two leafs.
Figure 2: the tree of Figure 1 with two different JL-labelings, both (obviously) essentially different from each other, but also (not so obviously, in one case) from the labeling in Figure 1.
Obviously our purpose in displaying Figure 2, for comparison with Figure 1, is to show, as claimed earlier, that the same full binary tree can be labeled in different ways so as to represent JL-colorings of K m,n and of K a,b , (a, b) / ∈ {(m, n), (n, m)} as well as different JL-colorings of K m,n .We note that one of these variations is not possible if 1 ∈ {m, n} : K 1,n has only one JL-coloring, up to equivalence, and so the labeled full binary tree representing that coloring, depicted in Figure 3, cannot be relabeled to represent a different JL-coloring of 1,n .For n ≥ 3, however, it can be relabeled to give JL-colorings of K a,b for all a, b satisfying 2 ≤ a ≤ b, a + b = 1 + n.
If 2 ≤ m = n then there is more than one JL-coloring of K m,m , but for some of these colorings the labeled tree representing the coloring cannot be relabeled to represent a different JL-coloring of any sort, neither of K m,m nor of any K a,b , a ̸ = b, a + b = 2m.To see this, observe that if m = n we can form a full binary tree (in fact quite a few non-isomorphic ones, if m is large) with 2m leafs such that each leaf is the sibling of another leaf.Since sibling leafs must be labeled with (0, 1), (1, 0) in a JL-labeling of a full binary tree, there can be essentially only one JL-labeling of such a tree.
In the only JL-coloring of K 1,n , each of the n colors appears exactly once.This raises the question: for m, n ≥ 2, what are the possible values of the number of colors that appear exactly once in a JL-coloring of K m,n ?Theorem 3.3 If 2 ≤ m ≤ n, then the number of colors that appear on exactly one edge in a JL-coloring of K m,n can be any number in the set {2, . . ., m + n − 2}, and cannot be greater than m + n − 2, nor less than 2.
(1, 1) 2 ⌋}.To accomplish this, change k − 1 of the leaf labels (0, 1) (leaving the bottom such leaf alone) to (1, 0).Proof: Suppose that m, n ≥ 2 and that K m,n is JL-colored.Let R, S, X, Y , and r 1 , r 2 , s 1 , s 2 be as in Lemma 3.1.We claim that r 1 s 2 + r 2 s 1 ≥ 2. This obviously holds if r 1 , r 2 , s 1 , and s 2 are all positive.If, say, r 1 = 0, then 2 ≤ m = r 1 + s 1 = s 1 and so Therefore, there are at least 2 R-to-S edges, and those edges bear the same color.Consequently, at least one of the m + n − 1 colors appearing in the JL-coloring appears more than once.Therefore, no more than m + n − 2 colors can appear exactly once, in a JL-coloring of K m,n .
To show that the number of colors appearing exactly once in a JL-coloring of K m,n can be any z ∈ {2, . . ., m+n−2}, and cannot be less than 2, we will proceed by induction on m + n.When m + n = 4, m = n = 2; we leave it to the reader to verify that there are essentially two different JL-colorings of K 2,2 , and that in each of them, exactly 2 colors appear exactly once each.Now suppose that m + n ≥ 5, and 2 ≤ m ≤ n.For any JL-coloring of K m,n , the root and its children in the JL-labeled tree that represents the coloring look like with r 1 , r 2 , s 1 , s 2 as in Lemma 3.1.Further, every such diagram in which r 1 , r 2 , s 1 , s 2 are non-negative integers as in Lemma 3.1 can be completed to a JL-labeled full binary tree representing a JL-coloring of K m,n .This first part of the tree dictates the coloring of r 1 s 2 + r 2 s 1 ≥ 2 edges of K m,n with one color, as already noted.
The children of the root, labeled (r 1 , r 2 ) and (s 1 , s 2 ), are themselves the roots of JL-labeled full binary trees representing JL-colorings of K r 1 ,r 2 and K s 1 ,s 2 .In the JLcoloring of K m,n , the sets of colors on K r 1 ,r 2 and K s 1 ,s 2 are disjoint.Clearly the number of single-appearance colors in the JL-coloring of K m,n is the sum of those numbers in the JL-colorings of K r 1 ,r 2 and K s 1 ,s 2 defined by the labeled subtrees.

Counting the JL-colorings of K m,n
In [5] recursion formulae are given for the number of essentially different edge-colorings of K n , with n − 1 colors appearing, which avoid rainbow cycles.Let f (m, n) stand for the number of essentially different JL-colorings of K m,n .Then f (m, n) = f (n, m) for all admissible m and n, and f (1, n) = 1, n = 0, 1, 2, . . . .We have tried to obtain recursion formulae for f (m, n), m, n ≥ 2, analogous to those in [5].We admit defeat.However, we are quite sure that f (m, n) can be computed by a recursive algorithm.We shall not attempt to formalize such an algorithm here -but we will mention some of the considerations and pitfalls to be noted and navigated in formulating such an algorithm.
In the terms of Lemma 3.1, by Theorem 2.4 every JL-coloring of K m,n , 2 ≤ m ≤ n, is associated with an ordered pair (r 1 , r 2 ) ∈ {(0, 1), (1, 0)} ∪ {(k, t)}1 ≤ k ≤ m − 1, 1 ≤ t ≤ n − 1} and is one of the colorings obtained by putting JL-colorings of disjoint subgraphs K r 1 ,r 2 and K m−r 1 ,n−r 2 of K m,n together, with disjoint color sets appearing in the two JL-colorings and with a new color on all the edges between the two subgraphs.Clearly f (r 1 , r 2 )f (m − r 1 , n − r 2 ) counts all the ordered pairs (equivalence class of a JLcoloring of K r 1 ,r 2 , equivalence class of a JL-coloring of K m−r 1 ,n−r 2 ).Each of these ordered pairs is associated with an equivalence class of a JL-coloring of K m,n .The difficulty is that different ordered pairs can give rise to equivalent JL-colorings of K m,n .Usually these and (1, 1).The two JL-colorings associated with the first 4 of these choices are equivalent, whence f (2, 2) = 2.But taking the two different, but equivalent, JL-colorings of K 2,2 associated with (r 1 , r 2 ) = (1, 2) and (r 1 , r 2 ) = (2, 1), as "components" of JL-colorings of K 2,3 , gives two non-equivalent JL-colorings of K 2,3 .So our formula failed to count one equivalence class of JL-colorings of K 2,3 .
This new difficulty is far from insurmountable-but this paper has gone on long enough; we leave unanswered questions for the amusement of the reader.

Lemma 3 . 1
Suppose that m, n ≥ 1, K m,n has bipartition X, Y , with |X| = m, |Y | = n, and that K m,n is JL-colored.Let R, S and R ′ , S ′ be two partitions of V (K m,n ) into nonempty sets satisfying the requirements in Theorem 2.4.Let r 1

is dedicated to v i , is the only color dedicated to v i , and appears on no other edge of K m,n than uv i . Proof: Let c i be
the color of the edge uv i , i = 1, 2. Because there are no rainbow C 4 's, for each vertex x ̸ = u on the same side of the bipartition of K m,n as u, the colors on xv 1 and xv 2 are the same, and not the same as either c 1 or c 2 , because those colors are dedicated to u.Since the color on xv 1 and xv 2 is on edges incident to v 1 and to v 2 , this color can be dedicated to neither v 1 nor v 2 .Therefore c i is the only color dedicated to v i , i = 1, 2.Since c i is dedicated to both u and v i , c i occurs on no edge other than uv i , i = 1, 2. If m = n = 1 then both vertices of K m,n have exactly one color dedicated to them-the one color on the only edge of the graph.If m = 1 < n then the m + n − 1 = n vertices on one side of the bipartition each has a single color dedicated to it, because there are n colors appearing and only n edges to be colored.If m, n ≥ 2, then, by Lemma 2.2, if even one vertex of K m,n has more than one color dedicated to it, there must be two other vertices that each have only one dedicated color.□