Ramsey problems for monotone paths in graphs and hypergraphs

The study of ordered Ramsey numbers of monotone paths for graphs and hypergraphs has a long history, going back to the celebrated work by Erd\H{o}s and Szekeres in the early days of Ramsey theory. In this paper we obtain several results in this area, establishing two conjectures of Mubayi and Suk and improving bounds due to Balko, Cibulka, Kr\'al and Kyn\v{c}l. We also obtain a color-monotone version of the well-known Canonical Ramsey Theorem of Erd\H{o}s and Rado, which could be of independent interest.


Introduction
An ordered k-uniform hypergraph H is a hypergraph whose vertices have a fixed ordering.The ordered Ramsey number R < (G, H) of ordered k-uniform hypergraphs G and H is the minimum N such that every red/blue edge-coloring of the complete k-uniform hypergraph on {1, . . ., N } has a red copy of G or a blue copy of H whose vertices appear in the correct ordering.One of the most wellstudied hypergraphs in this context is the monotone tight path P (k) n , which is the ordered k-uniform hypergraph with vertices 1, . . ., n and edges (i, i + 1, . . ., i + k − 1) for i = 1, . . ., n − k + 1.We also write P n := P (2) n for the monotone graph path with n vertices.The study of ordered Ramsey numbers dates back to the very beginning of Ramsey theory, as some of the most foundational theorems in the field fall into this framework.A key example is the celebrated Erdős-Szekeres lemma [6], whose proof gives R < (P s , P n ) = R < (K s , P n ) = (s−1)(n−1)+1.
A central feature of ordered Ramsey problems is that they often originate from and have implications to problems in geometry.For example, the famous Erdős-Szekeres cups-caps theorem [6], which states that R < (P n ) = s+n−4 s−2 + 1, was used by Erdős and Szekeres to prove the so-called Happy Ending Theorem in the same paper.This result states that every set of 2n−4 n−2 + 1 points in the plane in general position contains n points in convex position.The happy ending theorem was later extended by several authors by replacing "points" with "convex bodies".For example, Pach and Tóth [16] showed that there is N = N (n) such that every family of N convex bodies in the plane in general position, with any two bodies having at most two common boundary points, contains n bodies in convex position.Fox, Pach, Sudakov and Suk [7] observed that this problem is related to the 3-color Ramsey number of P (3) n , and used this connection to improve the best known bound for such an N (n).This led to the further study of the multicolor Ramsey number of P (k) n , and this Ramsey number was determined exactly by Moshkovitz and Shapira [11] and Milans, Stolee and West [10].
Another motivation for studying Ramsey numbers of monotone tight paths comes from the work of Mubayi and Suk [13], who observed that the k-uniform Ramsey number R < (P n ) is closely related to the multicolor (k − 1)-uniform Ramsey number of cliques.Proving tight bounds for the latter is one of the major open problems in Ramsey theory (see [17] and its references for the latest results for the graph case, i.e. k = 3).
A systematic study of ordered Ramsey numbers of graphs was initiated by Conlon, Fox, Lee and Sudakov [4] and Balko, Cibulka, Král and Kynčl [1].One of the main problems considered in these works is the Ramsey problem for powers of paths.Let P t n denote the t'th power of P n , namely, the ordered graph with vertices 1, . . ., n and edge-set {(i, j) : i < j ≤ i + t}.Note that for P 1 n = P n , the Erdős-Szekeres lemma gives R < (K s , P 1 n ) = (s − 1)(n − 1) + 1, which is linear in n for fixed s.Mubayi and Suk [15] recently conjectured that R < (K s , P t n ) remains linear in n for all fixed s, t, and proved the bound R < (K s , P t n ) = O s,t (n log s−2 n).Here, we confirm their conjecture, which can be seen as an extension of the Erdős-Szekeres lemma.
Mubayi and Suk [15] also considered the "diagonal case" of P t n versus K n , and proved the quasipolynomial bound R < (P t n , K n ) ≤ 2 Ot(log 2 n) .Here we improve this to a polynomial bound.
It is easy to see that this Ramsey number is at least R(K t+1 , K n ) ≥ Ω(n (t+2)/2 ) (see [2,18]), and therefore the exponent of n should grow in terms of t.
The dependence on t of the exponent of n in the previous result can be further improved from quadratic to linear if instead of K n one takes the second graph to also be the path-power P t n .This problem was first considered by Conlon, Fox, Lee and Sudakov [4], who conjectured that the Ramsey number R < (P t n , P t n ) is polynomial in n.Their actual question concerned graphs with bounded bandwidth.But since every n-vertex ordered graph with bandwidth t is a subgraph of P t n , this question reduces to the above conjecture.Balko, Cibulka, Král and Kynčl [1] proved the conjecture by showing that R < (P t n , P t n ) = O t (n 129t ).In the case t = 2, Mubayi [12] improved the bound to R < (P 2 n , P 2 n ) = O(n 19.5 ).Here we obtain the improved bound R < (P t n , P t n ) = O t (n 4t−2 ).For t = 2 this gives R < (P 2 n , P 2 n ) = O(n 6 ).In fact, Theorem 1.2 gives R < (P 2 n , K n ) ≤ 8n 6 .
We now move on to 3-uniform hypergraphs.Mubayi [12] showed that R < (K 4 , P n ) is polynomial in n for every fixed s.This conjecture was also reiterated by Mubayi and Suk [14].Very recently, they [15] proved the quasipolynomial bound R < (K Here we prove a polynomial bound, establishing Mubayi's conjecture. We will derive Theorem 1.4 from another result which might be of independent interest.It can be viewed as an ordered version of the celebrated Canonical Ramsey Theorem of Erdős and Rado [5] (here "ordered" refers to an order on the colors, as we shall see).To state our theorem, we need the following definition: The canonical Ramsey theorem [5] states that for every s, there is N = N (s) such that in every edge-coloring of K N (with any number of colors), there is a clique of size s which is either monochromatic, rainbow or lexicographic.It is natural to restrict the number of colors to say n, and ask how large N should be to guarantee a lexicographic s-clique.It is not hard to see that N = 1 + s−2 i=0 n i = O(n s−2 ) vertices are enough for n colors.Indeed, the first vertex has degree at least 1 + s−3 i=0 n i in one of the n colors, and one can then apply induction in its neighbourhood.The question becomes much more interesting, however, if we also insist that the colors are ordered, namely, that c 1 ≥ • • • ≥ c s−1 in Definition 1.5.In this case we say that the lexicographic set is non-increasing.The following theorem shows that polynomially many vertices are still enough to find such a set.This can be viewed as an ordered version of the canonical Ramsey theorem.
Theorem 1.6.For every s ≥ 2, there is a constant C = C(s) such that every χ : admits a lexicographic non-increasing set of size s.
The idea of using non-increasing sets to bound R < (K n ) is due to Mubayi and Suk [15], see Section 2 for the details.
The rest of this paper is organized as follows.Theorems 1.4 and 1.6 are proved in Section 2. Theorems 1.2 and 1.3 are proved in Section 3. The proof of Theorem 1.1 is given in Section 4, and the last section contains some concluding remarks and open problems.
Notation: For two subsets of vertices A, B in an ordered graph, we write 2 Proof of Theorems 1.4 and 1.6 Throughout this section, we consider functions χ : N 2 → [n].We now define the notion of a non-increasing set, which plays a key role throughout this section.
Let g(n, s) be the minimum N such that in every coloring χ : N 2 → [n], there is a non-increasing set of size s.The following was observed by Mubayi and Suk [15] and was their motivation for studying non-increasing sets.For completeness, we include the proof.
Proof.Fix a red/blue coloring of K N , N = g(n − 2, s), and suppose that there is no blue monotone tight path with n vertices.For each pair of vertices x < y, let χ(x, y) be the largest number of vertices in a blue monotone tight path ending at x, y.So 2 ≤ χ(x, y) ≤ n − 1. Observe that if x < y < z with xyz blue, then χ(x, y) < χ(y, z), because we can extend any longest path ending at x, y with the edge xyz.Hence, a non-increasing set must be a red clique.Observe that there are n − 2 possible values of χ(x, y)'s.By the definition of g(n − 2, s), there is a red clique of size s.
Remark 2.3.We note that the proof of Proposition 2.2 only uses that a non-increasing triple x, y, z satisfies χ(x, y) ≥ χ(y, z), but does not use the full definition of a non-increasing triple.Thus, one can replace g(n − 2, s) with the analogous function corresponding to this weaker notion of being nonincreasing (only requiring χ(x, y) ≥ χ(y, z)), and potentially get stronger bounds on R < (K n ) via Proposition 2.2.Still, we decided to stick to the stronger notion given in Definition 2.1, because we do not know of better bounds for the weaker notion of g-function (for general s), and also because the stronger notion is needed to prove Theorem 1.6.
We will now prove the following theorem, which together with Proposition 2.2 implies Theorem 1.4.
Theorem 2.4.For every s ≥ 2, there is a constant To prove Theorem 2.4, we need to find a non-increasing set of size s.The proof is via induction on s, and to this end, it turns out to be convenient to find the following bigger structure.For s ≥ 2, t ≥ 1, let H s,t be the ordered graph with vertices be the minimum N such that every n-coloring χ of the edges of K N admits a copy of H s,t .As H s,1 is just a non-increasing s-set, it holds that f (n; s, 1) = g(n, s).The following gives a recursive bound on f (n; s, t).
Theorem 2.6.For every s ≥ 2, t ≥ 1, there is a constant Proof.The proof is by induction on s, starting with the base case s = 2. Observe that H 2,t is just a monotone path of length t with non-increasing χ-labels.By a result of Chvatal and Komlós [3], in every edge-coloring χ of an ordered K N , N > p+q−2 p−1 , there are vertices The second outcome is impossible because there are only n colors.And the first outcome gives a copy of H 2,t .Hence, we can take C(2, t) = t − 1 for all t ≥ 1.It is easy to see that this coincides with the choice of C(s, t) in the statement of the theorem.Now let s ≥ 3.By Lemma 2.5 and the induction hypothesis, we have It is easy to check that the choice of C(s, t) in the statement of the theorem also satisfies this recursion.
Next we prove Theorem 1.6.This theorem follows by combining Theorem 2.4 with the following proposition: Proposition 2.7.For s ≥ 3, every non-increasing set of size 2 2s−3 contains a lexicographic set of size s.
It remains to prove Proposition 2.7.To this end, we need the following recursive definition.

Definition 2.8 (weakly lexicographic). A set of size two is weakly
Let us say that a set x 1 , . . ., x s is forward (resp.backward) lexicographic if it satisfies Item 1 (resp.Item 2) in Definition 1.5.Lemma 2.9.Let s, t ≥ 2. Every weakly lexicographic set of size s + t − 2 contains a forward lexicographic set of size s or a backward lexicographic set of size t.Proof.By induction on s + t.The base case is s = 2 or t = 2.This case is evident because every set of size 2 is both forward and backward lexicographic.Suppose now that s, t ≥ 3. Let be a weakly lexicographic set.Suppose without loss of generality that Item 1 in Definition 2.8 holds.By induction, x 2 , . . ., x s+t−2 contains a forward lexicographic set of size s − 1 or a backward lexicographic set of size t.In the latter case, we are done; in the former case, by adding x 1 we get a forward lexicographic set of size s (so again we are done).
Lemma 2.10.Every non-increasing set of size 2 s−1 contains a weakly lexicographic set of size s.
Proof.By induction on s.For s = 2 this is clear.Let s ≥ 3 and let By induction, {x i : i ∈ I} contains a weakly lexicographic set of size s − 1, which together with x 1 forms a weakly lexicographic sets of size s.
Proposition 2.7 follows by combining Lemmas 2.9 and 2.10 (where we apply Lemma 2.9 with s = t).
3 Proof of Theorems 1.2 and 1.3 Definition 3.1 (t-clique chain).In an ordered graph, a t-clique chain consists of t-cliques (cliques of size t) X 1 , . . ., X m such that for every 1 See Figure 1 for an example of a clique chain.

Every red/blue edge-coloring of K
Proof.We first prove Item 1. Suppose that the assertion does not hold.For each vertex v, let χ r (v) (resp.χ b (v)) be the largest number of t-cliques in a red (resp.blue) t-clique chain ending at v. Then 0 By the pigeonhole principle, there are values 0 Suppose without loss of generality that this clique is red.Then χ r (x t ) > χ r (x 1 ), because any longest red t-clique chain ending at x 1 can be extended using the t-clique {x 1 , . . ., x t }.This is a contradiction to χ r (x 1 ) = χ r (x t ) = c r .
The proof of Item 2 is similar to that of Item 1. Suppose that the statement does not hold, and let 0 ≤ χ r (v) ≤ m − 1 be defined as above.By the pigeonhole principle, there is 0 ≤ c r ≤ m − 1 and a vertex-set U , |U | ≥ N/m, such that χ r (v) = c r for all v ∈ U .We have |U | ≥ R(K t , K n ) by the choice of N .If U contains a blue K n then we are done, and else U contains a red t-clique x 1 < • • • < x t .As in the previous item, we have χ r (x t ) > χ r (x 1 ), in contradiction to χ r (x , and note that N < (400t 3 ) t 2 n 4t−2 , using Theorem 1.1 and R(K t , K t ) ≤ 4 t .Fix a red/blue coloring of K N , and suppose by contradiction that there is no monochromatic copy of P t n .For each monochromatic tclique x 1 , . . ., x t , let χ(x 1 , . . ., x t ) be the largest ℓ such that there is a monochromatic P t ℓ which ends at x 1 , . . ., x t .Then t ≤ χ(x 1 , . . ., x t ) ≤ n − 1.A good pair is a pair of monochromatic t-cliques X, Y in the same color, such that the last element of X is the first element of Y , and χ(X) ≥ χ(Y ).

Claim 3.3. There are at least
Proof.First, we observe that every set of (R − 1)n 2 + 1 vertices contains a good pair.Indeed, by Item 1 of Lemma 3.2, every (R − 1)n 2 + 1 vertices contain a monochromatic t-clique chain with n cliques X 1 , . . ., X n .There must exist an 1 ) is a good pair.Now, every set of Rn 2 vertices contains at least n 2 good pairs (by repeatedly finding a good pair and deleting one of its vertices).By double counting, there are at least good pairs.By Claim 3.3 and averaging, there are vertices , and such that for every y ∈ Y ′ , {x 1 , . . ., x t−1 , y} and {y, z 1 , . . ., z t−1 } form a good pair.Without loss of generality, for at least half of the vertices y ∈ Y ′ , the t-cliques {x 1 , . . ., x t−1 , y}, {y, z 1 , . . ., z t−1 } are red.Also, by the pigeonhole principle over the value of χ, there exists a set , and there exists a value t ≤ c ≤ n − 1, such that χ(x 1 , . . ., x t−1 , y) = c and {x 1 , . . ., x t−1 , y}, {y, z 1 , . . ., z t−1 } are red for all y ∈ Y .Note that χ(y, z 1 , . . ., z t−1 ) ≤ c for all y ∈ Y , by the definition of a good pair.As |Y | = R < (K t , P t n ) and Y contains no blue P t n , it must contain a red clique y 1 < • • • < y t .Now take a red P t c ending at x 1 , . . ., x t−1 , y 1 , and extend it by adding the vertices y 2 , . . ., y t , z 1 , . . ., z t−1 , using that x 1 , . . ., x t−1 , z 1 , . . ., z t−1 are connected to y 1 , . . ., y t in red, and that y 1 , . . ., y t is a red clique.It follows that χ(y t , z 1 , . . ., 1) .Fix a red/blue coloring of K N , and suppose by contradiction that there is no red P t n and no blue K n .For each red t-clique x 1 , . . ., x t , let χ(x 1 , . . ., x t ) be the largest ℓ such that there is a red P t ℓ that ends at x 1 , . . ., x t ; so t ≤ χ(x 1 , . . ., x t ) ≤ n − 1.A good pair is a pair of red t-cliques X, Y such that the last element of X is the first element of Y , and χ(X) ≥ χ(Y ).

Claim 3.4. There are at least
Proof.First, we observe that every set of (M − 1)n + 1 vertices contains a good pair.Indeed, by Item 2 of Lemma 3.2, every set of (M − 1)n + 1 vertices contains a blue K n or a red t-clique chain with n cliques X 1 , . . ., X n .In the latter case, there must be 1 ≤ i ≤ n − 1 such that χ(X i ) ≥ χ(X i+1 ), which gives a good pair.Now, every set of 2M n vertices contains at least M n good pairs (by repeatedly finding a good pair and deleting one of its vertices).By double counting, there are at least good pairs.By Claim 3.4 and averaging, there are vertices As in the proof of Theorem 1.3, we get c ≥ χ(y t , z 1 , . . ., z t−1 ) > χ(x 1 , . . ., x t−1 , y 1 ) = c, a contradiction.

Proof of Theorem 1.1
We begin with a brief sketch.Our strategy for upper bounding R(K s+1 , P t n ) is to find a certain structure which we call an s-red-net (see Definition 4.1).We will show (see Lemma 4.10) that this structure implies the existence of a red K s+1 or a blue P t n .To find an s-red-net, we will first find blue cliques V 1 < • • • < V M , each of large constant size, and partition each V i into s consecutive equal-sized parts.For each i and 0 ≤ j ≤ s − 2, we will define χ j (i) as the largest ℓ such that there exists a blue P t ℓ whose last t vertices belong to the first (s − 1 − j) parts in the partition of V i .The key point is that if i 1 < i 2 and χ j (i 1 ) ≥ χ j (i 2 ), then the bipartite graph between certain parts of V i 1 and certain parts of V i 2 must be almost red.Using this, we can reduce the task of finding an s-red-net to the task of finding a certain structure in the functions χ 0 , . . ., χ s−2 .We call this structure a (χ 0 , . . ., χ s−2 )-forest, see Definition 4.2 and Lemma 4.3.
We now introduce some definitions.A rooted forest is a collection of rooted trees.The depth of a vertex is the distance from the root (of the corresponding tree).A rooted forest is balanced if all leaves have the same depth.We always consider forests F with V (F ) ⊆ [M ] for some integer M , so that there is a natural ordering on V (F ).We say that a rooted forest is well-ordered if each vertex comes before all of its descendants, and for every two vertices y < y ′ that are the same depth, the descendants of y come before y ′ , and thus before all the descendants of y ′ .In particular, if T 1 , T 2 are two components (trees) in the forest, then T 1 < T 2 or T 2 < T 1 .Also, if x is the root of a component T , y 1 < • • • < y k are the children of x, and S i is the subtree rooted at and each S i is well-ordered.Observe that if F is balanced well-ordered forest of depth d, and x 1 , . . ., x m are the roots of the components (trees) of F , then after deleting x 1 , . . ., x m we get a balanced well-ordered forest of depth d − 1 (the trees in this forest are the subtrees rooted at the children of x 1 , . . ., x m ).We write |F | for the number of vertices in a forest F .
We are now ready to define the notion of an s-red-net, which will play a key role in the proof.
An example of a 2-red-net (top) and a 3-red-net (bottom).In the top example V (F ) = {1, . . ., 7} and in the bottom example V (F ) = {1, . . ., 11}.An edge between X i and X j indicates that there is an edge between i and j in F .
, where F is a balanced well-ordered forest of depth s − 1, and for each v ∈ V (F ), of size r, such that the following holds: 2. For every v ∈ V (F ) and every descendant u of v, there is no blue K t,t with one part in X v and the other in X u .
See Figure 2 for an example of an s-red-net for s = 2, 3. We note that since there is a total order of the vertices of F , there is also a corresponding total order of (X v ) v∈V (F ) .

Finding s-red-nets
As mentioned above, we will find an s-red-net by finding a certain structure in a family of functions χ 0 , . . ., χ q−1 : [M ] → [n].We now define this structure.Definition 4.2.Let χ 0 , . . ., χ q−1 : [M ] → [n] be q functions.A (χ 0 , . . ., χ q−1 )-forest is a well-ordered balanced forest F of depth q with V (F ) ⊆ [M ], such that the following holds: For every 0 ≤ d ≤ q − 1 and a ∈ V (F ) at depth d, it holds that χ d (a) ≥ χ d (a ′ ) for every child a ′ of a.We denote by L(F ) the set of leaves of F .
First, we handle the base case q = 1.In this case, put Y i = {x i + 1, . . ., x i+1 − 1} for 1 ≤ i ≤ k − 1, and Y k = {x k + 1, . . ., M }.By the definition of the sequence (x i ) i , we have that χ 0 (x i ) ≥ χ 0 (y) for every y ∈ Y i and 1 ≤ i ≤ m.Now, write I for the set of i ∈ [k] with Y i = ∅.For i ∈ I, let T i be the tree of depth 1 with root x i and leaf-set Y i .Let F be the forest with components T i , i ∈ I. Then F is well-ordered and balanced of depth 1.Also, L(F Suppose now that q ≥ 2. Apply the induction hypothesis for q − 1 to the functions χ 1 , . . ., χ q−1 and to [M ] \ {x 1 , . . ., x k } in place of [M ].This gives a (χ 1 , . . ., χ q−1 )-forest Let S 1 < • • • < S ℓ be the components of F ′ .For each 1 ≤ i ≤ ℓ, let y i be the root of S i , and let j i be the maximum 1 ≤ j ≤ k with x j < y i (this is well-defined because x 1 = 1).Then x j i < y i < x j i +1 if j i < k, and y i ≥ x k if j i = k.It follows that χ 0 (x j i ) ≥ χ 0 (y i ) by the definition of the sequence (x j ) j .(This means that y i is a potential child of x j i in the (χ 0 , . . ., χ q−1 )-forest we are going to construct.)For 1 ≤ j ≤ k, let I j = {1 ≤ i ≤ ℓ : j i = j}, the set of potential children of x j .Let J 0 be the set of all 1 ≤ j ≤ k such that I j = ∅.For each j ∈ J 0 , let Z j be the minimum interval (in [M ]) which contains the set {x j } ∪ i∈I j V (S i ); namely, the left endpoint of Z j is x j , and the right endpoint of Z j is the rightmost element of i∈I j V (S i ).See Figure 4 for an example.Recall that L(S i ) denotes the set of leaves of S i .

Claim 4.4.
There is J ⊆ J 0 such that Z j < Z j ′ for every pair j, j ′ ∈ J with j < j ′ , and Proof.Let H be the interval graph of the intervals Z j , j ∈ J 0 ; namely, V (H) = J 0 and j, j ′ are adjacent if Z j , Z j ′ intersect.We claim that H is triangle-free.Indeed, suppose that j < j ′ < j ′′ make a triangle in H. Since Z j , Z j ′′ intersect, there is v ∈ i∈I j V (S i ) with v > x j ′′ .Let i ∈ I j such that v ∈ V (S i ).We know y i < x j ′ because j i = j < j ′ .Now, take an arbitrary i ′ ∈ I j ′ (the set ), this implies that y i ′ > v > x j ′′ , so j i ′ ≥ j ′′ > j ′ .In either case, j i ′ = j ′ , contradicting the fact that i ′ ∈ I j ′ .This proves our claim that H is triangle-free.Interval graphs are perfect (see [8,Chapter 8]), so H is 2-colorable.Take J ⊆ J 0 to be the color class that maximizes j∈J i∈I j |L(S i )|.Then (1) holds.Also, for every pair j, j ′ ∈ J with j < j ′ , we have Z j ∩ Z j ′ = ∅ (because J is independent in H) and hence Z j < Z j ′ (because Z j , Z j ′ are intervals and x j ∈ Z j is to the left of x j ′ ∈ Z j ′ ).
We now complete the proof of the lemma.For each j ∈ J, form a balanced tree T j by taking x j as the root and attaching S i as a subtree of the root for every i ∈ I j .Then T j is well-ordered and balanced of depth q, because the S i 's are well-ordered and have depth q − 1.The children of x j are all the y i with i ∈ I j , and we already saw that χ 0 (x j ) ≥ χ 0 (y i ) for each such y i .Also, by the claim, we have Z j < Z j ′ for all j, j ′ ∈ J with j < j ′ .Hence, writing J = {j 1 , . . ., j m }, 3 where q = 2, k = 4 and ℓ = 5.Every red circle stands for a component of F ′ rooted at some y i .Also, J 0 = {1, 2, 3}, so Z j is defined for j = 1, 2, 3.

Using s-red-nets
In this section, we show in Lemma 4.10 that a large enough s-red-net implies the existence of a red K s+1 or a blue P t n .This is done via a stronger statement (see Lemma 4.7), which has the advantage of allowing an inductive proof.The following definition will play an important role.Definition 4.5.Let C = (F, (X v ) v ) be an s-red-net.Let x be the root of the leftmost component (tree) of F and x ′ be the root of the rightmost component (tree) of F .The head of C, denoted H(C), consists of the s vertices of F on the leftmost path from x to a leaf (i.e., a path that always goes to the leftmost child).Similarly, the tail of C, denoted T (C), consists of the s vertices of F on the rightmost path from x ′ to a leaf.

Then, at least one of the following holds.
(a) There exist s r/3, such that for every 1 ≤ i < j ≤ s + 1, there is no blue K t,t with one part in A i and the other in A j .
(b) There exist s integers ℓ 1 , . . ., ℓ s ≥ t with s i=1 ℓ i ≥ |F |r/3, and there exist vertex-disjoint blue copies P 1 , . . ., P s of P t ℓ 1 , . . ., P t ℓs , respectively, such that the following holds: there exist two bijections σ : [s] → H(C) and π : [s] → T (C) such that for each i ∈ [s], the first t vertices of P i lie in X M σ(i) and the last t vertices of P i lie in X M π(i) .Before proving Lemma 4.7, let us sketch the proof when s = 1, 2, as these cases are easy to describe and already contain the main ideas.We will also explain how Lemma 4.7 is used to show that there exists a red K s+1 or a blue P t n .In the case s = 1, the forest F consists of isolated vertices, say x i+1 , then we can construct a copy of P t ℓ (for some ℓ) from these K t,t 's by connecting R i and L i+1 inside X x i+1 , using that the sets X x i are all blue cliques; see Figure 5.Note that this P t ℓ contains the middle part X M x i for every i, so ℓ ≥ . This case corresponds to Item (b) in the lemma.On the other hand, if, for some 1 ≤ i ≤ |F | − 1, there is no blue K t,t with one part in X D x i and one part in X U x i+1 , then Item (a) in the lemma holds with v 1 = x i , v 2 = x i+1 .Note that K t,t -free graphs are sparse, so here we get a bipartite graph which is very dense in red.Now let us consider the case s = 2.In this case, the trees in F have depth 1; namely, each tree consists of a root and leaves connected to the root.Let x 1 < • • • < x m be the roots, and let Y k be the set of children of x k .For each 1 ≤ k ≤ m, we would like to apply the case s = 1 to the set of vertices Y k .If Item (a) in the lemma holds, then we have vertices v 1 , v 2 ∈ Y k and sets A i ⊆ X v i with no blue K t,t between A 1 , A 2 .Together with X x k , this gives three sets with no blue K t,t between any two, meaning that Item (a) in the lemma holds (for s = 2).(Here we use the definition of an s-red-net, which implies that there is no blue K t,t between X x k and X y for any y ∈ Y k .) So we may assume that when applying Lemma 4.7 to Y k (with s = 1), Item (b) holds.This gives a copy P k of P t ℓ inside y∈Y k X y , where ℓ ≥ |Y k |r/3.We now take another "trivial" t'th-power of a path which just consists of all the vertices in X M x k ; let us denote it by Our goal now is to connect the ends of P k and P ′ k to the beginnings of P k+1 and P ′ k+1 .This connection forms a matching, i.e., we want to connect P k to P k+1 and P ′ k to P ′ k+1 , or P k to P ′ k+1 and P k to P ′ k+1 ; see Figure 6.Doing this for every 1 ≤ k ≤ m − 1 gives disjoint blue copies of P t ℓ 1 , P t ℓ 2 (for some ℓ 1 , ℓ 2 ) which together cover X M x for every x ∈ V (F ).This corresponds to Item (b) in the lemma.As P t ℓ 1 , P t ℓ 2 together cover many vertices, one of them must be long, and this will give the desired blue P t n .To achieve the aforementioned connection for a specific 1 ≤ k ≤ m − 1, we do as follows.Let u k be the rightmost vertex in Y k ⊆ V (F ) and let v k+1 be the leftmost vertex in Y k+1 ⊆ V (F ); then the last t vertices of P k are in X M u k , and the first t vertices of P k+1 are in X M v k+1 .We now define an auxiliary bipartite graph with parts {x k , u k } and {x k+1 , v k+1 }, where u ∈ {x k , u k } is connected to v ∈ {x k+1 , v k+1 } if there is a blue K t,t with one part in X D u and one part in X U v .A perfect matching in this bipartite graph gives the desired connection (see Figure 6).On the other hand, if there is no perfect matching, then there is an isolated vertex.So suppose, for example, that x k+1 is adjacent to neither x k nor u k .Then X D x k , X D u k , X U x k+1 are three sets such that between any two there is no blue K t,t (recall that there is no blue K t,t between X x k and X u k by the definition of an s-red-net).So The top picture shows two trees (of depth one) which we want to connect.The middle and bottom show the two ways of connecting P 1 , P ′ 1 to P 2 , P ′ 2 (the connections are the blue dotted curves).Every part with a blue shadow induces a blue clique and every two parts connected by a single blue dash-dotted line induce a blue complete bipartite graph.
Item (a) in the lemma holds.Finally, note that a bipartite graph with no blue K t,t is sparse in blue, and hence very dense in red.Thus, a (large enough) tripartite graph with no blue K t,t between any two parts must contain a red triangle (we will argue this in Lemma 4.10).We now proceed with the full proof of Lemma 4.7.
Proof of Lemma 4.7.The proof is by induction on s.First, for the base case s there is no blue K t,t with one part in X D x i and the other in X U x i+1 , then (a) is satisfied with v 1 := x i and v 2 := x i+1 with A 1 := X D x i and A 2 := X U x i+1 .Otherwise, for every 1 ≤ i ≤ |F | − 1, there exists a blue K t,t with one part L i ⊂ X D x i and the other part R i ⊂ X U x i+1 .As each X x i forms a blue clique in K N , we can connect these |F | − 1 blue K t,t 's by which forms a blue P t ℓ , for ℓ ≥ |F |r/3, with first t vertices in X M x 1 and last t vertices in X M x |F | .Thus, (b) is satisfied.This completes the proof of the base case s = 1.
For the inductive step, let s ≥ 2, and suppose that the lemma holds for s − 1.We assume that (a) does not hold and show that (b) must hold.Let x 1 < • • • < x m be the roots of the components (trees) in F .For each k ∈ [m], let F k denote the forest obtained from the tree rooted at x k by deleting x k (so the components of F k are the trees rooted at the children of and T (C) = {x m } ∪ T (C m ).We will apply the induction hypothesis to C k with s − 1 in place of s.We now show that Item (b) of the lemma must hold: Proof.Suppose not.Then by the induction hypothesis for C k (with s − 1 in place of s), (a) must hold for C k , i.e. there exist v 1 , . . ., v s ∈ V (F k ) and A 1 , . . ., A s with A i ⊂ X v i and |A i | ≥ |X v i |/3, such that for every 1 ≤ i < j ≤ s, there is no blue K t,t with one part in A i and the other in A j .Note that for every 1 ≤ i ≤ s, there is no blue K t,t with one part in X x k and the other in A i , by the definition of an s-red-net (as v i is a descendant of x k ).So the s + 1 vertices x k , v 1 , . . ., v s , along with the sets X x k , A 1 , . . ., A s , satisfy (a), contradicting our assumption that (a) does not hold for C.
By the above claim, for each k ∈ [m], there exist integers ℓ k,1 , . . ., ℓ k,s−1 ≥ t with s−1 i=1 ℓ k,i ≥ |F k |r/3, there exist vertex-disjoint blue copies P k,1 , . . ., P k,s−1 of P t ℓ k,1 , . . ., P t ℓ k,s−1 , respectively, and there exist two bijections σ k : the first t vertices of P k,i lie in X M σ k (i) and the last t vertices of P k,i lie in X M π k (i) .We now add an additional blue copy of P t ℓ k,s with ℓ k,s := |X M x k | = r/3 ≥ t, as follows: let P k,s be the copy of P t ℓ k,s on all the vertices of X M x k (recall that X x k induces a blue clique by Definition 4.1).It will be convenient to set . Also, with a slight abuse of notation, we extend σ k and π k by setting r/3 and that P k,1 , . . ., P k,s are vertex-disjoint blue copies of P t ℓ k,1 , . . ., P t ℓ k,s , respectively, such that for each i ∈ [s], the first t vertices of P k,i are in X M σ k (i) and the last t vertices of To prove that Item (b) holds, we need to "connect" P k,1 , . . ., P k,s to P k+1,1 , . . ., P k+1,s for every 1 ≤ k ≤ m − 1.More precisely, we will prove the following by induction on k: (b') For every 1 ≤ k ≤ m, there exist integers ℓ 1 , . . ., ℓ s ≥ t with s i=1 ℓ i ≥ k j=1 (|F j | + 1)r/3, and there exist vertex-disjoint copies P 1 , . . ., P s of P t ℓ 1 , . . ., P t ℓs , respectively, such that the following holds: there exist two bijections σ : [s] → H ′ (C 1 ) and π : [s] → T ′ (C k ) such that for each i ∈ [s], the first t vertices of P i lie in X M σ(i) and the last t vertices of P i lie in X M π(i) .
Note that m j=1 (|F j | + 1) = |F |.Hence, by setting k = m in (b'), we get (b).So it remains to prove (b').In the base case k = 1, we take P 1 , . . ., P s to be P 1,1 , . . ., P 1,s and σ := σ 1 , π := π 1 .For the inductive step, suppose k ≥ 2 and we have found P 1 , . . ., P s and σ, π satisfying (b') for k − 1.Our goal is to extend P 1 , . . ., P s by P k,1 , . . ., P k,s to obtain P ′ 1 , . . ., P ′ s satisfying (b') for k.We will also define appropriate σ ′ , π ′ .To this end, we define an auxiliary bipartite graph H with sides T ′ (C k−1 ) and in H if there exists a blue K t,t with one part in X D u and the other in X U v .Claim 4.9.H has a perfect matching.
Proof.Suppose not.By Hall's marriage theorem, there exists a subset S ⊆ T ′ (C k−1 ) with |N H (S)| < |S|, where N H (S) is the neighborhood of S in H. Take T = H ′ (C k )\N H (S). Then there is no edge in H between S and T .Hence, for each u ∈ S and each v ∈ T , there is no blue K t,t with one part in X D u and the other in X U v .Observe also that for distinct u, v ∈ T ′ (C k−1 ) or u, v ∈ H ′ (C k ), there is no blue K t,t with one part in X u and the other in X v .This follows from Definition 4.1, since T ′ (C k−1 ) and H ′ (C k ) are paths from a root to a leaf in F , and so, for every two u, v ∈ T ′ (C k−1 ) or u, v ∈ H ′ (C k ), it holds that u is a descendant of v or vice versa.Also, note that |S| So we see that the (at least s + 1) vertices in S ∪ T , along with the sets (X D u ) u∈S and (X U v ) v∈T , satisfy Item (a) in the lemma.This contradicts our assumption that (a) does not hold for C.
By the above claim, there exists a bijection τ : T ′ (C k−1 ) → H ′ (C k ) that specifies the perfect matching of H. Fix i ∈ [s].Due to (b') for P 1 , . . ., P s (with k − 1 in place of k), the last t vertices of P i lie in X M u for u = π(i) ∈ T ′ (C k−1 ) (and this is the only u with this property).Set v := τ (u) ∈ H ′ (C k ).We know that the first t vertices of P k,j lie in X M v for j = σ −1 k (v) (and this is the only j with this property).We have x k−1 < x k , and hence V (F k−1 ) < V (F k ), as F is well-ordered.Therefore, u < v, since u ∈ V (F k−1 ) ∪ {x k−1 } and v ∈ V (F k ) ∪ {x k }.Now, by Definition 4.1, we have X u < X v .As (u, v) ∈ E(H), there is some blue K t,t with parts L and R such that L ⊆ X D u and R ⊆ X U v .Also, both X u and X v are blue cliques.Thus, we can extend P i by As τ specifies a perfect matching in H, P ′ 1 , . . ., P ′ s are vertex-disjoint.Clearly, for every 1 ≤ i ≤ s, the first t vertices of P ′ i are the same as those of P i , and thus lie in X M σ(i) .The last t vertices of P ′ i are the same as those of P k,j for j = σ −1 k (τ (π(i))), and thus lie in X M π k (j) .Then P ′ 1 , . . ., P ′ s , σ ′ := σ and π This completes the inductive step, thus proving the lemma.
Proof.We apply Lemma 4.7 to C, and consider the following two cases.
Case 1: (a) holds for C, i.e. there exist distinct subsets A 1 , A 2 , . . ., A s+1 ⊆ [N ], each of size a = r/3, such that for all 1 ≤ i < j ≤ s + 1, there is no blue K t,t with one part in A i and the other in A j .Fix any 1 ≤ i < j ≤ s + 1.By the Kővari-Sós-Turán theorem [9], we have the following bound for the number of blue edges between A i and A j : In the last inequality, we used the fact that a = r/3 ≥ (4s 2 ) t ≥ (2s 2 ) t t.Now, sample vertices v 1 ∈ A 1 , . . ., v s+1 ∈ A s+1 independently and uniformly at random.For every 1 ≤ i < j ≤ s + 1, the probability that (v i , v j ) is blue is smaller than 1/ s+1 2 .Taking a union bound over all i, j, we get that with positive probability, v 1 , . . ., v s+1 form a red K s+1 .
Case 2: (b) holds for C, i.e. there exist P 1 , . . ., P s such that for each i ∈ [s], P i is a blue copy of P t ℓ i for some ℓ i ≥ t, and s i=1 ℓ i ≥ |F |r/3.By averaging, there is i ∈ [s] such that ℓ i ≥ |F |r/(3s) ≥ n.Thus, P i contains a blue copy of P t n .

Putting it all together
Proof of Theorem 1.1.Set r = 3(4s 2 ) t , M = 2 s−1 n, and ≤ m s (by the Erdős-Szekeres bound [6]).Hence, N ≤ 2 s−1 n • (rs) s ≤ (24s 3 ) st n.Fix a red/blue edge-coloring of K N and suppose by contradiction that there is no red K s+1 and no blue P t n .Then every R(K s+1 , K sr ) vertices contain a blue clique of size sr.As N = M • R(K s+1 , K sr ), this means that we can find blue cliques For each 1 ≤ i ≤ M and 0 ≤ j ≤ s − 2, let χ j (i) be the maximum ℓ such that there exists a blue copy of P t ℓ whose last t vertices belong to X . By definition, for every 1 Also, χ j (i) < n for all j because there is no blue P t n .By Lemma 4.3 (with q = s − 1), there is a (χ 0 , . . ., χ s−2 )-forest where the last inequality again uses the definition of a (χ 0 , . . ., χ s−2 )-forest.Now suppose by contradiction that there is a blue K t,t with sides A ⊆ X .We can extend P by adding the sets A and A ′ , using that both A and A ′ induce blue cliques, and all edges between A and the last t vertices of P are blue (because V a , V a ′ are blue cliques).Extending P in this way gives a blue copy Q of P t χ d (a)+2t , whose last t vertices are We now use Claim 4.11 to find an s-red-net.For every 0 ≤ d ≤ s − 1 and every Then X v is a blue clique of size r.For every v, u ∈ V (F ) with v < u, we have V v < V u and hence X v < X u .Also, by Claim 4.11, for every v ∈ V (F ) and every descendant u of v, there is no blue K t,t with one part in X v and one part in X u .Hence, (F, (X v ) v ) is an s-red-net of order r.Also, |F | ≥ n ≥ 3sn/r.By Lemma 4.10, there is a red K s+1 or a blue P t n .This completes the proof.

Concluding remarks and open problems
In Theorem 1.1, we showed that R < (K s+1 , P t n ) ≤ s O(st) n.As for lower bounds, it holds that R < (K s+1 , P t n ) > (R(K s+1 , K t+1 ) − 1) • (n − 1)/t.Indeed, partition the vertices into (n − 1)/t intervals of size R(K s+1 , K t+1 ) − 1, and on each of the intervals, put a red/blue coloring with no red K s+1 and no blue K t+1 .All edges between the intervals are blue.Then there is no red K s+1 and no blue P t n , because a blue P t n would have to contain t + 1 vertices from one of the intervals which appear consecutively in the P t n , and hence must form a blue K t+1 .Combining our upper and lower bounds, we obtain s Ω(t) • n ≤ R < (K s+1 , P t n ) ≤ s O(st) • n (when say t ≪ s).It would be interesting to determine the correct dependence of the exponent on s and t.
In Theorem 1.2 we proved that R < (P t n , K n ) = O t (n t(2t−1) ).It would be interesting to improve the exponent further.
Conjecture 5.1.R < (P t n , K n ) ≤ n O(t) .This conjecture, if true, would be tight (up to the implied constant in the exponent) because R < (P t n , K n ) ≥ R(K t+1 , K n ) ≥ Ω(n (t+2)/2 ), see [2,18].We note that our proof method for Theorem 1.2 can be used to prove R < (P n [t], K n ) ≤ n O(t) , where P n [t] is the t-blowup of the monotone path P n (i.e., P n [t] is obtained by replacing each vertex of P n with t vertices and replacing edges with complete bipartite graphs).This bound is tight because R < (P n [t], K n ) ≥ R(K t,t , K n ) ≥ n Ω(t) .Proposition 5.2.R < (P n [t], K n ) ≤ (2tn 3 ) 2t−1 .
Proof sketch.The proof is similar to that of Theorem 1.2.A semi-red t-clique is a clique x 1 < • • • < x t such that all edges x 1 x i (2 ≤ i ≤ t) and x i x t (1 ≤ i ≤ t − 1) are red.It can be shown that every set of N := (t − 2)n 2 vertices contains a blue K n or semi-red t-clique.Indeed, if there is no vertex with forward red degree at least (t − 2)n, then one can greedily find a blue clique of size N (t−2)n ≥ n.Thus, there is a vertex x 1 with forward red degree at least (t − 2)n.By the same argument inside the forward red neighbourhood of x 1 , we can find a vertex x t with at least t − 2 backward red neighbours x 2 , . . ., x t−1 .Now x 1 < x 2 < • • • < x t is a semi-red t-clique.
In Theorem 1.3 we obtain a new bound on R < (P t n , P t n ), whose exponent grows linearly with t.Since we do not have a corresponding lower bound, we wonder whether the following might be true.Problem 5.3.Is there a constant C independent of t, such that R < (P t n , P t n ) = O t (n C )?Even improving the exponent to o(t) would be interesting.
In Theorem 2.4 we proved that g(n, s) = O s (n C ) for a constant C = C(s).It may be interesting to determine the order of growth of (the optimal such) C(s).Our proof of Theorem 2.4 gives an upper bound on C(s) of the order s s , and this is likely far from optimal.Does C(s) grow polynomially in s? Also, for s = 3, is it true that g(n, 3) = O(n)?
One could also consider the analogous extremal functions for weaker notions of a non-increasing triple (see Definition 2.1).There are two such notions: one is to require that χ(x, y) ≥ χ(x, z) ≥ χ(y, z), and one is only to require that χ(x, y) ≥ χ(y, z).For each of these notions, how large should N be to guarantee a non-increasing set of size s in an n-coloring of K N ?

Figure 5 :
Figure 5: Proof of Lemma 4.7 for s = 1: Every part with a blue shadow induces a blue clique, and every two parts connected by two blue dashed lines induce a blue complete bipartite graph.

Figure 6 :
Figure 6: Proof of Lemma 4.7 for s = 2:The top picture shows two trees (of depth one) which we want to connect.The middle and bottom show the two ways of connecting P 1 , P ′ 1 to P 2 , P ′ 2 (the connections are the blue dotted curves).Every part with a blue shadow induces a blue clique and every two parts connected by a single blue dash-dotted line induce a blue complete bipartite graph.

Claim 4 . 8 .
For each k ∈ [m], (b) holds for C k in terms of s − 1.

a
and A ′ ⊆ X (d ′ )a ′ .By the definition of χ d (•), there exists a blue copy P of P t χ d (a) whose last t vertices belong to X Figure 3: An example of a (χ 0 , χ 1 )-forest on vertex set {1, 2, . . ., 11}: the number above each node is its index, and the pair below node i is (χ 0 The following is the key property we need:Claim 4.11.Let 0 ≤ d < d ′ ≤ s − 1, let a ∈ F at depth d and let a ′ be a descendant of a at depth d ′ .Then there is no blue K t,t with one part in X