Rainbow spanning trees in randomly coloured
Abstract
Given a graph on vertices and an assignment of colours to its edges, a set of edges is said to be rainbow if edges from have pairwise different colours assigned to them. In this paper, we investigate rainbow spanning trees in randomly coloured random graphs.
1 Introduction
Let be a graph in which the edges are coloured. A set is said to be rainbow coloured if each edge of is in a different colour. There is by now a large body of research on the existence of rainbow structures in randomly coloured random graphs. Let us highlight a few selected results. Frieze and McKay [14] and Bal, Bennett, Frieze and Prałat [1] studied the existence of rainbow spanning trees in , the classical Erdős–Rényi random graph process. Cooper and Frieze [6], Frieze and Loh [13] and Ferber and Krivelevich [10] studied the existence of rainbow Hamilton cycles in . Janson and Wormald [15] studied the existence of rainbow Hamilton cycles in random regular graphs. Finally, Bal, Bennett, Pérez-Giménez and Prałat [2], investigated rainbow perfect matchings and Hamilton cycles in random geometric graphs. Of the most popular random graph models, what is missing here is the random multigraph . The aim of this paper is to initiate the study of these problems in the context of a randomly coloured graphs.
All asymptotics throughout are as (we emphasize that the notations and refer to functions of , not necessarily positive, whose growth is bounded). We say that an event in a probability space holds with high probability (or w.h.p.) if the probability that it holds tends to one as . We often write when we mean a graph drawn from the distribution .
The random graph is defined as follows. It has vertex set and each vertex independently chooses random distinct neighbours from , so that each of the sets is equally likely to be chosen. It was shown by Fenner and Frieze [8] that is -connected w.h.p. for . It was shown by Frieze [11] that has a perfect matching w.h.p., and by Bohman and Frieze [3] that is Hamiltonian w.h.p. All of the above results are sharp. For more details we direct the reader to Chapter 18 in [12].
We define the randomly coloured graph (not to be confused with ) as follows: the underlying graph on vertices is and (i) there is a set of colours, (ii) each colour appears or times (there are popular colours that appear times, the remaining colours are unpopular and appear times; note that if divides , then all colours are unpopular), (iii) colours, including repetitions, are randomly assigned to the edges of . Finally, let us note that, without loss of generality, we may assume that . Indeed, if the number of colours is more than , then some colours are not used at all and the problem is equivalent to the one with .
In this paper we investigate spanning trees. We will prove the following theorem.
Theorem 1.
If and , then has a Rainbow Spanning Tree (RST) w.h.p.
The result is best possible. Trivially, if , then there are not enough colours to create a rainbow tree. If , then is disconnected w.h.p. [8].
2 Preliminaries
2.1 Colour Monotonicity
In our problem, we randomly colour edges of with colours and we aim to create a rainbow structure. Recall that there are popular colours that are present times and unpopular colours that are present times.
It is natural to expect that the more colours are available, the easier it is to achieve our goal. We prove this monotonicity property in the following, slightly broader, context. Suppose that we are given a finite set and a set of colours where . (In our application, is the set of edges of and is the set of colours: colours from set , including repetitions.) We also have two distinct partitions of : and , for some positive integer . (In our application, each part corresponds to a colour from set . Partitions and correspond to colourings with and colours respectively.) Let , , , and . Suppose that for and for , that is, there are parts in of size and parts of size .
We are given a collection of sets , each set is a subset of . (In our application, the are the edges of spanning trees, perfect matchings, Hamilton cycles, etc.) Our goal is to create at least one rainbow set from this collection. Let us consider a random colouring of via a random bijection from to . In order to show that the probability that some is rainbow in a random colouring with colours is at least the corresponding probability when elements of are coloured with colours, we need to couple the two partitions. In order to do that we need to consider two cases.
Case 1: . Partition is obtained from by choosing parts in of size and replacing them with parts of size (see Figure 1). We couple the two colourings by first randomly mapping the colours from the parts that are the same in both partitions, and conditioning on the result. If some rainbow is created, then it is clearly present in both colourings. Otherwise, it is easy to see that partition is at least as likely to complete a rainbow colouring. Indeed, suppose that some has elements that are not coloured yet; we may assume that as, otherwise, such a set cannot be rainbow via the first partition (it could be rainbow via the second partition if ). The probability that partition completes a rainbow colouring is equal to that is at most the corresponding probability for partition , namely, .

Case 2: . As before, we start with partition but this time we take all parts of size (possibly so we might not have any) and we choose parts of size . To create partition , we replace them with parts of size and parts of size . As in the other case, either we create some rainbow or partition is at least as likely to complete a rainbow colouring of some set .
The above coupling allows us to concentrate on the minimum number of colours. In particular, in the proof of Theorem 1, without loss of generality, we may assume that .
2.2 Degree Monotonicity
Based on Section 2.1, in order to prove Theorem 1 we may assume that . In this setup, there are popular colours present times in and unpopular colours present times in . Exactly one out of copies of each popular colour is called special. Similarly, there are popular colours present times in , unpopular colours present times, and there are special copies of popular colours (one special copy of each).
It seems reasonable to expect that if has a particular rainbow structure w.h.p., then so does . Let be the bipartite graph with vertex sets and , where is a “dummy” vertex that will be associated with special copies of popular colours. For each of the edges chosen by in , we observe a colour of that edge without exposing its other endpoint. If a copy of colour is non-special, then we add an edge between and in ; otherwise, we add an edge between and the “dummy” vertex . Note that we need the extra vertex to make regular.
Recall that colours, including repetitions, are randomly assigned to the edges of . Hence, is distributed as a random -regular bipartite (multi)graph (where multiple edges are allowed but not loops). Indeed, it fits the bipartite configuration model of Bollobás [4]. Each vertex could be replaced by a distinct set of points, each colour naturally corresponds to points associated with non-special copies of that colour, and the “dummy” vertex corresponds to points associated with special copies of popular colours. Then, we randomly pair these points to get the colouring of the edges of . Note that contains no information about the actual vertex choices of edges in , only their colour. Informally, we can think of each edge of being associated with a box containing a random vertex from . We do not need to open these boxes for what is next.
We will use the fact that is contiguous to the sum of independent random perfect matchings—see the survey on random regular graphs by Wormald [18]. If we delete one of these matchings, then we obtain a random -regular bipartite graph contiguous to . Arguing as before, we observe that may be viewed as a random assignment of colours, including repetitions, to the edges of . “Opening” the boxes on each edge of gives us , which by assumption has a required rainbow structure w.h.p. So, using the above coupling we conclude that also has a rainbow structure w.h.p.
3 Rainbow Spanning Trees
To establish the existence of a RST to prove Theorem 1, we will use the result of Edmonds [7] on the matroid intersection problem. A finite matroid is a pair , where is a finite set (called the ground set) and is a family of subsets of (called the independent sets) with the following properties:
-
•
,
-
•
for each , if , then (hereditary property),
-
•
if and are two independent sets of and has more elements than , then there exists an element in that when added to gives a larger independent set than (augmentation property).
A maximal independent set (that is, an independent set which becomes dependent on adding any element of ) is called a basis for the matroid. An observation, directly analogous to the one of bases in linear algebra, is that any two bases of a matroid have the same number of elements. This number is called the rank of . For more details on matroids see, for example, [16].
In this scenario, are matroids over a common ground set with rank functions , respectively. Edmonds’ general theorem shows that
(1) |
where is the rank of the matroid induced by .
In our application, the common ground set is the set of coloured multi-edges of . is the cycle matroid of the graph ; that is, is independent in if induces a graph with no cycle (colours are ignored, two parallel edges are considered to be a cycle of length 2). Hence, for every we have , where is the number of components of the graph induced by . is the partition matroid associated with the colours; that is, is independent in if has no two edges in the same colour. This time, for every we have that is the number of distinct colours occurring in . We use Edmonds’ theorem to get the following useful observation that has been used a number of times in related contexts. In temporal order, it was used by Fenner and Frieze [9], Frieze and McKay [14] and by Suzuki [17].
Lemma 2.
Let be a multigraph in which each edge is coloured with a colour from a set . A necessary and sufficient condition for the existence of a RST is that
(2) |
where is the set of edges of colour from set .
Proof.
Clearly, has a rainbow spanning tree if and only if contains a set of coloured edges of size such that is independent both in ( induces a spanning tree) and in ( is rainbow). Since no set of size at least is independent in , the necessary and sufficient condition is that the right side of (1) is at least . Hence, the desired condition is that for every partition of the edge set into and we have .
Let us fix a partition of into and . Let be the set of colours occurring in , be the set of edges coloured with a colour from , and . Clearly, is also a partition of , and so , and . Moreover, since , and so
Therefore, without loss of generality, we may restrict ourselves to sets containing all edges of colour from some set and then take (that is, and ). The condition to verify is the following:
which is equivalent to (2). The proof of the lemma is finished. ∎
Recall that , , and so . For a given , we define the event
Trivially, cannot occur. Since each colour of is used at least once, cannot occur as well: if , then but . With some additional work we can eliminate and as well. Note that in , the probability that a vertex chooses as a neighbour and vice versa is . Hence by linearity of expectation, the expected number of multiple edges in is . The probability that both edges in a multiple edge receive the same (fixed) colour in is and so the expected number of monochromatic multiple edges in is . It follows from the first moment method that w.h.p. there are no monochromatic multiple edges. Since we aim for a statement that holds w.h.p., we may assume that this property is satisfied. We get that if , then but . Similarly, the expected number of triples of colours such that there are two multiple edges that use only these colours is . Hence, we may assume that for any of size 3, and so whereas . Finally, note that cannot occur w.h.p. since is connected w.h.p.
We know that if there is no RST, then occurs for some . Let us concentrate on a minimal , corresponding set , and let . Let us start with the following simple but useful observation.
Claim 1.
has no bridges.
Proof.
If there is a bridge in , then we simply remove it and all edges of the same colour. The number of components increases by at least one and the number of colours decreases by one. Clearly, occurs, contradicting the minimality of . ∎
Recall that . Suppose then that has isolated vertices and non-trivial components for some integer . Let be the set of vertices in the non-trivial components of . By Claim 1, has no bridges. Since non-trivial components without bridges have at least three vertices,
(3) |
which gives us that
Let denote the event
(Here because we are dealing with bridgeless components and as each colour appears at least times.) Clearly,
(4) |
and we will bound the probability of to deal with small values of , that is, for .
3.1
Recall that , , and . There are unpopular colours that appear times and popular colours that appear times.
Note that
where the second sum is taken over all integers , such that . Indeed, in order to estimate , we consider all possibilities for (the first sum) and all sets of size (the term ). We independently consider sets of colours with unpopular colours and popular ones (the second sum). Then, we need to select specific colours (the term ). Since all edges coloured with are contained in , we need to select which of the edges of generated by vertices of are coloured with (the term ). The selected edges need to stay within (the term ) and be coloured with (the last term).
Clearly, . Moreover, since and ,
We get that
Since , , and , we get
Note that since the ratio between the -st and the -th term is
the above sum is of the order of its last term. We get that
Clearly, , since the sum is dominated by its first term.
3.2
We first bound the number of pairwise vertex disjoint cycles in , including loops (cycles of length 1) and parallel edges (cycles of length 2). In our application, we concentrate on but the following bound holds in general.
Lemma 3.
Fix any integer . W.h.p. no family of pairwise vertex disjoint cycles in consists of more than cycles.
Proof.
Let . Let denote the number of cycles of length at most in (possibly overlapping). There are cycles of length that one can form out of labelled vertices. For a given pair of vertices, the probability that there is an edge between them is clearly at most . Hence,
Since the ratio between the two consecutive terms (st and th) is ,
The Markov inequality implies that w.h.p.
On the other hand, there are trivially at most pairwise vertex disjoint cycles of length greater than , and the lemma follows. ∎
For the next property we need, we assume that . As in Section 2.2, let be the bipartite (multi)graph with vertex sets and , where is a “dummy” vertex associated with special copies of popular colours. There is an edge in if one of ’s choices has non-special copy of colour ; as before, an edge occurs in if one of ’s choices is one of the two special copies of popular colours. is a random 2-regular bipartite graph. Any 2-regular graph is a collection of cycles. We will use a well-known and easy to prove fact that w.h.p. there are not too many cycles in . For completeness, we provide an elementary proof.
Lemma 4.
contains at most cycles w.h.p.
Proof.
Let denote the number of cycles in . We will use the configuration model of Bollobás [4] to estimate ; see also Chapter 11 of Frieze and Karoński [10]. Let us select any vertex and any of the two points in it. We expose the other endpoint of that edge associated with vertex , and move on to the other point associated with . We continue the process until the first cycle is discovered. Then, we select any other point that is not matched yet and continue from there. The probability of closing a cycle at th step of this process is precisely . Indeed, points are matched before step and one point is considered at th step, so there are points available to be matched with the considered point to form an edge; only one of these points (namely, the one associated with vertex we start with) closes the cycle. We get that
Showing concentration of around its expectation is easy but, since we aim for a slightly weaker result, we may trivially use the Markov inequality to get the desired bound that holds w.h.p. ∎
We continue concentrating on a minimal (in the range for considered in this section) for which occurs and the corresponding set . We let and we expose , the sub-graph induced by . In particular, and we may assume that is bridgeless by Claim 1. Let denote the number of isolated vertices of . Since is bridgeless, each non-trivial component has a cycle. Hence, the number of non-trivial components, , is bounded by the number of pairwise disjoint cycles. By Lemma 3, we may assume that . It follows that
(5) |
Almost all sets of colours yield a graph with many isolated vertices ensuring that (5) does not hold. Only a small fraction of possible sets of colours need special attention. We will use to estimate how many different configurations we need to take care of.
Let us concentrate on the set of edges incident with colours in , ignoring the two edges incident with a “dummy” vertex . (Note that removing at most two edges from may only increase the number of isolated vertices, so , where is the number of isolated vertices in ; is the set obtained from after removing the edges incident with special copies of popular colours (there are at most two such edges).) By Lemma 4, this set of edges in induces a graph consisting of cycles and paths. The endpoints of paths in must be in and so each path corresponds to two distinct non-isolated vertices of . Let be the number of vertices in in that are of degree 2 (vertices on cycles or internal vertices on paths); they also correspond to non-isolated vertices of . The remaining vertices in are isolated and the corresponding vertices in might be isolated. Note that we did not expose edges yet only assigned colours. It is possible that after exposing edges such vertices will be chosen by other ones and become non-isolated. In any case, . By comparing the number of edges in incident to with the number of edges incident to , we get so . Combining the two observations together, we get .
Let us assume then that . Let denote the set of vertices in that are covered by paths and cycles, and let . As argued above, and so since and . Vertices in correspond to non-isolated vertices in . Vertices in corresponding to vertices in that are isolated in do not generate any random edges but it does not mean that they are isolated in . Let denote the set of vertices that are incident with an -coloured edge in and are chosen by some vertex in . It is important to notice that we have not conditioned on the other endpoints of the choices in (endpoints of random edges generated by vertices in corresponding to vertices in in ). We may expose these edges now, one at a time, each time updating set . Provided that , we add a new vertex to with probability at least . Let with . The established coupling implies that
and so the Chernoff’s bounds imply that
Now, we need to estimate the number of configurations we need to investigate. After orienting (arbitrarily) cycles in , there are at most choices for the beginnings and at most choices for the endings of paths. Such choices yield paths in . By Lemma 4, there are at most choices to determine which cycles from should stay in . Hence, the number of configurations (different bipartite graphs ) we need to deal with is at most
Comparing it with an upper bound for the failure probability for each configuration, we get that if and , then w.h.p. . Since , we get that
contradicting (5).
3.3
The two special copies of the two popular colours can give us some unnecessary technical problems in the following calculations. So let us delete the two edges, , associated with special copies so that each colour is used exactly twice. The graph obtained this way has edges. Deleting edges can only increase the number of connected components so it suffices to prove that this quantity is small enough to satisfy (2) after the deletion. It is straightforward to show that remains connected w.h.p. but we will not need this fact in our argument.
For the range of considered in this section, it is easier to concentrate on the largest set of colours and the associated set of edges for which has too many components i.e. , in violation of (2). Note that for every colour not in , the two edges of colour in join distinct components of ; otherwise, also yields a graph with too many components. This means that there are no edges of colour belonging to in joining vertices in the same component of . Put another way, let be the event in that we can find colours and the associated unique pairs of edges such that
-
(i)
,
-
(ii)
each pair in has the same colour (that is distinct from colours of other pairs in ),
-
(iii)
has at least components, and
-
(iv)
no edge of joins two vertices of the same component of .
We have to show that is unlikely, for .
Suppose that are the components of . Let . We will use for the number of choices of in outside its component in , and let . Note that the number of edges in component is . Hence,
(6) |
as otherwise there are not enough edges inside to get connectivity. It follows that
where
Indeed, we first need to choose the colours which can be done in ways. There are at least components in but, since we removed exactly edges from to get , the number of them is at most . We then need to choose the component sizes and the components in ways. Function removes an implicit ordering of the components in the multinomial coefficient. We then consider all possibilities for the number of coloured edges (the edges present in ) leaving each component in ways. The factor accounts for choosing which of the edges generated by vertices in have colour in and are not one of the two special edges, . The factor (respectively, ) is the probability that the edge choice of a vertex in is in (respectively, not in ). Finally, we need to make sure that the edges we identified received precisely the non-special copies of the colours we selected. This happens with probability as any set of colours from the set of available colours (including repetitions and including special copies) is assigned to these edges with uniform probability; only one of them has colours that are exactly the ones we selected at the very beginning (note that special colours were excluded then).
Continuing,
(7) |
Let us prove the following simple structural property of . It will imply that the largest component (of size ) has size asymptotic to .
Lemma 5.
For , let denote the number of choices by vertices in that are not in , and let denote the number of edges in that are between and its complement. Then, w.h.p. the following property holds for any such that :
for all , we have . |
Proof.
We will independently deal with small and large sets by proving the following statement. For any such that , the following two properties hold with probability :
-
(a)
for all , we have . (8) -
(b)
for all , we have . (9)
Note that, since ,
so property (a) holds.
To see that property (b) holds too, note that
where . (In the above computation, corresponds to and corresponds to .) ∎
The lemma implies that we may assume that
(10) |
otherwise, the number of edges joining distinct components in would be greater than . Hence, we may rewrite (7) as follows:
Define
Note that if , then
and so . Using this observation, we get that
Unfortunately, the constant
associated with the sum over all possible values of is too large for the final argument to follow. Fortunately, any constant smaller than would work. We may squeeze a bit more by using the following observation. Since (see (10)) and , there are at most values of , , that are at least ( certainly is at least 18); the remaining ones are at most 17. It is important to notice that the sequence of ’s is non-increasing so we conclude that at least the last values of are at most 17. As a result, since (see (6)), the corresponding values of ’s are at most 18 (we will refer to them as small). The contribution from small ’s is , where
We get that
where
It follows that
Now, for a given sequence and an integer , , let us define
and suppose that . Then, since is an increasing function of (tending to but we do not need this fact) and
we get that
It implies that the terms corresponding to sequences of ’s with larger values of (smaller values of in our bound) are much larger. On the other hand, there are more sequences with smaller values of (larger values of ) to consider. However, since and , there are only choices for the sequence of ’s to consider. Combining the two observations together, we get that the term corresponding to (and the associated unique sequence of ’s) is a dominating term:
Note that the ratio between the st term and the th one is
Hence,
(11) |
If is a constant, then . In order to investigate larger values of , note that the ratio between the st term and the th one is
Hence, if is sufficiently large (say, ) the ratio is at most, say, . Combining the two observations together, we get that
That finishes the proof of Theorem 1.
4 Matchings and Hamilton Cycles
In this paper, we dealt with rainbow spanning trees proving the strongest possible result, both in terms of , the number of colours, and , the degree of the associated random graph. We leave investigating other rainbow structures for future research.
Recall that it was shown by Frieze [11] that has a perfect matching w.h.p., and by Bohman and Frieze [3] that is Hamiltonian w.h.p. Both results are sharp. Hence, based on our observation in Section 2.1, it is natural to investigate the following questions.
-
•
What is the smallest value of such that has a Rainbow Perfect Matching (RPM) w.h.p.? (Trivially, and as is rainbow.)
-
•
What is the smallest value of such that has a Rainbow Hamilton Cycle (RHC) w.h.p.? (Trivially, and as is rainbow.)
References
- [1] D. Bal, P. Bennett, A. Frieze, and P. Prałat, Power of choices and rainbow spanning trees in random graphs, Electronic Journal of Combinatorics 22(1) (2015), #P1.29.
- [2] D. Bal, P. Bennett, X. Pérez-Giménez, and P. Prałat, Rainbow perfect matchings and Hamilton cycles in the random geometric graph, Random Structures and Algorithms 51(4) (2017), 587–606.
- [3] T. Bohman and A.M. Frieze, Hamilton cycles in 3-out, Random Structures and Algorithms 35 (2009), 393–417.
- [4] B. Bollobás, A probabilistic proof of an asymptotic formula for the number of labelled graphs, European Journal on Combinatorics 1 (1980) 311–316.
- [5] B. Bollobás, Random graphs, Academic press, 1985.
- [6] C. Cooper and A.M. Frieze, Multi-coloured Hamilton cycles in random edge-coloured graphs, Combinatorics, Probability and Computing 11 (2002), 129–134.
- [7] J. Edmonds, Submodular functions, matroids and certain polyhedra, in Combinatorial Structures and their Applications, R.Guy et al, eds., Gordon and Breach, 1970, 69–87.
- [8] T.I. Fenner and A.M. Frieze, On the connectivity of random -orientable graphs and digraphs, Combinatorica 2 (1982), 347–359.
- [9] T.I. Fenner and A.M. Frieze, On the existence of polychromatic sets of edges in graphs and digraphs, Progress in Graph Theory, Edited by J.A. Bondy and U.S.R. Murty, Academic Press, (1984) 219-232.
- [10] A. Ferber and M. Krivelevich, Rainbow Hamilton cycles in random graphs and hypergraphs, Recent trends in combinatorics, IMA Volumes in Mathematics and its applications, A Beveridge et al, Eds., Springer 2016, 167–189.
- [11] A.M. Frieze, Maximum matchings in a class of random graphs, Journal of Combinatorial Theory B 40 (1986), 196–212.
- [12] A.M. Frieze and M. Karoński, Introduction to Random Graphs, Cambridge University Press, 2015.
- [13] A.M. Frieze and P. Loh, Rainbow Hamilton cycles in random graphs, Random Structures and Algorithms 44 (2014), 328–354.
- [14] A. Frieze and B.D. Mckay, Multicoloured trees in random graphs, Random Structures and Algorithms 5 (1994), 45–56.
- [15] S. Janson and N. Wormald. Rainbow Hamilton cycles in random regular graphs, Random Structures Algorithms, 30(1-2) (2007), 35–49.
- [16] J. Oxley, Matroid Theory, Oxford: Oxford University Press, 1992.
- [17] K. Suzuki, A necessary and sufficient condition for the existence of a heterochromatic spanning tree in a graph, Graphs and Combinatorics 22 (2006) 261-269.
- [18] N.C. Wormald, Models of random regular graphs, In J.D. Lamb and D.A. Preece, editors, Surveys in Combinatorics, 1999, volume 267 of London Mathematical Society Lecture Note Series, Cambridge University Press (1999) 239-298.