On-line list colouring of random graphs

In this paper, the on-line list colouring of binomial random graphs G(n,p) is studied. We show that the on-line choice number of G(n,p) is asymptotically almost surely asymptotic to the chromatic number of G(n,p), provided that the average degree d=p(n-1) tends to infinity faster than (log log n)^1/3(log n)^2n^(2/3). For sparser graphs, we are slightly less successful; we show that if d>(log n)^(2+epsilon) for some epsilon>0, then the on-line choice number is larger than the chromatic number by at most a multiplicative factor of C, where C in [2,4], depending on the range of d. Also, for d=O(1), the on-line choice number is by at most a multiplicative constant factor larger than the chromatic number.


Introduction
The combinatorial game we study in the paper is played by two players, named Mr. Paint and Mrs. Correct, and is played on a finite, undirected graph in which each vertex has assigned a non-negative number representing the number of erasers at the particular vertex. We assume for simplicity that this number is initially the same for each vertex. In each round, first Mr. Paint selects a subset of the vertices and paints them all the same colour; he cannot use this colour in subsequent rounds. Mrs. Correct then has to erase the colour from some of the vertices in order to prevent adjacent vertices having the same colour. Whenever the colour at a vertex is erased, the number of erasers at that vertex decreases by 1, but naturally, Mrs. Correct cannot erase the colour if she has no erasers left at that vertex. Vertices whose colours have not been erased can be considered as being permanently coloured and can be removed from the game. The game has two possible endings: (i) all vertices have been permanently coloured, in which case Mrs. Correct wins, or (ii) at some point of the game, Mr. Paint presents two adjacent vertices u and v and neither u nor v has any eraser left, in which case Mr. Paint wins. If, regardless of which sets she gets presented, there is a strategy for Mrs. Correct to win the game having initially k − 1 erasers at each vertex, we say that the graph is k-paintable. The smallest k for which the graph is k-paintable is called the paintability number of G, and denoted by χ P (G). Note that this parameter is indeed well defined: for any graph on n vertices, n − 1 erasers at each vertex always guarantee Mrs. Correct to win, as she can always choose one vertex from a set presented to her and erase colours on the remaining ones. This problem is also known as the on-line list colouring and the corresponding graph parameter is also called the on-line choice number of G-see, for example, [16] and below for the relation to the (off-line) list colouring.
Let us recall a classic model of random graphs that we study in this paper. The binomial random graph G (n, p) is defined as the probability space (Ω, F, Pr), where Ω is the set of all graphs with vertex set {1, 2, . . . , n}, F is the family of all subsets of Ω, and for every G ∈ Ω, Pr(G) = p |E(G)| (1 − p) ( n 2 )−|E(G)| . This space may be viewed as the set of outcomes of n 2 independent coin flips, one for each pair (u, v) of vertices, where the probability of success (that is, adding edge uv) is p. Note that p = p(n) may (and usually does) tend to zero as n tends to infinity.
The first author is supported in part by NSF Grant CCF0502793. The fourth author is supported in part by NSERC.
All asymptotics throughout are as n → ∞ (we emphasize that the notations o(·) and O(·) refer to functions of n, not necessarily positive, whose growth is bounded; whereas Θ(·) and Ω(·) always refer to positive functions). We say that an event in a probability space holds asymptotically almost surely (or a.a.s.) if the probability that it holds tends to 1 as n goes to infinity. We often write G (n, p) when we mean a graph drawn from the distribution G (n, p). Finally, for simplicity, we will write f (n) ∼ g(n) if f (n)/g(n) → 1 as n → ∞ (that is, when f (n) = (1 + o(1))g(n)). Now, we will briefly mention the relation to other known graph parameters. A proper colouring of a graph is a labelling of its vertices with colours such that no two adjacent vertices have the same colour. A colouring using at most k colours is called a (proper) k-colouring. The smallest number of colours needed to colour a graph G is called its chromatic number, and it is denoted by χ(G). Let L k be an arbitrary function that assigns to each vertex of G a list of k colours. We say that G is L k -list-colourable if there exists a proper colouring of the vertices such that every vertex is coloured with a colour from its own list. A graph is k-choosable, if for every such function L k , G is L k -list-colourable. The minimum k for which a graph is k-choosable is called the list chromatic number, or the choice number, and denoted by χ L (G). Since the choices for L k contain the special case where each vertex is assigned the list of colours {1, 2, . . . , k}, it is clear that a k-choosable graph has also a k-colouring, and so χ(G) ≤ χ L (G). It is also known that if a graph is k-paintable, then it is also k-choosable [13], that is, χ L (G) ≤ χ P (G). Indeed, if there exists a function L k so that G is not L k -list-colourable, then Mr. Paint can easily win by fixing some permutation of all colours present in L k and presenting at the i-th step all vertices containing the i-th colour of the permutation on their lists (unless the vertex was already removed before). Finally, it was shown in [16] that the paintability of a graph G on n vertices is at most χ(G) log n + 1. (All logarithms in this paper are natural logarithms.) Combining all inequalities we get the following: It follows from the well-known results of Bollobás [4], Luczak [11] (see also McDiarmid [12]) that the chromatic number of G (n, p) a.a.s. satisfies (2) χ(G (n, p)) ∼ log(1/(1 − p))n 2 log(np) , for np → ∞ and p bounded away from 1. The study of the choice number of G (n, p) was initiated in [1], where Alon proved that a.a.s., the choice number of G (n, 1/2) is o(n). Kahn then showed (see [2]) that a.a.s. the choice number of G (n, 1/2) equals (1 + o(1))χ G (n,1/2) . In [7], Krivelevich showed that this holds for p n −1/4 , and Krivelevich, Sudakov, Vu, and Wormald [8] improved this to p n −1/3 . On the other hand, Alon, Krivelevich, Sudakov [3] and Vu [15] showed that for any value of p satisfying 2 < np ≤ n/2, the choice number is Θ(np/ log(np)). Later, Krivelevich and Vu [10] generalized this to hypergraphs; they also improved the leading constants and showed that the choice number for C ≤ np ≤ 0.9n (where C is a sufficiently large constant) is at most a multiplicative factor of 2 + o(1) away from the chromatic number, the best known factor for p ≤ n −1/3 . Our results below (see Theorem 1, Theorem 2, and Theorem 3) show that even for the on-line case, for a wide range of p, we can asymptotically match the best known constants of the off-line case. Moreover, if np ≥ log ω n (for some function ω = ω(n) tending to infinity as n → ∞), then we get the same multiplicative factor of 2 + o(1).
Our main results are the following theorems. The first one deals with dense random graphs. Theorem 1. Let ε > 0 be any constant, and suppose that (log log n) 1/3 (log n) 2 n −1/3 p ≤ 1 − ε.
For constant p it is not true that log(1/(1 − p)) ∼ p but the order is preserved, provided p ≤ 1 − ε for some ε > 0.
For sparser graphs we are less successful in determining the asymptotic behaviour of χ P (G(n, p)). Nevertheless, we can prove the following two theorems that determine the order of the graph parameter we study.
Finally, for very sparse graphs we have the following.

Preliminaries
Most of the time, we will use the following version of Chernoff 's bound. Suppose that X ∈ Bin(n, p) is a binomial random variable with expectation µ = np. If 0 < δ < 1, then and if δ > 0, However, at some point we will need the following, stronger, version: for any t ≥ 0, we have where These inequalities are well known and can be found, for example, in [6].
Let G = (V, E) be any graph. A set S ⊆ V is called independent if no edge e ∈ E has both endpoints in S. Denote by α(G) the independence number of G, that is, the size of a largest independent set of G. Let k 0 be defined as follows: It is well known that k 0 is well defined (for all n sufficiently large and provided that p ≤ 1 − ε for some ε > 0) and that k 0 ∼ 2 log b (np) with b = 1/(1 − p). The following result was proved in [8].
Theorem 4 ( [8]). Suppose n −2/5 log 6/5 n p ≤ 1 − ε for some constant ε > 0. Let G ∈ G(n, p). Then We obtain the following immediate corollary that will be useful to deal with dense random graphs. In fact, this lemma is the bottleneck for the argument that prevents us to extend Theorem 1 for sparser graphs.
Corollary 5. Let ε > 0 be any constant and let ω = ω(n) = o(log n) be any function tending to infinity as n → ∞. Suppose that Moreover, since n/(ω log 2 n) ≤ s ≤ n, we can easily verify that p satisfies s −2/5 log 6/5 s p ≤ 1 − ε (with room to spare in the lower bound). It follows immediately from Theorem 4 that the probability of not having an independent set of size k 0 in S is at most On the other hand, the number of sets of size s can be bounded as follows: n s ≤ ne s s = exp (s log(ne/s)) ≤ exp (3s log log n) , since log(ne/s) ≤ log(eω log 2 n) = (2 + o(1)) log log n. Hence, the expected number of sets of size s for which the desired property fails is exp −Ω sω 2 log log n . Summing over all s ≥ s 0 , the expected number of all such sets is exp −Ω s 0 ω 2 log log n = o(1). The claim holds by Markov's inequality.
Given a graph G and some fixed ordering of its vertices (for example, we may assume that it is the natural ordering 1, 2, . . . , n), the greedy colouring algorithm proceeds by scanning vertices of G in the given order and assigning the first available colour for the current vertex. We will use the following lemma due to [9] (see also [5]). However, since we use it in a slightly different setting, we point out a few small differences in the argument by providing a sketch of the proof. In fact, this lemma is the bottleneck for the argument that prevents us to extend Theorem 2 for sparser graphs.
Note that in the lemma we set ω = log log n; other functions tending to infinity slower than log log n, constant, or even tending to 0 not too quickly clearly would work as well, but would make the statement of the result weaker.
Sketch of the proof. We follow the notation as in [9] and apply the greedy approach given there for each subgraph of size u. Let Note that since np ≥ log 2+ε n. (Note that, if np ≥ log C n, then we get the better estimate For a fixed subgraph of size u, it follows from [9] that the probability that the algorithm fails to produce an independent set of size at least α 0 is at most By taking a union bound over all sets of size u, the probability P u that there exists a subgraph of size u for which the algorithm fails is at most Summing over all u 0 ≤ u ≤ n, we see that the probability that the algorithm fails is at most (1), and the lemma follows.
Remark 7. Lemma 6 is sufficient to determine the order of the on-line choice number for sparse random graphs. We comment on improvements in order to obtain the smallest leading constant in the upper bound. From the proof of the lemma it is clear that the bound on the size of the independent set can be improved for denser graphs. More precisely, for np ≥ log ω n (for ω → ∞ but still p = o(1/ log n)), we can obtain independent sets of size at least (1 − 2ε) log(np)/p for any arbitrarily small ε, and so we are asymptotically just a factor 2 + o(1) off from the bound of Corollary 5.
On the other hand, for C being a constant larger than 2, and np = log C+o(1) n, we can obtain independent sets of size at least (1 − ε)(1 − 2/C + o(1)) log(np)/p (again, for any arbitrarily small ε), so by Lemma 6 we are off by a factor 2/(1 − 2/C) + o(1) = 2C/(C − 2) + o(1). We will now show that for log 2+ε n/n ≤ p = o(n −5/6 ), however, the independence number obtained is by at most a factor 4 + o(1) off from the one obtained by Corollary 5. First, as shown above, given u ≥ n/(ω log 2 n), there are at most exp(3u log log n) sets of size u, and the expected number of edges induced by each such set is u 2 p. By Chernoff's bound, the probability that the number of edges induced by one of them deviates by an additive u 2 p/ log log n factor from its expected value is at most exp −(1/ log log n) 2 u 2 p/5 . Hence, with probability at most there exists a set of size u that does not satisfy the condition. Summing over all n/(ω log 2 n) ≤ u ≤ n, we see that a.a.s. for all such sets we have (1 + o(1))u 2 p/2 edges. On the other hand, note that for this range of p, the expected number of pairs of triangles sharing one vertex in G is Θ(n 5 p 6 ) = o(1), and thus by Markov's inequality, a.a.s. every vertex is in at most one triangle. It follows that there exists a set D of edges which is a matching such that after removing D the graph is triangle-free. Since in G the average degree of every set of size u is up(1 + o(1)), the same also holds for G \ D. Since G \ D is triangle-free, by Shearer's lemma [14], an independent set of size (1 + o(1)) log(np)/p can be found. By eliminating at most half of the set (one vertex for each edge in D), we obtain an independent set in the original graph. It follows that for every set of size u, there exists an independent set of size at least log(np)/((2 + o(1))p), being therefore at most a factor 4 + o(1) off from the size obtained by Corollary 5.
We will also need the following observation.
Lemma 8. Let G ∈ G(n, p), for 10 log n/n ≤ p ≤ 1, and set s 0 = 10 log n/p. Then, a.a.s. the following holds: (i) every set S ⊆ V (G) with s 0 ≤ |S| ≤ n contains an independent set of size at least 1/(9p); (ii) for every i ∈ N and every set S ⊆ V (G) with 2 −i s 0 ≤ |S| < 2 −i+1 s 0 , S contains an independent set of size at least i/(9p2 i ).
Before we move to the proof of the lemma, let us note that the lower bound on p is not used in the proof of part (i), which becomes a trivial statement if p < 10 log n/n. For part (ii), we could easily relax this bound to p ≥ 1/n k (for any constant k > 0) by changing some of the constants in the statement. Furthermore, part (i) is trivially true for p ≥ 1/9, and part (ii) is only non-trivial for all i satisfying 9p2 i < i.
Proof. For part (i), let us fix a set S with |S| = s satisfying s 0 ≤ s ≤ n. Denote by E S the set of edges induced by S. We have E|E S | = s 2 p ∼ s 2 p/2. By Chernoff's bound, with probability at least 1−exp(−E|E S |/4), we have |E S | ≤ s 2 p. By taking a union bound over all n s ≤ exp(s log n) subsets of size s, with probability at most exp(s(log n − sp/9)) there exists a set of size s not satisfying the condition. Since, by assumption, s ≥ s 0 = 10 log n/p, this probability is at most exp(−s log n/9), and so summing over all s ≥ s 0 , the claim holds a.a.s. for all s in the desired range. We may therefore assume that (deterministically) every subset of size s ≥ s 0 satisfies |E S | ≤ s 2 p. Then, for any set S in the desired range, at least s/2 vertices of S have a degree of at most 4sp in the graph induced by S. By applying a greedy algorithm to these vertices, we can therefore always find an independent set of size at least (s/2)/(4sp + 1) ≥ 1/(9p).
Part (ii) is proved in a similar way. Fix i = i(n) ∈ N such that (4) 9p2 i < i (since otherwise the statement is trivial), and a set S ⊆ V (G) of size s satisfying the following: Since s is a natural number, we must have 2 −i+1 s 0 ≥ 1. Therefore, 2 i ≤ 2s 0 ≤ 2n (where we used that p ≥ 10 log n/n), and thus (6) i ≤ log(2n)/ log 2 ≤ 2 log n, for n large enough. Combining (5), (4), the fact that ps 0 = 10 log n, and (6), we get Note that for s ≥ 45, It follows from the stronger version of Chernoff's bound (3) that it is straightforward to see that for every i ∈ N, ϕ(2 i /i) ≥ 2 i /4.) As before, by a union bound we get that with probability at most exp(s(log n − 2 i sp/9)) there exists a set of size s not satisfying the condition. Since, by assumption, s ≥ 2 −i s 0 = 2 −i 10 log n/p, this probability is at most exp(−s log n/9), regardless of which precise interval [2 −i s 0 , 2 −i+1 s 0 ) contains s. Summing the exp(−s log n/9) bound we obtained over all values 45 ≤ s < s 0 gives o(1). Therefore, we may assume that (deterministically), for any i ∈ N, every subset S of size s in the range (5) satisfies Arguing as before, this guarantees that we can always find an independent set of size at least (s/2)/(4 · 2 i sp/i + 1) ≥ i/(9 · 2 i p).
(At the last step, we used that 4 · 2 i sp/i + 1 ≤ 4.2 · 2 i sp/i, which follows easily from (5), (6) and the definition of s 0 .) The proof of the lemma is finished.

Proof of Theorem 1
The lower bound follows immediately from (1). For the upper bound, we give a winning strategy for Mrs. Correct that a.a.s. requires only (1 + o(1))n/(2 log b (np)) erasers on each vertex, where b = 1/(1 − p). (Recall from (2) that a.a.s. χ(G) ∼ n/(2 log b (np)).) We emphasize that most probabilistic statements hereafter in the proof will not refer to G (n, p) but rather to the randomized strategy that Mrs. Correct uses to select each independent set, regardless of the strategy of Mr. Paint and assuming that G deterministically satisfies the conclusions of Corollary 5 and Lemma 8. Since p (log log n) 1/3 (log n) 2 n −1/3 , we can choose a function ω = o(log n) tending to infinity with n and such that p ≥ ω(log log n) 1/3 (log n) 2 n −1/3 . Note that our choice of ω satisfies the requirements of Corollary 5. Call a set S ⊆ V (G) large if |S| = s ≥ n/(ω log 2 n), small if s ≤ np/(ω log 2 n), and medium otherwise.
Whenever Mrs. Correct is presented a large set, she can, by Corollary 5 find an independent set of size k 0 = (2 + o(1)) log b (np), and uses erasers for all remaining vertices. Note that, trivially, at most large sets can be presented to her before the end of the game, and hence, for all large sets at most that many erasers on each vertex are needed.
Suppose now that a small set S is presented to Mrs. Correct. Then, she chooses a random vertex v ∈ S and accepts the colour on that vertex; for all other vertices of the presented set erasers are used. (Note that this is clearly not a optimal strategy; Mrs. Correct could extend {v} to a maximal independent set but we do not use it in the argument and so we may pretend that a single vertex is accepted.) Let X v denote the random variable counting the number of erasers used when small sets containing v are presented before eventually v gets a permanent colour (which does not necessarily happen when a small set is presented). We have (8) Pr and thus, by a union bound, a.a.s. for all vertices the number of erasers used for small sets is at most and so is negligible. Now, we are going to deal with medium sets. First, note that the size of a medium set is at least np/(ω log 2 n) ≥ 10 log n/p for the range of p considered in this theorem and by our choice of ω. Suppose that some medium set S is presented during the game. Applying Lemma 8 repeatedly, Mrs. Correct can partition S into independent sets of size 1/(9p) and a remaining set J of size at most 10 log n/p ≤ np/(ω log 2 n). The strategy is then the following: with probability 1/2 she chooses (uniformly at random) one of the independent sets of size 1/(9p) , and with probability 1/2 she chooses one vertex chosen uniformly at random from J (as before, this is clearly a suboptimal strategy but convenient to analyze). Selected vertices keep the colour; for the others erasers need to be used. We partition the vertices of S into two groups: group 1 consists of vertices belonging to independent sets, and group 2 consists of vertices of J. Our goal is to show that each vertex v appears in less than 3np/( √ ω log n) many medium sets, so that the total number of erasers needed to deal with these situations is negligible (see (9)).
Suppose that some vertex v appears in at least 3np/( √ ω log n) medium sets. Each time, the corresponding medium set is split into two groups, and we cannot control in which group v ends up. However, by Chernoff's bound, with probability 1 − o(n −1 ), at least np/( √ ω log n) times the group to which v belongs is chosen. We condition on this event. Note that if group 2 is chosen and v belongs to this group, the probability that v is not selected is at most 1 − ω log 2 n/(np) (as in (8) for small sets). Similarly, if group 1 is chosen and v belongs to this group, the probability that v is not chosen, is at most 1 − ω log 2 n/(9np), as each medium set has size at most n/(ω log 2 n).
Denote by Y v the random variable counting the number of erasers used for vertex v corresponding to medium sets, before eventually v gets a permanent colour. As in (8), and thus, as before, by a union bound, a.a.s. the desired bound for the number of erasers used for medium sets holds for all vertices.
Combining bounds for the number of erasers used for large, medium, and small sets, we get that, regardless of the strategy used by Mr. Paint, Mrs. Correct uses at most (1 + o(1))n/(2 log b (np)) erasers for each vertex, and the theorem follows.

Proof of Theorem 2
As in the proof of Theorem 1, the lower bound follows immediately from (1), and so it remains to show that Mrs. Correct has a strategy that a.a.s. requires only O(n/ log b (np)) erasers on each vertex (recall also (2)). We will use the same definitions for sets of being small, medium, and large as before, but we set here ω = log log n; as pointed out right after Lemma 6, other choices of ω are possible, but our choice gives the strongest result (as we assume the weakest condition). The argument for small sets remains exactly the same; a.a.s. it is enough to have o(n/ log b (np)) erasers on each vertex to deal with all small sets that Mr. Paint may present. To deal with large sets, by Lemma 6, since we aim for a statement that holds a.a.s., we may assume that whenever a large set is presented, Mrs. Correct can always find an independent set of size at least ε(1 − ε) log(np)/(3p), keeps the colour on these vertices, and uses erasers for all remaining vertices. The number of large sets presented is therefore at most 3(ε(1 − ε)) −1 np/ log(np) = O(n/ log b (np)), as needed. This is enough to determine the order of the on-line choice number but, if one aims for a better constant, then Remark 7 implies that for np = log C+o(1) n we are guaranteed to have an independent set of size i = i(C), where We will show below that the contribution of medium sets is of negligible order, and hence the upper bound on the number of erasers needed for large sets will also apply (up to lower order terms) to the total number of erasers needed. As a result, we will get the following bounds: , and (4 + o(1))χ(G) for C ∈ (2, 4). The strategy for medium sets has to be substantially modified. Suppose that a medium set S of size s is presented at some point of the game. Recall that np/(ω log 2 n) < s < n/(ω log 2 n), where ω = log log n. Since we aim for a statement that holds a.a.s., we may assume that Mrs. Correct can partition S in the following way: by applying Lemma 8(i) repeatedly, as long as at least s 0 = 10 log n/p vertices are remaining, she can find independent sets of size 1/(9p) , and remove them from S. (Note that for sparse graphs it might happen that s < s 0 and so the lemma cannot be applied even once. In such a situation, we simply move on to the next step.) If the number of remaining vertices, r, satisfies 2 −i s 0 ≤ r < 2 −i+1 s 0 for some i = i(n) ∈ N and r > np/(ω log 2 n), then by Lemma 8(ii), she can find an independent set of size i/(9p2 i ) . Then, she removes that independent set, and continues iteratively with the remaining vertices in S. Note that there are clearly M ≤ log n/ log 2 = O(log n) different sizes of independent sets corresponding to different values of i. Finally, if r ≤ np/(ω log 2 n), she puts all the remaining vertices into a set J (not necessarily independent), and stops partitioning.
We classify vertices in S into types depending on the size of the set in the partition of S to which they belong: more precisely, we call vertices from independent sets of size 1/(9p) to be of type-0; vertices from independent sets of size i/(9p2 i ) for some 1 ≤ i ≤ M are called of type-i; and vertices from the last set of vertices J of size at most np/(ω log 2 n) are called of type-(M + 1). Of course, these definitions depend on the particular time a set S is presented by Mr. Paint. In particular, if a vertex is presented several times by Mr. Paint, each time it might be of a different type. Finally, we classify vertices in S into 3 groups: vertices of type-0 form group-0, vertices of type-1 up to type-M form group-1, and vertices of type-(M + 1) form group-2.
Mrs. Correct now chooses with probability 1/3 one of the three groups. If group-0 is selected, she then picks uniformly at random one independent set within the group. In case when group-2 is selected, she picks uniformly at random a single vertex inside this group. Finally, if group-1 is selected, she first picks a random type. The probability that type-i is selected is equal to Then, within the selected type, an independent set is selected uniformly at random. If the group or type chosen by Mrs. Correct has no vertices in it, she picks no vertex to colour permanently, which is clearly a suboptimal strategy. Our goal is to show that a.a.s. each vertex v appears in less than many medium sets, before its colour is accepted. If this holds, then the number of erasers needed for each vertex (due to medium sets) is negligible. Suppose that some vertex v appears in at least 4np/( √ ω log(np)) medium sets. Since one of the three groups is selected uniformly at random for each medium set, we expect v to belong to the selected group at least (4/3)np/( √ ω log(np)) ≥ log 2+ε+o(1) n times. Hence, it follows from Chernoff's bound that, with probability 1 − o(n −1 ), at least np/( √ ω log(np)) times the group to which v belongs is chosen. Call this event E. It remains to show that, conditional on E, v will be permanently coloured with probability 1 − o(n −1 ) within the first np/( √ ω log(np)) times its group is picked for some medium set.
Note that if group-0 is selected and v belongs to this group, the probability that v is chosen to be permanently coloured, is at least (10) 1/(9p) n/(ω log 2 n) = ω log 2 n 9np .
Suppose then that group-1 is chosen, v belongs to this group and is of type-i for some 1 ≤ i ≤ M . The number of independent sets in the partition containing vertices of type-i is at most where for the last step we used that i ≤ M ≤ log n/ log 2. This time, the probability that v is permanently coloured is at least where we used that ω = log log n and np/(log(np)) ≥ log 2+ε/2 n. Finally, if group-2 is chosen and v belongs to this group, the probability that v is permanently coloured is at least = ω log 2 n np .
Summarizing (10), (11) and (12), whenever the group of v is selected (regardless of which group it is), the probability that v is chosen to be permanently coloured is at least ω log(np) log n 9np .
The rest of the argument works as before. Given a vertex v which is presented in at least 4np/( √ ω log(np)) medium sets, denote by Y v the random variable counting the number of erasers used by v (due to medium sets) before v gets a permanent colour. Then, Since Pr(E) = 1−o(n −1 ), the unconditional probability that Y v ≥ 4np/( √ ω log(np)) is also o(n −1 ). Hence, regardless of the strategy followed by Mr. Paint, we can take a union bound over all vertices that were presented in at least 4np/( √ ω log(np)) medium sets, and deduce that a.a.s. for every vertex the number of erasers used (due to medium sets) is less than 4np/( √ ω log(np)) and thus negligible. The proof of the theorem is finished.

Proof of Theorem 3
Before we move to the proof of Theorem 3, let us state the following simple observation.
Lemma 9. Let G be a graph whose components are all trees or unicyclic graphs. Then Mrs. Correct has a winning strategy using 1 eraser at each vertex for tree components and using 2 erasers at each vertex for unicyclic components.
Proof. Since we may consider different components separately, we may assume that G is connected. First assume that G is a tree. For a contradiction, suppose that 1 eraser at each vertex is not enough for Mrs. Correct to win on some tree, and consider a smallest such tree T . Clearly, |T | ≥ 2, and let us consider a leaf of T . By minimality of T , Mrs. Correct has a winning strategy on T \ . Then, she extends the strategy to T as follows. The first time she is presented vertex , she considers the optimal strategy when playing on the restriction of the set to T \ . If the set yielded by that strategy does not contain the neighbour of in T , she follows this strategy and simply adds to the set, and plays for the rest of the game on T \ . On the other hand, if the set does contain the neighbour of , then she also follows the strategy on T \ , but uses the eraser for . Since the only neighbour of cannot appear later on, she can continue with her optimal strategy on T \ and simply adds the second time she is presented this vertex. We get a contradiction, and the proof of the first part is finished.
Similarly, suppose now that G is unicyclic. As before, for a contradiction, suppose that 2 erasers at each vertex are not enough for G, and consider a smallest unicyclic graph U with this property. Clearly, |U | ≥ 3. If U contains a leaf , then, as before, she plays optimally using two erasers on U \ and adapts her strategy exactly as before. If U does not contain a leaf, then U is a cycle. The first time she is presented a set, she picks one vertex and uses erasers for all other vertices. The rest of the game is played on a tree (in fact, a path), and she has still 1 eraser at each vertex at her disposal. By the first part of the lemma, she has a winning strategy and the proof is finished.
We come now back to the proof of Theorem 3. It is well known that if p < 0.99/n, then a.a.s. G contains only trees and unicyclic components, and Mrs. Correct can win using at most 2 erasers by Lemma 9. Assume then that p ≤ c/n for some (perhaps large) constant c ≥ 0.99 (assume w.l.o.g. that c ∈ N). If G contains a component with at least two cycles, the component must contain a subgraph which either consists of two cycles connected by a path (or sharing a vertex), or is a cycle with a "diagonal" path. Let us call such structures complex. Clearly, on k vertices one can construct at most k 2 k! complex structures. Note that the degree of any vertex given by the existence of the complex structure is at most 4. We will show that a.a.s. there is no complex structure with the property that each vertex of this structure has a degree in the whole graph of at least 100c 2 . Note that, given a complex structure, in order for each vertex of this structure to have degree in the whole graph at least 100c 2 , it must have either at least 47c 2 incident edges towards vertices outside the subgraph on which the complex structure is built, or it has at least 47c 2 additional incident edges inside the subgraph on which the complex structure is built. Therefore, either half of the vertices of the complex structure have at least 47c 2 incident edges outside, or there are at least 11c 2 k additional edges inside the complex structure, and no information about these edges has been revealed so far. Thus, the expected number of complex structures in which each vertex has degree in the whole graph at least 100c 2 in the whole graph is at most and therefore, by Markov's inequality, the subgraph induced by vertices of degree at least 100c 2 a.a.s. consists of components that are either trees or unicyclic components. Since we aim for a statement that holds a.a.s., we may assume that this is the case.
We may assume that each time Mrs. Correct selects a maximal independent set. Hence, the number of erasers needed to be placed at vertex v is at most deg(v) (if v uses one of its erasers at some point of the game, it must be the case that at least one of its neighbours belongs to the maximal independent set). As a result, vertices of degree at most 100c 2 require only a constant number of erasers. Call the set of such vertices L, and let H = V (G)\L. By (13), the graph induced by the vertices in H a.a.s. consists of components that are either trees or unicyclic components. Mrs. Correct plays as follows: whenever she is presented a set U , she plays optimally on the restriction of U to H (on which, by Lemma 9 she uses at most 2 erasers), and then she extends an independent set found there to any maximal independent set in U . This strategy uses in total at most 100c 2 = O(1) erasers for each vertex in L. In this way, clearly O(1) = Θ(χ(G)) colours are used.