1. Introduction
Let and be two finite simple graphs. The -online Ramsey game is a two-player turn-based game between a builder and a painter. It begins from an empty graph with infinite vertices. In each round, the builder draws an edge joining two nonadjacent vertices, and the painter immediately colors it red or blue. The builder wins the game if there is either a red copy of or a blue copy of , while the painter’s goal is to delay the builder’s victory in as many rounds as possible. We are interested in the minimum number of rounds that the builder can win the game. Formally speaking, the online Ramsey number is the minimum number of edges that the builder needs to guarantee a win in the -online Ramsey game, regardless of the painter’s strategy.
The online Ramsey game was first introduced by Beck [
1], whereas the online Ramsey number owes its name to Kurek and Ruciński [
2]. The number can be viewed as an online version of the size Ramsey number, which is defined as follows. We write
if for any partition
of
, either
or
. The
Ramsey number and the
size Ramsey number are the smallest number of vertices and edges, respectively, in a graph
G satisfying
. It follows that
, and hence
is well-defined.
Now we introduce some graphs that will be used in the sequel. A complete graph
is a graph on
m vertices such that any two vertices are adjacent. A path
is a graph on
m vertices, say
, such that
is adjacent to
for all
i with
. If
is also adjacent to
, this is a cycle of length
m, denoted by
. A matching
is a graph with
n edges such that any two edges share no endpoints. We use [
3] for terminology and notation not defined here.
The online Ramsey theory for graphs has been well studied. It is true that
by symmetry. If both
and
are complete graphs, we refer the reader to [
2,
4,
5,
6]. Determining the exact values of online Ramsey numbers
has proved to be even more difficult than determining the classical Ramsey numbers exactly. Only two nontrivial ones were obtained up to symmetries:
[
2] and
[
6]. For sparse graphs, the online Ramsey numbers involving paths, stars, trees, and cycles have been studied [
7,
8,
9,
10,
11,
12,
13,
14]. If
is a small fixed graph and
is a class of sparse graphs, most results of
are upper or lower bounds, between which there is a large gap. The only known exact values of this type are
and
.
Theorem 1 (Cyman et al. [
8]).
We have for ; for ; and for . We derive more online Ramsey numbers by considering a matching versus a path. Before that, let us first review the corresponding results of its Ramsey number and size Ramsey number. Faudree and Schelp [
15] calculated the Ramsey numbers of all linear forests in 1976. In particular,
. However, its size Ramsey number is far from being completely confirmed. Erdős and Faudree [
16] obtained the exact value of
when
. They showed a general bound for other cases.
Theorem 2 (Erdős and Faudree [
16]).
For , we have , , , where if n is even and otherwise. Theorem 3 (Erdős and Faudree [
16]).
For a given integer n with , there are positive constants and such that for all , Now we turn to exploring the online Ramsey number . If a has at most four vertices, its exact value can be obtained. Otherwise, we obtain general lower and upper bounds where the gap is not very large. Particularly, if and , then .
Theorem 4. For , we have and .
Theorem 5. For and , we haveIn addition, the upper bound can be attained for . Furthermore, we initiate the study of a variant called the
connected online Ramsey game by adding the restriction that at any round, the graph induced by all edges should be connected. In other words, except for the first edge, the builder is not allowed to draw an edge joining two isolated vertices. This notion can be viewed as a special case of the definition in [
17], where the constructed graph is always asked to be in a prescribed class of graphs at any time. The
connected online Ramsey number is the smallest possible number of edges that the builder needs to guarantee a win in the connected
-online Ramsey game. It can be seen that
.
Here we are concerned with the connected online Ramsey number of a matching versus a path. Even though the corresponding online Ramsey problem has not been solved yet, its connected online Ramsey number can be determined completely. We have the following surprising result.
Theorem 6. For and , we have .
The remainder of this paper is organized as follows.
Section 2 includes two lemmas that will be used for the online Ramsey result. Proofs of Theorems 4 and 5 are presented in
Section 3 and
Section 4, respectively.
Section 5 shows the connected online Ramsey result, which is Theorem 6.
2. Lemmas
We first state a lemma given by Cyman, Dzido, Lapinskas, and Lo [
8] (Lemma16), which is crucial for the proofs of lower bounds.
Lemma 1. Let with . Let B be a forest that has ℓ edges, no isolated vertices, and does not contain as a subgraph. Let X be the set of all endpoints of in B. Then Moreover, if , and there exists an edge e such that contains a , then .
The following symmetric edge-colored path appears a couple of times in the sequel. A path with at least four vertices is called an path if its two pendant edges are red and all internal edges are blue. That is, is an path if , and are red and all other edges are blue.
Lemma 2. During the -game, to avoid a blue , every blue path with can be lengthened to an path, which has at most vertices.
Proof. Let and denote the two ends of . The builder extends to a longer path, whose length is increased by one in each round. He first joins to a new vertex . If is blue, he joins to a new vertex . The builder continues lengthening the path as above until the first red edge appears. We denote the path by , where the edge is red, and all other edges are blue. Then, beginning from , the builder continues extending to a longer path until the second red edge appears. Assume now the path is , where only two edges and are red. This path is an path. Since we need to avoid a blue , this path can always be obtained and has at most vertices. □
3. Exact Values of and
We first show . In each round, the builder chooses a new edge such that the uncovered edges form a matching. The procedure stops when . Here, p denotes the number of red edges, and q denotes the number of blue edges. Since , we have . Let denote the ends of all blue edges. In the next ith round for , the builder draws an edge joining to a new vertex. Since , this process can be realized. If at least one edge in these rounds is blue, then we have a blue . If all edges in these rounds are red, then we obtain a red matching with n edges. Thus, .
The painter uses the strategy that she will always color an edge blue unless doing so would create a blue . Therefore, every red edge is forced to avoid a blue . Hence, each red edge shares a common end with a blue edge. If there are blue edges, they can force a red matching with at most edges, which is less than n. That is to say, to force a red , at least blue edges are needed. Thus, .
Now we turn to prove that for . To show the upper bound, the builder first constructs some special components, each of which is either a red or an path as defined before Lemma 2. In the beginning, and each time after a red or an path has been constructed, the builder forces another red or another path as follows. The builder joins two isolated vertices, say, . If is colored red, it is a red that we need. If is colored blue, by Lemma 2, it can be lengthened to an path, which has at most five vertices. For simplicity, the paths of orders four and five are denoted by path and path, respectively. We see that each component is a red , an path, or an path. Additionally, all red edges form a matching.
The procedure stops when there are either edges or blue edges. In the former case, there are at most blue edges and thus at least n red edges. By the builder’s strategy, all red edges form a matching. Thus, we have a red . Therefore, we need only consider the latter case when blue edges have appeared, but the total number of edges is less than .
Because the last appeared edge is blue, by Lemma 2 and the builder’s strategy, the last component is either a blue , a blue , or a with one pendant edge red and two other edges blue. For this and , the builder extends them to an path in the next one or two steps, respectively. All edges in the one or two steps have to be red to avoid a blue . If the number of red edges is at least n after this extension, our proof is done. Now let p denote the number of components that is a red . Additionally, let denote the number of -paths and -paths, respectively. We see that the number of red edges is up to now, which is assumed to be less than n. Since every path contains one blue edge, and every path contains two blue edges, we have if the last component is a blue , and otherwise. We see at once that , since otherwise , and thus we already have a red .
Each path has a center, which is the vertex incident to two blue edges. Let C be the set of centers from all paths. Then . Set , which is the number of red edges we still need to form an . If the last component is not a blue , then , which implies . In the next t rounds, the builder draws a matching with t edges, each of which has both ends in C. If one of the t edges is blue, we have a blue , and our proof is done. If all t edges are red, there are totally n red edges which form a red . If the last component is a blue , denoted by , then . It follows that , which implies . In the next t rounds, the builder draws a matching with t edges such that each edge has both ends in , and this matching does not contain . Since and , this matching can always be obtained. If one of the t edges is blue, we have a blue . If all t edges are red, there are totally n red edges which form a red . In both cases, .
To prove , the painter uses the strategy that she will always color an edge blue unless doing so would create either a blue or a blue triangle. Therefore, all blue edges form a forest, denoted by B, and every red edge is forced to avoid a blue or a blue triangle. When the builder wins the game, a red must appear. Let X be the set of all endpoints of in B, and denote by ℓ the number of blue edges. From the painter’s strategy, we see that any red edge has either at least one end in X or both ends in . Thus, , which implies . By Lemma 1, . Thus, , and so .
4. A General Bound of
We now show a general bound of
. Here,
, since the result
is trivial. We also have
, since the cases
have been given in
Section 3.
We first bound from below. The painter uses a blocking strategy which is defined as follows. Denote by the graph induced by all uncovered blue edges immediately before the ith move of the game. The builder then chooses the ith edge . If contains no path and no cycle, then the painter colors blue. Otherwise, the painter colors red. In this way, a blue path will never appear, and every red edge is forced to appear to avoid either a blue or a blue cycle.
When the builder wins the game, a red must appear. Let B be the graph induced by all blue edges, let X be the set of all endpoints of in B, and denote by ℓ the number of blue edges. From the painter’s strategy, we see that any red edge has either at least one end in X or both ends in . Thus, , which implies . If there exists an edge e such that contains a , by Lemma 1, . It follows that , and hence, . Therefore, . If such an edge e does not exist, then every red edge is forced to avoid a blue cycle. Let be the components of B. Assume that has edges for . If , no red edge with two ends in can be forced. If , the number of red edges with two ends in is at most . Thus, the total number of red edges is at most . To force a red , we need at least blue edges. Therefore, , and so .
To prove the upper bound , we show the following stronger claim.
Claim 1. Let m and n be integers with . For every positive integer ℓ with , if there is already a blue path , then in the next rounds, the builder can force either a red or a blue .
Proof. First, consider the case . If , from Lemma 2, we see that the builder can lengthen the to an path, which has at most vertices. That is to say, in the next rounds, a red and a blue cannot be both avoided. If , the builder picks one edge, . If is colored blue, then the proof is the same as above. If is colored red, since , in the next rounds, the builder can force either a red containing or a blue . The case is done.
Now we apply induction on n. Assume that Claim 1 holds for , where . We show that it also holds for . We run a similar argument as in the case . Beginning from an end of the blue , the builder extends it to a longer path, whose length is increased by one in each round. The procedure stops when the first red edge appears. Assume that the path is , with the edge red and all others blue. Then, , since otherwise there is already a blue . If , we leave the red edge alone and consider the blue segment . By the inductive hypothesis, in the next rounds, the builder can force either a red which together with forms a red or a blue . The total number of rounds is , proving our claim. If , then . We leave the red edge alone and consider an isolated vertex as a blue . Using the inductive hypothesis again, in the required rounds, the builder can force either a red , which together with forms a red or a blue . This proves our claim. □
Since any vertex can be viewed as a blue path , the upper bound is a particular case of Claim 1 when .
We are left to prove that the upper bound can be attained for , that is, to show for . For the lower bound of , the painter would color edges blue and one edge red during the first rounds. There is neither a blue nor a red . Thus, . For the lower bound of , the painter would color the first edges blue. We now consider three cases. If these blue edges form a path , we use to denote its two ends. In the next three rounds, if a new edge has at least one end in , the painter colors it red; if a new edge has no end in , the painter colors the first such edge blue and the others red. It is easy to check that both red and blue do not exist. If the first edges form two blue paths and such that , , , then we use to denote the ends of , and to denote that of . In the next three rounds, if a new edge has both ends in , the painter colors it red; if a new edge has at least one end not in , the painter colors the first such edge blue and the others red. Again, both red and blue do not exist. If neither of the above two cases happens, the painter colors the th edge blue. It follows that there is no blue . The painter then colors the next two edges red. Thus, .
5. Exact Value of
In this section, we prove that for . For inductive reasons, it will be easier to prove the following stronger claim to indicate the upper bound.
Claim 2. For every positive integer ℓ with and , if there is a blue path , then in the next rounds, the builder can construct a connected graph which forces either a red or a blue .
Since any vertex can be viewed as a blue path , the upper bound is a particular case of Claim 2 when .
Proof. We apply induction on n. If , the builder extends the blue path to a path in moves. The painter is forced to color either a red or a blue , proving our claim. Assume that Claim 2 holds for . We show that it also holds for .
We consider two cases: or . If , then , since otherwise our proof is done. Beginning from an end of the blue , the builder extends it to a longer path, whose length is increased by one in each round. The procedure stops when the first red edge appears. Suppose now the path is with the edge red and all other edges blue, where . We leave the red edge alone and consider the blue segment , where . By the inductive hypothesis, in the next rounds, the builder can force either a red , which together with forms a red , or a blue . The total number of rounds is , proving our claim.
If , is a single vertex, denoted by . The builder chooses one edge . If is colored blue, then the proof is the same as the above case. If is colored red, the builder joins to a new vertex . We leave the red edge alone and consider the blue path . By the inductive hypothesis, in the next rounds, the builder can force either a red , which together with forms a red , or a blue . The total number of rounds is , proving our claim. □
To prove the lower bound, consider the following strategy for the painter. In the first rounds, the painter colors all edges red. Since these edges form a connected graph, there are at most vertices that are incident to red edges. Because an occupies vertices, the graph does not contain a red . In the next rounds, the painter colors all edges blue. There is no blue , since a has edges. Thus, for .